diff --git a/src/graph.rs b/src/graph.rs index 2d63a34a6c..3ecd94396b 100644 --- a/src/graph.rs +++ b/src/graph.rs @@ -1037,6 +1037,15 @@ impl Operation { } } + /// Returns the given output edge. + /// The index argument is the index into the current operation's output array, + pub fn output(&self, index: usize) -> Output { + crate::Output { + operation: self.clone(), + index: index as c_int, + } + } + // TODO: Figure out what this does and document it. #[allow(missing_docs)] pub fn output_list_length(&self, arg_name: &str) -> Result { diff --git a/src/ops/ops_impl.rs b/src/ops/ops_impl.rs index 8454dbd3ab..e628cfdd78 100644 --- a/src/ops/ops_impl.rs +++ b/src/ops/ops_impl.rs @@ -1,5 +1,10 @@ // DO NOT EDIT. Generated by tensorflow-op-codegen/src/main.rs. -#![allow(non_snake_case, trivial_casts, unused_parens, unused_qualifications)] +#![allow( + non_snake_case, + trivial_casts, + unused_parens, + unused_qualifications +)] /// Builder for the `Abort` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] @@ -8,6 +13,12 @@ pub struct Abort { exit_without_error: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Abort' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AbortInst { + /// An instance of a fully built Abort Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Abort { /// Creates a new `Abort`. @@ -16,19 +27,13 @@ impl Abort { } /// Sets the `error_msg` attribute. - pub fn error_msg>( - mut self, - value: ArgType, - ) -> Self { + pub fn error_msg>(mut self, value: ArgType) -> Self { self.error_msg = ::std::option::Option::Some(value.into()); self } /// Sets the `exit_without_error` attribute. - pub fn exit_without_error>( - mut self, - value: ArgType, - ) -> Self { + pub fn exit_without_error>(mut self, value: ArgType) -> Self { self.exit_without_error = ::std::option::Option::Some(value.into()); self } @@ -40,36 +45,68 @@ impl Abort { } /// Builds the `Abort` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Abort", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.error_msg { - nd.set_attr_string("error_msg", value)?; - } - if let ::std::option::Option::Some(value) = &self.exit_without_error { - nd.set_attr_bool("exit_without_error", *value)?; - } + if let ::std::option::Option::Some(value) = &self.error_msg { + nd.set_attr_string("error_msg", value)?; + } + if let ::std::option::Option::Some(value) = &self.exit_without_error { + nd.set_attr_bool("exit_without_error", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Abort` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Abort", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.error_msg { + nd.set_attr_string("error_msg", value)?; + } + if let ::std::option::Option::Some(value) = &self.exit_without_error { + nd.set_attr_bool("exit_without_error", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AbortInst{op}) + } +} +impl AbortInst { +} +impl Into for AbortInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Abort::new().build(scope)`. -pub fn abort(scope: &mut crate::Scope) -> crate::Result { +pub fn abort<>(scope: &mut crate::Scope) -> crate::Result { Abort::new().build(scope) } + /// Builder for the `Abs` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Abs { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Abs' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AbsInst { + /// An instance of a fully built Abs Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Abs { /// Creates a new `Abs`. @@ -90,39 +127,59 @@ impl Abs { } /// Builds the `Abs` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Abs", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Abs` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Abs", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AbsInst{op}) + } +} +impl AbsInst { + /// Returns the 'y' output of this 'Abs' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AbsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Abs::new().build(x, scope)`. -pub fn abs>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn abs>(x: O0, scope: &mut crate::Scope) -> crate::Result { Abs::new().build(x, scope) } + /// Builder for the `AccumulateNV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AccumulateNV2 { @@ -131,6 +188,12 @@ pub struct AccumulateNV2 { shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AccumulateNV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AccumulateNV2Inst { + /// An instance of a fully built AccumulateNV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AccumulateNV2 { /// Creates a new `AccumulateNV2`. @@ -163,51 +226,83 @@ impl AccumulateNV2 { } /// Builds the `AccumulateNV2` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AccumulateNV2", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AccumulateNV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AccumulateNV2", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AccumulateNV2Inst{op}) + } +} +impl AccumulateNV2Inst { + /// Returns the 'sum' output of this 'AccumulateNV2' operation. + pub fn sum(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AccumulateNV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AccumulateNV2::new().build(inputs, scope)`. -pub fn accumulate_nv2>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn accumulate_nv2>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { AccumulateNV2::new().build(inputs, scope) } + /// Builder for the `AccumulatorApplyGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AccumulatorApplyGradient { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AccumulatorApplyGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AccumulatorApplyGradientInst { + /// An instance of a fully built AccumulatorApplyGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AccumulatorApplyGradient { /// Creates a new `AccumulatorApplyGradient`. @@ -228,27 +323,10 @@ impl AccumulatorApplyGradient { } /// Builds the `AccumulatorApplyGradient` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - local_step: O1, - gradient: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, local_step: O1, gradient: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), local_step.into(), gradient.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - local_step: crate::Output, - gradient: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, local_step: crate::Output, gradient: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AccumulatorApplyGradient", |nd| { nd.add_input(handle); nd.add_input(local_step); @@ -256,32 +334,56 @@ impl AccumulatorApplyGradient { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AccumulatorApplyGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, local_step: O1, gradient: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), local_step.into(), gradient.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, local_step: crate::Output, gradient: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AccumulatorApplyGradient", |nd| { + nd.add_input(handle); + nd.add_input(local_step); + nd.add_input(gradient); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AccumulatorApplyGradientInst{op}) + } +} +impl AccumulatorApplyGradientInst { +} +impl Into for AccumulatorApplyGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AccumulatorApplyGradient::new().build(handle, local_step, gradient, scope)`. -pub fn accumulator_apply_gradient< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - local_step: O1, - gradient: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn accumulator_apply_gradient, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, local_step: O1, gradient: O2, scope: &mut crate::Scope) -> crate::Result { AccumulatorApplyGradient::new().build(handle, local_step, gradient, scope) } + /// Builder for the `AccumulatorNumAccumulated` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AccumulatorNumAccumulated { control_inputs: ::std::vec::Vec, } +/// An instance of 'AccumulatorNumAccumulated' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AccumulatorNumAccumulatedInst { + /// An instance of a fully built AccumulatorNumAccumulated Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AccumulatorNumAccumulated { /// Creates a new `AccumulatorNumAccumulated`. @@ -296,19 +398,10 @@ impl AccumulatorNumAccumulated { } /// Builds the `AccumulatorNumAccumulated` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AccumulatorNumAccumulated", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -317,20 +410,52 @@ impl AccumulatorNumAccumulated { ::std::result::Result::Ok(()) }) } -} + /// Builds the `AccumulatorNumAccumulated` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AccumulatorNumAccumulated", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(AccumulatorNumAccumulatedInst{op}) + } +} +impl AccumulatorNumAccumulatedInst { + /// Returns the 'num_accumulated' output of this 'AccumulatorNumAccumulated' operation. + pub fn num_accumulated(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AccumulatorNumAccumulatedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AccumulatorNumAccumulated::new().build(handle, scope)`. -pub fn accumulator_num_accumulated>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn accumulator_num_accumulated>(handle: O0, scope: &mut crate::Scope) -> crate::Result { AccumulatorNumAccumulated::new().build(handle, scope) } + /// Builder for the `AccumulatorSetGlobalStep` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AccumulatorSetGlobalStep { control_inputs: ::std::vec::Vec, } +/// An instance of 'AccumulatorSetGlobalStep' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AccumulatorSetGlobalStepInst { + /// An instance of a fully built AccumulatorSetGlobalStep Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AccumulatorSetGlobalStep { /// Creates a new `AccumulatorSetGlobalStep`. @@ -345,24 +470,10 @@ impl AccumulatorSetGlobalStep { } /// Builds the `AccumulatorSetGlobalStep` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - new_global_step: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, new_global_step: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), new_global_step.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - new_global_step: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, new_global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AccumulatorSetGlobalStep", |nd| { nd.add_input(handle); nd.add_input(new_global_step); @@ -372,25 +483,47 @@ impl AccumulatorSetGlobalStep { ::std::result::Result::Ok(()) }) } -} + /// Builds the `AccumulatorSetGlobalStep` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, new_global_step: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), new_global_step.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, new_global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AccumulatorSetGlobalStep", |nd| { + nd.add_input(handle); + nd.add_input(new_global_step); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(AccumulatorSetGlobalStepInst{op}) + } +} +impl AccumulatorSetGlobalStepInst { +} +impl Into for AccumulatorSetGlobalStepInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AccumulatorSetGlobalStep::new().build(handle, new_global_step, scope)`. -pub fn accumulator_set_global_step< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - new_global_step: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn accumulator_set_global_step, O1: ::std::convert::Into>(handle: O0, new_global_step: O1, scope: &mut crate::Scope) -> crate::Result { AccumulatorSetGlobalStep::new().build(handle, new_global_step, scope) } + /// Builder for the `AccumulatorTakeGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AccumulatorTakeGradient { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AccumulatorTakeGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AccumulatorTakeGradientInst { + /// An instance of a fully built AccumulatorTakeGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AccumulatorTakeGradient { /// Creates a new `AccumulatorTakeGradient`. @@ -411,55 +544,73 @@ impl AccumulatorTakeGradient { } /// Builds the `AccumulatorTakeGradient` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - num_required: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, num_required: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), num_required.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - num_required: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, num_required: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AccumulatorTakeGradient", |nd| { nd.add_input(handle); nd.add_input(num_required); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AccumulatorTakeGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, num_required: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), num_required.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, num_required: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AccumulatorTakeGradient", |nd| { + nd.add_input(handle); + nd.add_input(num_required); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AccumulatorTakeGradientInst{op}) + } +} +impl AccumulatorTakeGradientInst { + /// Returns the 'average' output of this 'AccumulatorTakeGradient' operation. + pub fn average(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AccumulatorTakeGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AccumulatorTakeGradient::new().build(handle, num_required, scope)`. -pub fn accumulator_take_gradient< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - num_required: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn accumulator_take_gradient, O1: ::std::convert::Into>(handle: O0, num_required: O1, scope: &mut crate::Scope) -> crate::Result { AccumulatorTakeGradient::new().build(handle, num_required, scope) } + /// Builder for the `Acos` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Acos { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Acos' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AcosInst { + /// An instance of a fully built Acos Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Acos { /// Creates a new `Acos`. @@ -480,45 +631,71 @@ impl Acos { } /// Builds the `Acos` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Acos", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Acos` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Acos", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AcosInst{op}) + } +} +impl AcosInst { + /// Returns the 'y' output of this 'Acos' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AcosInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Acos::new().build(x, scope)`. -pub fn acos>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn acos>(x: O0, scope: &mut crate::Scope) -> crate::Result { Acos::new().build(x, scope) } + /// Builder for the `Acosh` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Acosh { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Acosh' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AcoshInst { + /// An instance of a fully built Acosh Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Acosh { /// Creates a new `Acosh`. @@ -539,45 +716,71 @@ impl Acosh { } /// Builds the `Acosh` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Acosh", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Acosh` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Acosh", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AcoshInst{op}) + } +} +impl AcoshInst { + /// Returns the 'y' output of this 'Acosh' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AcoshInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Acosh::new().build(x, scope)`. -pub fn acosh>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn acosh>(x: O0, scope: &mut crate::Scope) -> crate::Result { Acosh::new().build(x, scope) } + /// Builder for the `Add` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Add { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Add' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AddInst { + /// An instance of a fully built Add Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Add { /// Creates a new `Add`. @@ -598,46 +801,61 @@ impl Add { } /// Builds the `Add` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Add", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Add` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Add", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AddInst{op}) + } +} +impl AddInst { + /// Returns the 'z' output of this 'Add' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Add::new().build(x, y, scope)`. -pub fn add, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn add, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Add::new().build(x, y, scope) } + /// Builder for the `AddManySparseToTensorsMap` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AddManySparseToTensorsMap { @@ -646,6 +864,12 @@ pub struct AddManySparseToTensorsMap { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'AddManySparseToTensorsMap' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AddManySparseToTensorsMapInst { + /// An instance of a fully built AddManySparseToTensorsMap Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AddManySparseToTensorsMap { /// Creates a new `AddManySparseToTensorsMap`. @@ -660,19 +884,13 @@ impl AddManySparseToTensorsMap { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -684,32 +902,10 @@ impl AddManySparseToTensorsMap { } /// Builds the `AddManySparseToTensorsMap` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - sparse_indices: O0, - sparse_values: O1, - sparse_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sparse_indices.into(), - sparse_values.into(), - sparse_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - sparse_indices: crate::Output, - sparse_values: crate::Output, - sparse_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sparse_indices.into(), sparse_values.into(), sparse_shape.into(), scope) + } + fn build_impl(&self, sparse_indices: crate::Output, sparse_values: crate::Output, sparse_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AddManySparseToTensorsMap", |nd| { nd.add_input(sparse_indices); nd.add_input(sparse_values); @@ -717,33 +913,64 @@ impl AddManySparseToTensorsMap { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AddManySparseToTensorsMap` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_indices.into(), sparse_values.into(), sparse_shape.into(), scope) + } + fn build_instance_impl(&self, sparse_indices: crate::Output, sparse_values: crate::Output, sparse_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AddManySparseToTensorsMap", |nd| { + nd.add_input(sparse_indices); + nd.add_input(sparse_values); + nd.add_input(sparse_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AddManySparseToTensorsMapInst{op}) + } +} +impl AddManySparseToTensorsMapInst { + /// Returns the 'sparse_handles' output of this 'AddManySparseToTensorsMap' operation. + pub fn sparse_handles(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AddManySparseToTensorsMapInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AddManySparseToTensorsMap::new().build(sparse_indices, sparse_values, sparse_shape, scope)`. -pub fn add_many_sparse_to_tensors_map< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - sparse_indices: O0, - sparse_values: O1, - sparse_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn add_many_sparse_to_tensors_map, O1: ::std::convert::Into, O2: ::std::convert::Into>(sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { AddManySparseToTensorsMap::new().build(sparse_indices, sparse_values, sparse_shape, scope) } + /// Builder for the `AddN` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AddN { @@ -751,6 +978,12 @@ pub struct AddN { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AddN' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AddNInst { + /// An instance of a fully built AddN Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AddN { /// Creates a new `AddN`. @@ -777,42 +1010,65 @@ impl AddN { } /// Builds the `AddN` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AddN", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AddN` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AddN", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AddNInst{op}) + } +} +impl AddNInst { + /// Returns the 'sum' output of this 'AddN' operation. + pub fn sum(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AddNInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AddN::new().build(inputs, scope)`. -pub fn add_n>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn add_n>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { AddN::new().build(inputs, scope) } + /// Builder for the `AddSparseToTensorsMap` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AddSparseToTensorsMap { @@ -821,6 +1077,12 @@ pub struct AddSparseToTensorsMap { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'AddSparseToTensorsMap' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AddSparseToTensorsMapInst { + /// An instance of a fully built AddSparseToTensorsMap Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AddSparseToTensorsMap { /// Creates a new `AddSparseToTensorsMap`. @@ -835,19 +1097,13 @@ impl AddSparseToTensorsMap { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -859,32 +1115,10 @@ impl AddSparseToTensorsMap { } /// Builds the `AddSparseToTensorsMap` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - sparse_indices: O0, - sparse_values: O1, - sparse_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sparse_indices.into(), - sparse_values.into(), - sparse_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - sparse_indices: crate::Output, - sparse_values: crate::Output, - sparse_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sparse_indices.into(), sparse_values.into(), sparse_shape.into(), scope) + } + fn build_impl(&self, sparse_indices: crate::Output, sparse_values: crate::Output, sparse_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AddSparseToTensorsMap", |nd| { nd.add_input(sparse_indices); nd.add_input(sparse_values); @@ -892,39 +1126,76 @@ impl AddSparseToTensorsMap { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AddSparseToTensorsMap` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_indices.into(), sparse_values.into(), sparse_shape.into(), scope) + } + fn build_instance_impl(&self, sparse_indices: crate::Output, sparse_values: crate::Output, sparse_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AddSparseToTensorsMap", |nd| { + nd.add_input(sparse_indices); + nd.add_input(sparse_values); + nd.add_input(sparse_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AddSparseToTensorsMapInst{op}) + } +} +impl AddSparseToTensorsMapInst { + /// Returns the 'sparse_handle' output of this 'AddSparseToTensorsMap' operation. + pub fn sparse_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AddSparseToTensorsMapInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AddSparseToTensorsMap::new().build(sparse_indices, sparse_values, sparse_shape, scope)`. -pub fn add_sparse_to_tensors_map< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - sparse_indices: O0, - sparse_values: O1, - sparse_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn add_sparse_to_tensors_map, O1: ::std::convert::Into, O2: ::std::convert::Into>(sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { AddSparseToTensorsMap::new().build(sparse_indices, sparse_values, sparse_shape, scope) } + /// Builder for the `AddV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AddV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AddV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AddV2Inst { + /// An instance of a fully built AddV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AddV2 { /// Creates a new `AddV2`. @@ -945,52 +1216,73 @@ impl AddV2 { } /// Builds the `AddV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AddV2", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AddV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AddV2", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AddV2Inst{op}) + } +} +impl AddV2Inst { + /// Returns the 'z' output of this 'AddV2' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AddV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AddV2::new().build(x, y, scope)`. -pub fn add_v2, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn add_v2, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { AddV2::new().build(x, y, scope) } + /// Builder for the `AdjustContrast` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AdjustContrast { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AdjustContrast' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AdjustContrastInst { + /// An instance of a fully built AdjustContrast Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AdjustContrast { /// Creates a new `AdjustContrast`. @@ -1011,36 +1303,10 @@ impl AdjustContrast { } /// Builds the `AdjustContrast` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - images: O0, - contrast_factor: O1, - min_value: O2, - max_value: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - images.into(), - contrast_factor.into(), - min_value.into(), - max_value.into(), - scope, - ) - } - - fn build_impl( - &self, - images: crate::Output, - contrast_factor: crate::Output, - min_value: crate::Output, - max_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, images: O0, contrast_factor: O1, min_value: O2, max_value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(images.into(), contrast_factor.into(), min_value.into(), max_value.into(), scope) + } + fn build_impl(&self, images: crate::Output, contrast_factor: crate::Output, min_value: crate::Output, max_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AdjustContrast", |nd| { nd.add_input(images); nd.add_input(contrast_factor); @@ -1049,35 +1315,65 @@ impl AdjustContrast { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AdjustContrast` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, images: O0, contrast_factor: O1, min_value: O2, max_value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), contrast_factor.into(), min_value.into(), max_value.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, contrast_factor: crate::Output, min_value: crate::Output, max_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AdjustContrast", |nd| { + nd.add_input(images); + nd.add_input(contrast_factor); + nd.add_input(min_value); + nd.add_input(max_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AdjustContrastInst{op}) + } +} +impl AdjustContrastInst { + /// Returns the 'output' output of this 'AdjustContrast' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AdjustContrastInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AdjustContrast::new().build(images, contrast_factor, min_value, max_value, scope)`. -pub fn adjust_contrast< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - images: O0, - contrast_factor: O1, - min_value: O2, - max_value: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn adjust_contrast, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(images: O0, contrast_factor: O1, min_value: O2, max_value: O3, scope: &mut crate::Scope) -> crate::Result { AdjustContrast::new().build(images, contrast_factor, min_value, max_value, scope) } + /// Builder for the `AdjustContrastv2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AdjustContrastv2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AdjustContrastv2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AdjustContrastv2Inst { + /// An instance of a fully built AdjustContrastv2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AdjustContrastv2 { /// Creates a new `AdjustContrastv2`. @@ -1098,55 +1394,73 @@ impl AdjustContrastv2 { } /// Builds the `AdjustContrastv2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - images: O0, - contrast_factor: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, images: O0, contrast_factor: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), contrast_factor.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - contrast_factor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, contrast_factor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AdjustContrastv2", |nd| { nd.add_input(images); nd.add_input(contrast_factor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AdjustContrastv2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, images: O0, contrast_factor: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), contrast_factor.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, contrast_factor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AdjustContrastv2", |nd| { + nd.add_input(images); + nd.add_input(contrast_factor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AdjustContrastv2Inst{op}) + } +} +impl AdjustContrastv2Inst { + /// Returns the 'output' output of this 'AdjustContrastv2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AdjustContrastv2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AdjustContrastv2::new().build(images, contrast_factor, scope)`. -pub fn adjust_contrastv2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - images: O0, - contrast_factor: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn adjust_contrastv2, O1: ::std::convert::Into>(images: O0, contrast_factor: O1, scope: &mut crate::Scope) -> crate::Result { AdjustContrastv2::new().build(images, contrast_factor, scope) } + /// Builder for the `AdjustHue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AdjustHue { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AdjustHue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AdjustHueInst { + /// An instance of a fully built AdjustHue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AdjustHue { /// Creates a new `AdjustHue`. @@ -1167,55 +1481,73 @@ impl AdjustHue { } /// Builds the `AdjustHue` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - images: O0, - delta: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, images: O0, delta: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), delta.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - delta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AdjustHue", |nd| { nd.add_input(images); nd.add_input(delta); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AdjustHue` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, images: O0, delta: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), delta.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AdjustHue", |nd| { + nd.add_input(images); + nd.add_input(delta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AdjustHueInst{op}) + } +} +impl AdjustHueInst { + /// Returns the 'output' output of this 'AdjustHue' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AdjustHueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AdjustHue::new().build(images, delta, scope)`. -pub fn adjust_hue< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - images: O0, - delta: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn adjust_hue, O1: ::std::convert::Into>(images: O0, delta: O1, scope: &mut crate::Scope) -> crate::Result { AdjustHue::new().build(images, delta, scope) } + /// Builder for the `AdjustSaturation` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AdjustSaturation { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AdjustSaturation' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AdjustSaturationInst { + /// An instance of a fully built AdjustSaturation Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AdjustSaturation { /// Creates a new `AdjustSaturation`. @@ -1236,49 +1568,61 @@ impl AdjustSaturation { } /// Builds the `AdjustSaturation` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - images: O0, - scale: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, images: O0, scale: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), scale.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - scale: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, scale: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AdjustSaturation", |nd| { nd.add_input(images); nd.add_input(scale); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AdjustSaturation` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, images: O0, scale: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), scale.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, scale: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AdjustSaturation", |nd| { + nd.add_input(images); + nd.add_input(scale); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AdjustSaturationInst{op}) + } +} +impl AdjustSaturationInst { + /// Returns the 'output' output of this 'AdjustSaturation' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AdjustSaturationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AdjustSaturation::new().build(images, scale, scope)`. -pub fn adjust_saturation< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - images: O0, - scale: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn adjust_saturation, O1: ::std::convert::Into>(images: O0, scale: O1, scope: &mut crate::Scope) -> crate::Result { AdjustSaturation::new().build(images, scale, scope) } + /// Builder for the `All` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct All { @@ -1286,6 +1630,12 @@ pub struct All { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'All' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AllInst { + /// An instance of a fully built All Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl All { /// Creates a new `All`. @@ -1312,49 +1662,67 @@ impl All { } /// Builds the `All` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), reduction_indices.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - reduction_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("All", |nd| { nd.add_input(input); nd.add_input(reduction_indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `All` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), reduction_indices.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("All", |nd| { + nd.add_input(input); + nd.add_input(reduction_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AllInst{op}) + } +} +impl AllInst { + /// Returns the 'output' output of this 'All' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AllInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `All::new().build(input, reduction_indices, scope)`. -pub fn all, O1: ::std::convert::Into>( - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn all, O1: ::std::convert::Into>(input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { All::new().build(input, reduction_indices, scope) } + /// Builder for the `AllCandidateSampler` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AllCandidateSampler { @@ -1365,6 +1733,12 @@ pub struct AllCandidateSampler { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AllCandidateSampler' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AllCandidateSamplerInst { + /// An instance of a fully built AllCandidateSampler Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AllCandidateSampler { /// Creates a new `AllCandidateSampler`. @@ -1409,51 +1783,97 @@ impl AllCandidateSampler { } /// Builds the `AllCandidateSampler` operation. - pub fn build>( - &self, - true_classes: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(true_classes.into(), scope) } - - fn build_impl( - &self, - true_classes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AllCandidateSampler", |nd| { nd.add_input(true_classes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_true { - nd.set_attr_int("num_true", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sampled { - nd.set_attr_int("num_sampled", *value)?; - } - if let ::std::option::Option::Some(value) = &self.unique { - nd.set_attr_bool("unique", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AllCandidateSampler` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(true_classes.into(), scope) + } + fn build_instance_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AllCandidateSampler", |nd| { + nd.add_input(true_classes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AllCandidateSamplerInst{op}) + } +} +impl AllCandidateSamplerInst { + /// Returns the 'sampled_candidates' output of this 'AllCandidateSampler' operation. + pub fn sampled_candidates(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'true_expected_count' output of this 'AllCandidateSampler' operation. + pub fn true_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sampled_expected_count' output of this 'AllCandidateSampler' operation. + pub fn sampled_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for AllCandidateSamplerInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AllCandidateSampler::new().build(true_classes, scope)`. -pub fn all_candidate_sampler>( - true_classes: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn all_candidate_sampler>(true_classes: O0, scope: &mut crate::Scope) -> crate::Result { AllCandidateSampler::new().build(true_classes, scope) } + /// Builder for the `AllToAll` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AllToAll { @@ -1463,6 +1883,12 @@ pub struct AllToAll { split_count: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AllToAll' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AllToAllInst { + /// An instance of a fully built AllToAll Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AllToAll { /// Creates a new `AllToAll`. @@ -1501,58 +1927,79 @@ impl AllToAll { } /// Builds the `AllToAll` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - group_assignment: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, group_assignment: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), group_assignment.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - group_assignment: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, group_assignment: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AllToAll", |nd| { nd.add_input(input); nd.add_input(group_assignment); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.concat_dimension { - nd.set_attr_int("concat_dimension", *value)?; - } - if let ::std::option::Option::Some(value) = &self.split_dimension { - nd.set_attr_int("split_dimension", *value)?; - } - if let ::std::option::Option::Some(value) = &self.split_count { - nd.set_attr_int("split_count", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.concat_dimension { + nd.set_attr_int("concat_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.split_dimension { + nd.set_attr_int("split_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.split_count { + nd.set_attr_int("split_count", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AllToAll` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, group_assignment: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), group_assignment.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, group_assignment: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AllToAll", |nd| { + nd.add_input(input); + nd.add_input(group_assignment); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.concat_dimension { + nd.set_attr_int("concat_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.split_dimension { + nd.set_attr_int("split_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.split_count { + nd.set_attr_int("split_count", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AllToAllInst{op}) + } +} +impl AllToAllInst { + /// Returns the 'output' output of this 'AllToAll' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AllToAllInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AllToAll::new().build(input, group_assignment, scope)`. -pub fn all_to_all< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - group_assignment: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn all_to_all, O1: ::std::convert::Into>(input: O0, group_assignment: O1, scope: &mut crate::Scope) -> crate::Result { AllToAll::new().build(input, group_assignment, scope) } + /// Builder for the `Angle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Angle { @@ -1560,6 +2007,12 @@ pub struct Angle { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Angle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AngleInst { + /// An instance of a fully built Angle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Angle { /// Creates a new `Angle`. @@ -1586,42 +2039,65 @@ impl Angle { } /// Builds the `Angle` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Angle", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Angle` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Angle", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AngleInst{op}) + } +} +impl AngleInst { + /// Returns the 'output' output of this 'Angle' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AngleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Angle::new().build(input, scope)`. -pub fn angle>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn angle>(input: O0, scope: &mut crate::Scope) -> crate::Result { Angle::new().build(input, scope) } + /// Builder for the `AnonymousHashTable` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousHashTable { @@ -1629,6 +2105,12 @@ pub struct AnonymousHashTable { value_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousHashTable' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousHashTableInst { + /// An instance of a fully built AnonymousHashTable Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousHashTable { /// Creates a new `AnonymousHashTable`. @@ -1637,19 +2119,13 @@ impl AnonymousHashTable { } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } @@ -1661,30 +2137,63 @@ impl AnonymousHashTable { } /// Builds the `AnonymousHashTable` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousHashTable", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousHashTable` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousHashTable", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousHashTableInst{op}) + } +} +impl AnonymousHashTableInst { + /// Returns the 'table_handle' output of this 'AnonymousHashTable' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AnonymousHashTableInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousHashTable::new().build(scope)`. -pub fn anonymous_hash_table(scope: &mut crate::Scope) -> crate::Result { +pub fn anonymous_hash_table<>(scope: &mut crate::Scope) -> crate::Result { AnonymousHashTable::new().build(scope) } + /// Builder for the `AnonymousIterator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousIterator { @@ -1692,6 +2201,12 @@ pub struct AnonymousIterator { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousIterator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousIteratorInst { + /// An instance of a fully built AnonymousIterator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousIterator { /// Creates a new `AnonymousIterator`. @@ -1700,19 +2215,13 @@ impl AnonymousIterator { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -1724,30 +2233,63 @@ impl AnonymousIterator { } /// Builds the `AnonymousIterator` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousIterator", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousIterator` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousIterator", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousIteratorInst{op}) + } +} +impl AnonymousIteratorInst { + /// Returns the 'handle' output of this 'AnonymousIterator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AnonymousIteratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousIterator::new().build(scope)`. -pub fn anonymous_iterator(scope: &mut crate::Scope) -> crate::Result { +pub fn anonymous_iterator<>(scope: &mut crate::Scope) -> crate::Result { AnonymousIterator::new().build(scope) } + /// Builder for the `AnonymousIteratorV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousIteratorV2 { @@ -1755,6 +2297,12 @@ pub struct AnonymousIteratorV2 { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousIteratorV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousIteratorV2Inst { + /// An instance of a fully built AnonymousIteratorV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousIteratorV2 { /// Creates a new `AnonymousIteratorV2`. @@ -1763,19 +2311,13 @@ impl AnonymousIteratorV2 { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -1787,30 +2329,70 @@ impl AnonymousIteratorV2 { } /// Builds the `AnonymousIteratorV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousIteratorV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousIteratorV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousIteratorV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousIteratorV2Inst{op}) + } +} +impl AnonymousIteratorV2Inst { + /// Returns the 'handle' output of this 'AnonymousIteratorV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'deleter' output of this 'AnonymousIteratorV2' operation. + pub fn deleter(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for AnonymousIteratorV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousIteratorV2::new().build(scope)`. -pub fn anonymous_iterator_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn anonymous_iterator_v2<>(scope: &mut crate::Scope) -> crate::Result { AnonymousIteratorV2::new().build(scope) } + /// Builder for the `AnonymousIteratorV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousIteratorV3 { @@ -1818,6 +2400,12 @@ pub struct AnonymousIteratorV3 { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousIteratorV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousIteratorV3Inst { + /// An instance of a fully built AnonymousIteratorV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousIteratorV3 { /// Creates a new `AnonymousIteratorV3`. @@ -1826,19 +2414,13 @@ impl AnonymousIteratorV3 { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -1850,35 +2432,74 @@ impl AnonymousIteratorV3 { } /// Builds the `AnonymousIteratorV3` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousIteratorV3", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousIteratorV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousIteratorV3", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousIteratorV3Inst{op}) + } +} +impl AnonymousIteratorV3Inst { + /// Returns the 'handle' output of this 'AnonymousIteratorV3' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AnonymousIteratorV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousIteratorV3::new().build(scope)`. -pub fn anonymous_iterator_v3(scope: &mut crate::Scope) -> crate::Result { +pub fn anonymous_iterator_v3<>(scope: &mut crate::Scope) -> crate::Result { AnonymousIteratorV3::new().build(scope) } + /// Builder for the `AnonymousMemoryCache` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousMemoryCache { control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousMemoryCache' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousMemoryCacheInst { + /// An instance of a fully built AnonymousMemoryCache Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousMemoryCache { /// Creates a new `AnonymousMemoryCache`. @@ -1893,10 +2514,9 @@ impl AnonymousMemoryCache { } /// Builds the `AnonymousMemoryCache` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousMemoryCache", |nd| { for op in &self.control_inputs { @@ -1905,12 +2525,47 @@ impl AnonymousMemoryCache { ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousMemoryCache` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousMemoryCache", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousMemoryCacheInst{op}) + } +} +impl AnonymousMemoryCacheInst { + /// Returns the 'handle' output of this 'AnonymousMemoryCache' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'deleter' output of this 'AnonymousMemoryCache' operation. + pub fn deleter(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for AnonymousMemoryCacheInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousMemoryCache::new().build(scope)`. -pub fn anonymous_memory_cache(scope: &mut crate::Scope) -> crate::Result { +pub fn anonymous_memory_cache<>(scope: &mut crate::Scope) -> crate::Result { AnonymousMemoryCache::new().build(scope) } + /// Builder for the `AnonymousMultiDeviceIterator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousMultiDeviceIterator { @@ -1919,6 +2574,12 @@ pub struct AnonymousMultiDeviceIterator { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousMultiDeviceIterator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousMultiDeviceIteratorInst { + /// An instance of a fully built AnonymousMultiDeviceIterator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousMultiDeviceIterator { /// Creates a new `AnonymousMultiDeviceIterator`. @@ -1927,28 +2588,19 @@ impl AnonymousMultiDeviceIterator { } /// Sets the `devices` attribute. - pub fn devices>>( - mut self, - value: ArgType, - ) -> Self { + pub fn devices>>(mut self, value: ArgType) -> Self { self.devices = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -1960,35 +2612,185 @@ impl AnonymousMultiDeviceIterator { } /// Builds the `AnonymousMultiDeviceIterator` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousMultiDeviceIterator", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.devices { - nd.set_attr_string_list("devices", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.devices { + nd.set_attr_string_list("devices", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousMultiDeviceIterator` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousMultiDeviceIterator", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.devices { + nd.set_attr_string_list("devices", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousMultiDeviceIteratorInst{op}) + } +} +impl AnonymousMultiDeviceIteratorInst { + /// Returns the 'handle' output of this 'AnonymousMultiDeviceIterator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'deleter' output of this 'AnonymousMultiDeviceIterator' operation. + pub fn deleter(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for AnonymousMultiDeviceIteratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousMultiDeviceIterator::new().build(scope)`. -pub fn anonymous_multi_device_iterator( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn anonymous_multi_device_iterator<>(scope: &mut crate::Scope) -> crate::Result { AnonymousMultiDeviceIterator::new().build(scope) } + +/// Builder for the `AnonymousMultiDeviceIteratorV3` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct AnonymousMultiDeviceIteratorV3 { + devices: ::std::option::Option<::std::vec::Vec<::std::string::String>>, + output_types: ::std::option::Option<::std::vec::Vec>, + output_shapes: ::std::option::Option<::std::vec::Vec>, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'AnonymousMultiDeviceIteratorV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousMultiDeviceIteratorV3Inst { + /// An instance of a fully built AnonymousMultiDeviceIteratorV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl AnonymousMultiDeviceIteratorV3 { + /// Creates a new `AnonymousMultiDeviceIteratorV3`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `devices` attribute. + pub fn devices>>(mut self, value: ArgType) -> Self { + self.devices = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `output_types` attribute. + pub fn output_types>>(mut self, value: ArgType) -> Self { + self.output_types = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `output_shapes` attribute. + pub fn output_shapes>>(mut self, value: ArgType) -> Self { + self.output_shapes = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `AnonymousMultiDeviceIteratorV3` operation. + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(scope) + } + fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("AnonymousMultiDeviceIteratorV3", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.devices { + nd.set_attr_string_list("devices", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `AnonymousMultiDeviceIteratorV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousMultiDeviceIteratorV3", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.devices { + nd.set_attr_string_list("devices", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousMultiDeviceIteratorV3Inst{op}) + } +} +impl AnonymousMultiDeviceIteratorV3Inst { + /// Returns the 'handle' output of this 'AnonymousMultiDeviceIteratorV3' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AnonymousMultiDeviceIteratorV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `AnonymousMultiDeviceIteratorV3::new().build(scope)`. +pub fn anonymous_multi_device_iterator_v3<>(scope: &mut crate::Scope) -> crate::Result { + AnonymousMultiDeviceIteratorV3::new().build(scope) +} + /// Builder for the `AnonymousMutableDenseHashTable` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousMutableDenseHashTable { @@ -1999,6 +2801,12 @@ pub struct AnonymousMutableDenseHashTable { max_load_factor: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousMutableDenseHashTable' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousMutableDenseHashTableInst { + /// An instance of a fully built AnonymousMutableDenseHashTable Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousMutableDenseHashTable { /// Creates a new `AnonymousMutableDenseHashTable`. @@ -2007,37 +2815,25 @@ impl AnonymousMutableDenseHashTable { } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_shape` attribute. - pub fn value_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_shape>(mut self, value: ArgType) -> Self { self.value_shape = ::std::option::Option::Some(value.into()); self } /// Sets the `initial_num_buckets` attribute. - pub fn initial_num_buckets>( - mut self, - value: ArgType, - ) -> Self { + pub fn initial_num_buckets>(mut self, value: ArgType) -> Self { self.initial_num_buckets = ::std::option::Option::Some(value.into()); self } @@ -2055,61 +2851,85 @@ impl AnonymousMutableDenseHashTable { } /// Builds the `AnonymousMutableDenseHashTable` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - empty_key: O0, - deleted_key: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, empty_key: O0, deleted_key: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(empty_key.into(), deleted_key.into(), scope) } - - fn build_impl( - &self, - empty_key: crate::Output, - deleted_key: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, empty_key: crate::Output, deleted_key: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousMutableDenseHashTable", |nd| { nd.add_input(empty_key); nd.add_input(deleted_key); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_shape { - nd.set_attr_shape("value_shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.initial_num_buckets { - nd.set_attr_int("initial_num_buckets", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_load_factor { - nd.set_attr_float("max_load_factor", *value)?; - } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.initial_num_buckets { + nd.set_attr_int("initial_num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_load_factor { + nd.set_attr_float("max_load_factor", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousMutableDenseHashTable` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, empty_key: O0, deleted_key: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(empty_key.into(), deleted_key.into(), scope) + } + fn build_instance_impl(&self, empty_key: crate::Output, deleted_key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousMutableDenseHashTable", |nd| { + nd.add_input(empty_key); + nd.add_input(deleted_key); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.initial_num_buckets { + nd.set_attr_int("initial_num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_load_factor { + nd.set_attr_float("max_load_factor", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousMutableDenseHashTableInst{op}) + } +} +impl AnonymousMutableDenseHashTableInst { + /// Returns the 'table_handle' output of this 'AnonymousMutableDenseHashTable' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AnonymousMutableDenseHashTableInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousMutableDenseHashTable::new().build(empty_key, deleted_key, scope)`. -pub fn anonymous_mutable_dense_hash_table< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - empty_key: O0, - deleted_key: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn anonymous_mutable_dense_hash_table, O1: ::std::convert::Into>(empty_key: O0, deleted_key: O1, scope: &mut crate::Scope) -> crate::Result { AnonymousMutableDenseHashTable::new().build(empty_key, deleted_key, scope) } + /// Builder for the `AnonymousMutableHashTable` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousMutableHashTable { @@ -2117,6 +2937,12 @@ pub struct AnonymousMutableHashTable { value_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousMutableHashTable' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousMutableHashTableInst { + /// An instance of a fully built AnonymousMutableHashTable Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousMutableHashTable { /// Creates a new `AnonymousMutableHashTable`. @@ -2125,19 +2951,13 @@ impl AnonymousMutableHashTable { } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } @@ -2149,30 +2969,63 @@ impl AnonymousMutableHashTable { } /// Builds the `AnonymousMutableHashTable` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousMutableHashTable", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousMutableHashTable` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousMutableHashTable", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousMutableHashTableInst{op}) + } +} +impl AnonymousMutableHashTableInst { + /// Returns the 'table_handle' output of this 'AnonymousMutableHashTable' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AnonymousMutableHashTableInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousMutableHashTable::new().build(scope)`. -pub fn anonymous_mutable_hash_table(scope: &mut crate::Scope) -> crate::Result { +pub fn anonymous_mutable_hash_table<>(scope: &mut crate::Scope) -> crate::Result { AnonymousMutableHashTable::new().build(scope) } + /// Builder for the `AnonymousMutableHashTableOfTensors` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousMutableHashTableOfTensors { @@ -2181,6 +3034,12 @@ pub struct AnonymousMutableHashTableOfTensors { value_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousMutableHashTableOfTensors' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousMutableHashTableOfTensorsInst { + /// An instance of a fully built AnonymousMutableHashTableOfTensors Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousMutableHashTableOfTensors { /// Creates a new `AnonymousMutableHashTableOfTensors`. @@ -2189,28 +3048,19 @@ impl AnonymousMutableHashTableOfTensors { } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_shape` attribute. - pub fn value_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_shape>(mut self, value: ArgType) -> Self { self.value_shape = ::std::option::Option::Some(value.into()); self } @@ -2222,40 +3072,80 @@ impl AnonymousMutableHashTableOfTensors { } /// Builds the `AnonymousMutableHashTableOfTensors` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousMutableHashTableOfTensors", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_shape { - nd.set_attr_shape("value_shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousMutableHashTableOfTensors` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousMutableHashTableOfTensors", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousMutableHashTableOfTensorsInst{op}) + } +} +impl AnonymousMutableHashTableOfTensorsInst { + /// Returns the 'table_handle' output of this 'AnonymousMutableHashTableOfTensors' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AnonymousMutableHashTableOfTensorsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousMutableHashTableOfTensors::new().build(scope)`. -pub fn anonymous_mutable_hash_table_of_tensors( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn anonymous_mutable_hash_table_of_tensors<>(scope: &mut crate::Scope) -> crate::Result { AnonymousMutableHashTableOfTensors::new().build(scope) } + /// Builder for the `AnonymousRandomSeedGenerator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousRandomSeedGenerator { control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousRandomSeedGenerator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousRandomSeedGeneratorInst { + /// An instance of a fully built AnonymousRandomSeedGenerator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousRandomSeedGenerator { /// Creates a new `AnonymousRandomSeedGenerator`. @@ -2270,24 +3160,10 @@ impl AnonymousRandomSeedGenerator { } /// Builds the `AnonymousRandomSeedGenerator` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - seed: O0, - seed2: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, seed: O0, seed2: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(seed.into(), seed2.into(), scope) } - - fn build_impl( - &self, - seed: crate::Output, - seed2: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, seed: crate::Output, seed2: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousRandomSeedGenerator", |nd| { nd.add_input(seed); nd.add_input(seed2); @@ -2297,24 +3173,60 @@ impl AnonymousRandomSeedGenerator { ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousRandomSeedGenerator` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, seed: O0, seed2: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(seed.into(), seed2.into(), scope) + } + fn build_instance_impl(&self, seed: crate::Output, seed2: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousRandomSeedGenerator", |nd| { + nd.add_input(seed); + nd.add_input(seed2); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousRandomSeedGeneratorInst{op}) + } +} +impl AnonymousRandomSeedGeneratorInst { + /// Returns the 'handle' output of this 'AnonymousRandomSeedGenerator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'deleter' output of this 'AnonymousRandomSeedGenerator' operation. + pub fn deleter(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for AnonymousRandomSeedGeneratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousRandomSeedGenerator::new().build(seed, seed2, scope)`. -pub fn anonymous_random_seed_generator< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - seed: O0, - seed2: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn anonymous_random_seed_generator, O1: ::std::convert::Into>(seed: O0, seed2: O1, scope: &mut crate::Scope) -> crate::Result { AnonymousRandomSeedGenerator::new().build(seed, seed2, scope) } + /// Builder for the `AnonymousSeedGenerator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AnonymousSeedGenerator { control_inputs: ::std::vec::Vec, } +/// An instance of 'AnonymousSeedGenerator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnonymousSeedGeneratorInst { + /// An instance of a fully built AnonymousSeedGenerator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AnonymousSeedGenerator { /// Creates a new `AnonymousSeedGenerator`. @@ -2329,27 +3241,10 @@ impl AnonymousSeedGenerator { } /// Builds the `AnonymousSeedGenerator` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - seed: O0, - seed2: O1, - reshuffle: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, seed: O0, seed2: O1, reshuffle: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(seed.into(), seed2.into(), reshuffle.into(), scope) } - - fn build_impl( - &self, - seed: crate::Output, - seed2: crate::Output, - reshuffle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, seed: crate::Output, seed2: crate::Output, reshuffle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AnonymousSeedGenerator", |nd| { nd.add_input(seed); nd.add_input(seed2); @@ -2360,21 +3255,50 @@ impl AnonymousSeedGenerator { ::std::result::Result::Ok(()) }) } -} + /// Builds the `AnonymousSeedGenerator` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, seed: O0, seed2: O1, reshuffle: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(seed.into(), seed2.into(), reshuffle.into(), scope) + } + fn build_instance_impl(&self, seed: crate::Output, seed2: crate::Output, reshuffle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AnonymousSeedGenerator", |nd| { + nd.add_input(seed); + nd.add_input(seed2); + nd.add_input(reshuffle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(AnonymousSeedGeneratorInst{op}) + } +} +impl AnonymousSeedGeneratorInst { + /// Returns the 'handle' output of this 'AnonymousSeedGenerator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'deleter' output of this 'AnonymousSeedGenerator' operation. + pub fn deleter(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for AnonymousSeedGeneratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AnonymousSeedGenerator::new().build(seed, seed2, reshuffle, scope)`. -pub fn anonymous_seed_generator< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - seed: O0, - seed2: O1, - reshuffle: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn anonymous_seed_generator, O1: ::std::convert::Into, O2: ::std::convert::Into>(seed: O0, seed2: O1, reshuffle: O2, scope: &mut crate::Scope) -> crate::Result { AnonymousSeedGenerator::new().build(seed, seed2, reshuffle, scope) } + /// Builder for the `Any` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Any { @@ -2382,6 +3306,12 @@ pub struct Any { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Any' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AnyInst { + /// An instance of a fully built Any Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Any { /// Creates a new `Any`. @@ -2408,49 +3338,67 @@ impl Any { } /// Builds the `Any` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), reduction_indices.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - reduction_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Any", |nd| { nd.add_input(input); nd.add_input(reduction_indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Any` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), reduction_indices.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Any", |nd| { + nd.add_input(input); + nd.add_input(reduction_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AnyInst{op}) + } +} +impl AnyInst { + /// Returns the 'output' output of this 'Any' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AnyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Any::new().build(input, reduction_indices, scope)`. -pub fn any, O1: ::std::convert::Into>( - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn any, O1: ::std::convert::Into>(input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { Any::new().build(input, reduction_indices, scope) } + /// Builder for the `ApplyAdaMax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyAdaMax { @@ -2458,6 +3406,12 @@ pub struct ApplyAdaMax { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyAdaMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyAdaMaxInst { + /// An instance of a fully built ApplyAdaMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyAdaMax { /// Creates a new `ApplyAdaMax`. @@ -2484,56 +3438,10 @@ impl ApplyAdaMax { } /// Builds the `ApplyAdaMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - m: O1, - v: O2, - beta1_power: O3, - lr: O4, - beta1: O5, - beta2: O6, - epsilon: O7, - grad: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - m.into(), - v.into(), - beta1_power.into(), - lr.into(), - beta1.into(), - beta2.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - m: crate::Output, - v: crate::Output, - beta1_power: crate::Output, - lr: crate::Output, - beta1: crate::Output, - beta2: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, m: O1, v: O2, beta1_power: O3, lr: O4, beta1: O5, beta2: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), m.into(), v.into(), beta1_power.into(), lr.into(), beta1.into(), beta2.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, m: crate::Output, v: crate::Output, beta1_power: crate::Output, lr: crate::Output, beta1: crate::Output, beta2: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyAdaMax", |nd| { nd.add_input(var); nd.add_input(m); @@ -2547,53 +3455,64 @@ impl ApplyAdaMax { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyAdaMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, m: O1, v: O2, beta1_power: O3, lr: O4, beta1: O5, beta2: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), m.into(), v.into(), beta1_power.into(), lr.into(), beta1.into(), beta2.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, m: crate::Output, v: crate::Output, beta1_power: crate::Output, lr: crate::Output, beta1: crate::Output, beta2: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyAdaMax", |nd| { + nd.add_input(var); + nd.add_input(m); + nd.add_input(v); + nd.add_input(beta1_power); + nd.add_input(lr); + nd.add_input(beta1); + nd.add_input(beta2); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyAdaMaxInst{op}) + } +} +impl ApplyAdaMaxInst { + /// Returns the 'out' output of this 'ApplyAdaMax' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyAdaMaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyAdaMax::new().build(var, m, v, beta1_power, lr, beta1, beta2, epsilon, grad, scope)`. -pub fn apply_ada_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - m: O1, - v: O2, - beta1_power: O3, - lr: O4, - beta1: O5, - beta2: O6, - epsilon: O7, - grad: O8, - scope: &mut crate::Scope, -) -> crate::Result { - ApplyAdaMax::new().build( - var, - m, - v, - beta1_power, - lr, - beta1, - beta2, - epsilon, - grad, - scope, - ) +pub fn apply_ada_max, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, m: O1, v: O2, beta1_power: O3, lr: O4, beta1: O5, beta2: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + ApplyAdaMax::new().build(var, m, v, beta1_power, lr, beta1, beta2, epsilon, grad, scope) } + /// Builder for the `ApplyAdadelta` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyAdadelta { @@ -2601,6 +3520,12 @@ pub struct ApplyAdadelta { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyAdadelta' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyAdadeltaInst { + /// An instance of a fully built ApplyAdadelta Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyAdadelta { /// Creates a new `ApplyAdadelta`. @@ -2627,48 +3552,10 @@ impl ApplyAdadelta { } /// Builds the `ApplyAdadelta` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - accum_update: O2, - lr: O3, - rho: O4, - epsilon: O5, - grad: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - accum_update.into(), - lr.into(), - rho.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - accum_update: crate::Output, - lr: crate::Output, - rho: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), accum_update.into(), lr.into(), rho.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, accum_update: crate::Output, lr: crate::Output, rho: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyAdadelta", |nd| { nd.add_input(var); nd.add_input(accum); @@ -2680,38 +3567,62 @@ impl ApplyAdadelta { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyAdadelta` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), accum_update.into(), lr.into(), rho.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, accum_update: crate::Output, lr: crate::Output, rho: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyAdadelta", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(accum_update); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyAdadeltaInst{op}) + } +} +impl ApplyAdadeltaInst { + /// Returns the 'out' output of this 'ApplyAdadelta' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyAdadeltaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyAdadelta::new().build(var, accum, accum_update, lr, rho, epsilon, grad, scope)`. -pub fn apply_adadelta< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - var: O0, - accum: O1, - accum_update: O2, - lr: O3, - rho: O4, - epsilon: O5, - grad: O6, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_adadelta, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { ApplyAdadelta::new().build(var, accum, accum_update, lr, rho, epsilon, grad, scope) } + /// Builder for the `ApplyAdagrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyAdagrad { @@ -2720,6 +3631,12 @@ pub struct ApplyAdagrad { update_slots: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyAdagrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyAdagradInst { + /// An instance of a fully built ApplyAdagrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyAdagrad { /// Creates a new `ApplyAdagrad`. @@ -2752,30 +3669,10 @@ impl ApplyAdagrad { } /// Builds the `ApplyAdagrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - grad: O3, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, scope: &mut crate::Scope) -> crate::Result { self.build_impl(var.into(), accum.into(), lr.into(), grad.into(), scope) } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyAdagrad", |nd| { nd.add_input(var); nd.add_input(accum); @@ -2784,35 +3681,65 @@ impl ApplyAdagrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.update_slots { - nd.set_attr_bool("update_slots", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyAdagrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyAdagrad", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyAdagradInst{op}) + } +} +impl ApplyAdagradInst { + /// Returns the 'out' output of this 'ApplyAdagrad' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyAdagradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyAdagrad::new().build(var, accum, lr, grad, scope)`. -pub fn apply_adagrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - grad: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_adagrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(var: O0, accum: O1, lr: O2, grad: O3, scope: &mut crate::Scope) -> crate::Result { ApplyAdagrad::new().build(var, accum, lr, grad, scope) } + /// Builder for the `ApplyAdagradDA` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyAdagradDA { @@ -2820,6 +3747,12 @@ pub struct ApplyAdagradDA { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyAdagradDA' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyAdagradDAInst { + /// An instance of a fully built ApplyAdagradDA Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyAdagradDA { /// Creates a new `ApplyAdagradDA`. @@ -2846,52 +3779,10 @@ impl ApplyAdagradDA { } /// Builds the `ApplyAdagradDA` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - var: O0, - gradient_accumulator: O1, - gradient_squared_accumulator: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - global_step: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - gradient_accumulator.into(), - gradient_squared_accumulator.into(), - grad.into(), - lr.into(), - l1.into(), - l2.into(), - global_step.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - gradient_accumulator: crate::Output, - gradient_squared_accumulator: crate::Output, - grad: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - global_step: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, lr: O4, l1: O5, l2: O6, global_step: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), gradient_accumulator.into(), gradient_squared_accumulator.into(), grad.into(), lr.into(), l1.into(), l2.into(), global_step.into(), scope) + } + fn build_impl(&self, var: crate::Output, gradient_accumulator: crate::Output, gradient_squared_accumulator: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyAdagradDA", |nd| { nd.add_input(var); nd.add_input(gradient_accumulator); @@ -2904,50 +3795,63 @@ impl ApplyAdagradDA { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyAdagradDA` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, lr: O4, l1: O5, l2: O6, global_step: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), gradient_accumulator.into(), gradient_squared_accumulator.into(), grad.into(), lr.into(), l1.into(), l2.into(), global_step.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, gradient_accumulator: crate::Output, gradient_squared_accumulator: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyAdagradDA", |nd| { + nd.add_input(var); + nd.add_input(gradient_accumulator); + nd.add_input(gradient_squared_accumulator); + nd.add_input(grad); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(global_step); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyAdagradDAInst{op}) + } +} +impl ApplyAdagradDAInst { + /// Returns the 'out' output of this 'ApplyAdagradDA' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyAdagradDAInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyAdagradDA::new().build(var, gradient_accumulator, gradient_squared_accumulator, grad, lr, l1, l2, global_step, scope)`. -pub fn apply_adagrad_da< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - var: O0, - gradient_accumulator: O1, - gradient_squared_accumulator: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - global_step: O7, - scope: &mut crate::Scope, -) -> crate::Result { - ApplyAdagradDA::new().build( - var, - gradient_accumulator, - gradient_squared_accumulator, - grad, - lr, - l1, - l2, - global_step, - scope, - ) +pub fn apply_adagrad_da, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, lr: O4, l1: O5, l2: O6, global_step: O7, scope: &mut crate::Scope) -> crate::Result { + ApplyAdagradDA::new().build(var, gradient_accumulator, gradient_squared_accumulator, grad, lr, l1, l2, global_step, scope) } + /// Builder for the `ApplyAdagradV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyAdagradV2 { @@ -2956,6 +3860,12 @@ pub struct ApplyAdagradV2 { update_slots: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyAdagradV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyAdagradV2Inst { + /// An instance of a fully built ApplyAdagradV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyAdagradV2 { /// Creates a new `ApplyAdagradV2`. @@ -2988,40 +3898,10 @@ impl ApplyAdagradV2 { } /// Builds the `ApplyAdagradV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - epsilon: O3, - grad: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyAdagradV2", |nd| { nd.add_input(var); nd.add_input(accum); @@ -3031,37 +3911,66 @@ impl ApplyAdagradV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.update_slots { - nd.set_attr_bool("update_slots", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyAdagradV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyAdagradV2", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyAdagradV2Inst{op}) + } +} +impl ApplyAdagradV2Inst { + /// Returns the 'out' output of this 'ApplyAdagradV2' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyAdagradV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyAdagradV2::new().build(var, accum, lr, epsilon, grad, scope)`. -pub fn apply_adagrad_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - epsilon: O3, - grad: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_adagrad_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, scope: &mut crate::Scope) -> crate::Result { ApplyAdagradV2::new().build(var, accum, lr, epsilon, grad, scope) } + /// Builder for the `ApplyAdam` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyAdam { @@ -3070,6 +3979,12 @@ pub struct ApplyAdam { use_nesterov: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyAdam' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyAdamInst { + /// An instance of a fully built ApplyAdam Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyAdam { /// Creates a new `ApplyAdam`. @@ -3102,60 +4017,10 @@ impl ApplyAdam { } /// Builds the `ApplyAdam` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - var: O0, - m: O1, - v: O2, - beta1_power: O3, - beta2_power: O4, - lr: O5, - beta1: O6, - beta2: O7, - epsilon: O8, - grad: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - m.into(), - v.into(), - beta1_power.into(), - beta2_power.into(), - lr.into(), - beta1.into(), - beta2.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - m: crate::Output, - v: crate::Output, - beta1_power: crate::Output, - beta2_power: crate::Output, - lr: crate::Output, - beta1: crate::Output, - beta2: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, m: O1, v: O2, beta1_power: O3, beta2_power: O4, lr: O5, beta1: O6, beta2: O7, epsilon: O8, grad: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), m.into(), v.into(), beta1_power.into(), beta2_power.into(), lr.into(), beta1.into(), beta2.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, m: crate::Output, v: crate::Output, beta1_power: crate::Output, beta2_power: crate::Output, lr: crate::Output, beta1: crate::Output, beta2: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyAdam", |nd| { nd.add_input(var); nd.add_input(m); @@ -3170,59 +4035,71 @@ impl ApplyAdam { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_nesterov { - nd.set_attr_bool("use_nesterov", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyAdam` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, m: O1, v: O2, beta1_power: O3, beta2_power: O4, lr: O5, beta1: O6, beta2: O7, epsilon: O8, grad: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), m.into(), v.into(), beta1_power.into(), beta2_power.into(), lr.into(), beta1.into(), beta2.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, m: crate::Output, v: crate::Output, beta1_power: crate::Output, beta2_power: crate::Output, lr: crate::Output, beta1: crate::Output, beta2: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyAdam", |nd| { + nd.add_input(var); + nd.add_input(m); + nd.add_input(v); + nd.add_input(beta1_power); + nd.add_input(beta2_power); + nd.add_input(lr); + nd.add_input(beta1); + nd.add_input(beta2); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyAdamInst{op}) + } +} +impl ApplyAdamInst { + /// Returns the 'out' output of this 'ApplyAdam' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyAdamInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyAdam::new().build(var, m, v, beta1_power, beta2_power, lr, beta1, beta2, epsilon, grad, scope)`. -pub fn apply_adam< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - var: O0, - m: O1, - v: O2, - beta1_power: O3, - beta2_power: O4, - lr: O5, - beta1: O6, - beta2: O7, - epsilon: O8, - grad: O9, - scope: &mut crate::Scope, -) -> crate::Result { - ApplyAdam::new().build( - var, - m, - v, - beta1_power, - beta2_power, - lr, - beta1, - beta2, - epsilon, - grad, - scope, - ) +pub fn apply_adam, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(var: O0, m: O1, v: O2, beta1_power: O3, beta2_power: O4, lr: O5, beta1: O6, beta2: O7, epsilon: O8, grad: O9, scope: &mut crate::Scope) -> crate::Result { + ApplyAdam::new().build(var, m, v, beta1_power, beta2_power, lr, beta1, beta2, epsilon, grad, scope) } + /// Builder for the `ApplyAddSign` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyAddSign { @@ -3230,6 +4107,12 @@ pub struct ApplyAddSign { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyAddSign' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyAddSignInst { + /// An instance of a fully built ApplyAddSign Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyAddSign { /// Creates a new `ApplyAddSign`. @@ -3256,48 +4139,10 @@ impl ApplyAddSign { } /// Builds the `ApplyAddSign` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - var: O0, - m: O1, - lr: O2, - alpha: O3, - sign_decay: O4, - beta: O5, - grad: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - m.into(), - lr.into(), - alpha.into(), - sign_decay.into(), - beta.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - m: crate::Output, - lr: crate::Output, - alpha: crate::Output, - sign_decay: crate::Output, - beta: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, m: O1, lr: O2, alpha: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), m.into(), lr.into(), alpha.into(), sign_decay.into(), beta.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, m: crate::Output, lr: crate::Output, alpha: crate::Output, sign_decay: crate::Output, beta: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyAddSign", |nd| { nd.add_input(var); nd.add_input(m); @@ -3309,38 +4154,62 @@ impl ApplyAddSign { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyAddSign` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, m: O1, lr: O2, alpha: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), m.into(), lr.into(), alpha.into(), sign_decay.into(), beta.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, m: crate::Output, lr: crate::Output, alpha: crate::Output, sign_decay: crate::Output, beta: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyAddSign", |nd| { + nd.add_input(var); + nd.add_input(m); + nd.add_input(lr); + nd.add_input(alpha); + nd.add_input(sign_decay); + nd.add_input(beta); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyAddSignInst{op}) + } +} +impl ApplyAddSignInst { + /// Returns the 'out' output of this 'ApplyAddSign' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyAddSignInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyAddSign::new().build(var, m, lr, alpha, sign_decay, beta, grad, scope)`. -pub fn apply_add_sign< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - var: O0, - m: O1, - lr: O2, - alpha: O3, - sign_decay: O4, - beta: O5, - grad: O6, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_add_sign, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(var: O0, m: O1, lr: O2, alpha: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { ApplyAddSign::new().build(var, m, lr, alpha, sign_decay, beta, grad, scope) } + /// Builder for the `ApplyCenteredRMSProp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyCenteredRMSProp { @@ -3348,6 +4217,12 @@ pub struct ApplyCenteredRMSProp { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyCenteredRMSProp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyCenteredRMSPropInst { + /// An instance of a fully built ApplyCenteredRMSProp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyCenteredRMSProp { /// Creates a new `ApplyCenteredRMSProp`. @@ -3374,56 +4249,10 @@ impl ApplyCenteredRMSProp { } /// Builds the `ApplyCenteredRMSProp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - mg: O1, - ms: O2, - mom: O3, - lr: O4, - rho: O5, - momentum: O6, - epsilon: O7, - grad: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - mg.into(), - ms.into(), - mom.into(), - lr.into(), - rho.into(), - momentum.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - mg: crate::Output, - ms: crate::Output, - mom: crate::Output, - lr: crate::Output, - rho: crate::Output, - momentum: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), mg.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, mg: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyCenteredRMSProp", |nd| { nd.add_input(var); nd.add_input(mg); @@ -3437,42 +4266,64 @@ impl ApplyCenteredRMSProp { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyCenteredRMSProp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), mg.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, mg: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyCenteredRMSProp", |nd| { + nd.add_input(var); + nd.add_input(mg); + nd.add_input(ms); + nd.add_input(mom); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(momentum); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyCenteredRMSPropInst{op}) + } +} +impl ApplyCenteredRMSPropInst { + /// Returns the 'out' output of this 'ApplyCenteredRMSProp' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyCenteredRMSPropInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyCenteredRMSProp::new().build(var, mg, ms, mom, lr, rho, momentum, epsilon, grad, scope)`. -pub fn apply_centered_rmsprop< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - mg: O1, - ms: O2, - mom: O3, - lr: O4, - rho: O5, - momentum: O6, - epsilon: O7, - grad: O8, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_centered_rmsprop, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { ApplyCenteredRMSProp::new().build(var, mg, ms, mom, lr, rho, momentum, epsilon, grad, scope) } + /// Builder for the `ApplyFtrl` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyFtrl { @@ -3481,6 +4332,12 @@ pub struct ApplyFtrl { multiply_linear_by_lr: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyFtrl' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyFtrlInst { + /// An instance of a fully built ApplyFtrl Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyFtrl { /// Creates a new `ApplyFtrl`. @@ -3501,10 +4358,7 @@ impl ApplyFtrl { } /// Sets the `multiply_linear_by_lr` attribute. - pub fn multiply_linear_by_lr>( - mut self, - value: ArgType, - ) -> Self { + pub fn multiply_linear_by_lr>(mut self, value: ArgType) -> Self { self.multiply_linear_by_lr = ::std::option::Option::Some(value.into()); self } @@ -3516,52 +4370,10 @@ impl ApplyFtrl { } /// Builds the `ApplyFtrl` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - linear: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - lr_power: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - linear.into(), - grad.into(), - lr.into(), - l1.into(), - l2.into(), - lr_power.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - linear: crate::Output, - grad: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - lr_power: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, lr_power: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), linear.into(), grad.into(), lr.into(), l1.into(), l2.into(), lr_power.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyFtrl", |nd| { nd.add_input(var); nd.add_input(accum); @@ -3574,43 +4386,69 @@ impl ApplyFtrl { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { - nd.set_attr_bool("multiply_linear_by_lr", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyFtrl` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, lr_power: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), linear.into(), grad.into(), lr.into(), l1.into(), l2.into(), lr_power.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyFtrl", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(linear); + nd.add_input(grad); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(lr_power); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyFtrlInst{op}) + } +} +impl ApplyFtrlInst { + /// Returns the 'out' output of this 'ApplyFtrl' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyFtrlInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyFtrl::new().build(var, accum, linear, grad, lr, l1, l2, lr_power, scope)`. -pub fn apply_ftrl< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - var: O0, - accum: O1, - linear: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - lr_power: O7, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_ftrl, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, lr_power: O7, scope: &mut crate::Scope) -> crate::Result { ApplyFtrl::new().build(var, accum, linear, grad, lr, l1, l2, lr_power, scope) } + /// Builder for the `ApplyFtrlV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyFtrlV2 { @@ -3619,6 +4457,12 @@ pub struct ApplyFtrlV2 { multiply_linear_by_lr: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyFtrlV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyFtrlV2Inst { + /// An instance of a fully built ApplyFtrlV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyFtrlV2 { /// Creates a new `ApplyFtrlV2`. @@ -3639,10 +4483,7 @@ impl ApplyFtrlV2 { } /// Sets the `multiply_linear_by_lr` attribute. - pub fn multiply_linear_by_lr>( - mut self, - value: ArgType, - ) -> Self { + pub fn multiply_linear_by_lr>(mut self, value: ArgType) -> Self { self.multiply_linear_by_lr = ::std::option::Option::Some(value.into()); self } @@ -3654,56 +4495,10 @@ impl ApplyFtrlV2 { } /// Builds the `ApplyFtrlV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - linear: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - l2_shrinkage: O7, - lr_power: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - linear.into(), - grad.into(), - lr.into(), - l1.into(), - l2.into(), - l2_shrinkage.into(), - lr_power.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - linear: crate::Output, - grad: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - l2_shrinkage: crate::Output, - lr_power: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, l2_shrinkage: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), linear.into(), grad.into(), lr.into(), l1.into(), l2.into(), l2_shrinkage.into(), lr_power.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, l2_shrinkage: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyFtrlV2", |nd| { nd.add_input(var); nd.add_input(accum); @@ -3717,56 +4512,70 @@ impl ApplyFtrlV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { - nd.set_attr_bool("multiply_linear_by_lr", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyFtrlV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, l2_shrinkage: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), linear.into(), grad.into(), lr.into(), l1.into(), l2.into(), l2_shrinkage.into(), lr_power.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, l2_shrinkage: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyFtrlV2", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(linear); + nd.add_input(grad); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(l2_shrinkage); + nd.add_input(lr_power); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyFtrlV2Inst{op}) + } +} +impl ApplyFtrlV2Inst { + /// Returns the 'out' output of this 'ApplyFtrlV2' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyFtrlV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyFtrlV2::new().build(var, accum, linear, grad, lr, l1, l2, l2_shrinkage, lr_power, scope)`. -pub fn apply_ftrl_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - accum: O1, - linear: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - l2_shrinkage: O7, - lr_power: O8, - scope: &mut crate::Scope, -) -> crate::Result { - ApplyFtrlV2::new().build( - var, - accum, - linear, - grad, - lr, - l1, - l2, - l2_shrinkage, - lr_power, - scope, - ) +pub fn apply_ftrl_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, l2_shrinkage: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + ApplyFtrlV2::new().build(var, accum, linear, grad, lr, l1, l2, l2_shrinkage, lr_power, scope) } + /// Builder for the `ApplyGradientDescent` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyGradientDescent { @@ -3774,6 +4583,12 @@ pub struct ApplyGradientDescent { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyGradientDescent' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyGradientDescentInst { + /// An instance of a fully built ApplyGradientDescent Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyGradientDescent { /// Creates a new `ApplyGradientDescent`. @@ -3800,27 +4615,10 @@ impl ApplyGradientDescent { } /// Builds the `ApplyGradientDescent` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - var: O0, - alpha: O1, - delta: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, var: O0, alpha: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(var.into(), alpha.into(), delta.into(), scope) } - - fn build_impl( - &self, - var: crate::Output, - alpha: crate::Output, - delta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, var: crate::Output, alpha: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyGradientDescent", |nd| { nd.add_input(var); nd.add_input(alpha); @@ -3828,30 +4626,58 @@ impl ApplyGradientDescent { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyGradientDescent` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, var: O0, alpha: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), alpha.into(), delta.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, alpha: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyGradientDescent", |nd| { + nd.add_input(var); + nd.add_input(alpha); + nd.add_input(delta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyGradientDescentInst{op}) + } +} +impl ApplyGradientDescentInst { + /// Returns the 'out' output of this 'ApplyGradientDescent' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyGradientDescentInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyGradientDescent::new().build(var, alpha, delta, scope)`. -pub fn apply_gradient_descent< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - var: O0, - alpha: O1, - delta: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_gradient_descent, O1: ::std::convert::Into, O2: ::std::convert::Into>(var: O0, alpha: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { ApplyGradientDescent::new().build(var, alpha, delta, scope) } + /// Builder for the `ApplyMomentum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyMomentum { @@ -3860,6 +4686,12 @@ pub struct ApplyMomentum { use_nesterov: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyMomentum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyMomentumInst { + /// An instance of a fully built ApplyMomentum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyMomentum { /// Creates a new `ApplyMomentum`. @@ -3892,40 +4724,10 @@ impl ApplyMomentum { } /// Builds the `ApplyMomentum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - grad: O3, - momentum: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - grad.into(), - momentum.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - grad: crate::Output, - momentum: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, momentum: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), grad.into(), momentum.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyMomentum", |nd| { nd.add_input(var); nd.add_input(accum); @@ -3935,37 +4737,66 @@ impl ApplyMomentum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_nesterov { - nd.set_attr_bool("use_nesterov", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyMomentum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, momentum: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), grad.into(), momentum.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyMomentum", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(grad); + nd.add_input(momentum); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyMomentumInst{op}) + } +} +impl ApplyMomentumInst { + /// Returns the 'out' output of this 'ApplyMomentum' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyMomentumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyMomentum::new().build(var, accum, lr, grad, momentum, scope)`. -pub fn apply_momentum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - grad: O3, - momentum: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_momentum, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(var: O0, accum: O1, lr: O2, grad: O3, momentum: O4, scope: &mut crate::Scope) -> crate::Result { ApplyMomentum::new().build(var, accum, lr, grad, momentum, scope) } + /// Builder for the `ApplyPowerSign` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyPowerSign { @@ -3973,6 +4804,12 @@ pub struct ApplyPowerSign { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyPowerSign' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyPowerSignInst { + /// An instance of a fully built ApplyPowerSign Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyPowerSign { /// Creates a new `ApplyPowerSign`. @@ -3999,48 +4836,10 @@ impl ApplyPowerSign { } /// Builds the `ApplyPowerSign` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - var: O0, - m: O1, - lr: O2, - logbase: O3, - sign_decay: O4, - beta: O5, - grad: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - m.into(), - lr.into(), - logbase.into(), - sign_decay.into(), - beta.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - m: crate::Output, - lr: crate::Output, - logbase: crate::Output, - sign_decay: crate::Output, - beta: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, m: O1, lr: O2, logbase: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), m.into(), lr.into(), logbase.into(), sign_decay.into(), beta.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, m: crate::Output, lr: crate::Output, logbase: crate::Output, sign_decay: crate::Output, beta: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyPowerSign", |nd| { nd.add_input(var); nd.add_input(m); @@ -4052,38 +4851,62 @@ impl ApplyPowerSign { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyPowerSign` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, m: O1, lr: O2, logbase: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), m.into(), lr.into(), logbase.into(), sign_decay.into(), beta.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, m: crate::Output, lr: crate::Output, logbase: crate::Output, sign_decay: crate::Output, beta: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyPowerSign", |nd| { + nd.add_input(var); + nd.add_input(m); + nd.add_input(lr); + nd.add_input(logbase); + nd.add_input(sign_decay); + nd.add_input(beta); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyPowerSignInst{op}) + } +} +impl ApplyPowerSignInst { + /// Returns the 'out' output of this 'ApplyPowerSign' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyPowerSignInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyPowerSign::new().build(var, m, lr, logbase, sign_decay, beta, grad, scope)`. -pub fn apply_power_sign< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - var: O0, - m: O1, - lr: O2, - logbase: O3, - sign_decay: O4, - beta: O5, - grad: O6, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_power_sign, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(var: O0, m: O1, lr: O2, logbase: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { ApplyPowerSign::new().build(var, m, lr, logbase, sign_decay, beta, grad, scope) } + /// Builder for the `ApplyProximalAdagrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyProximalAdagrad { @@ -4091,6 +4914,12 @@ pub struct ApplyProximalAdagrad { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyProximalAdagrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyProximalAdagradInst { + /// An instance of a fully built ApplyProximalAdagrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyProximalAdagrad { /// Creates a new `ApplyProximalAdagrad`. @@ -4117,44 +4946,10 @@ impl ApplyProximalAdagrad { } /// Builds the `ApplyProximalAdagrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - l1: O3, - l2: O4, - grad: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - l1.into(), - l2.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), l1.into(), l2.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyProximalAdagrad", |nd| { nd.add_input(var); nd.add_input(accum); @@ -4165,36 +4960,61 @@ impl ApplyProximalAdagrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyProximalAdagrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), l1.into(), l2.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyProximalAdagrad", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyProximalAdagradInst{op}) + } +} +impl ApplyProximalAdagradInst { + /// Returns the 'out' output of this 'ApplyProximalAdagrad' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyProximalAdagradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyProximalAdagrad::new().build(var, accum, lr, l1, l2, grad, scope)`. -pub fn apply_proximal_adagrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - l1: O3, - l2: O4, - grad: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_proximal_adagrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, scope: &mut crate::Scope) -> crate::Result { ApplyProximalAdagrad::new().build(var, accum, lr, l1, l2, grad, scope) } + /// Builder for the `ApplyProximalGradientDescent` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyProximalGradientDescent { @@ -4202,6 +5022,12 @@ pub struct ApplyProximalGradientDescent { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyProximalGradientDescent' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyProximalGradientDescentInst { + /// An instance of a fully built ApplyProximalGradientDescent Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyProximalGradientDescent { /// Creates a new `ApplyProximalGradientDescent`. @@ -4228,40 +5054,10 @@ impl ApplyProximalGradientDescent { } /// Builds the `ApplyProximalGradientDescent` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - var: O0, - alpha: O1, - l1: O2, - l2: O3, - delta: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - alpha.into(), - l1.into(), - l2.into(), - delta.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - alpha: crate::Output, - l1: crate::Output, - l2: crate::Output, - delta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, alpha: O1, l1: O2, l2: O3, delta: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), alpha.into(), l1.into(), l2.into(), delta.into(), scope) + } + fn build_impl(&self, var: crate::Output, alpha: crate::Output, l1: crate::Output, l2: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyProximalGradientDescent", |nd| { nd.add_input(var); nd.add_input(alpha); @@ -4271,34 +5067,60 @@ impl ApplyProximalGradientDescent { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyProximalGradientDescent` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, alpha: O1, l1: O2, l2: O3, delta: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), alpha.into(), l1.into(), l2.into(), delta.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, alpha: crate::Output, l1: crate::Output, l2: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyProximalGradientDescent", |nd| { + nd.add_input(var); + nd.add_input(alpha); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(delta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyProximalGradientDescentInst{op}) + } +} +impl ApplyProximalGradientDescentInst { + /// Returns the 'out' output of this 'ApplyProximalGradientDescent' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyProximalGradientDescentInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyProximalGradientDescent::new().build(var, alpha, l1, l2, delta, scope)`. -pub fn apply_proximal_gradient_descent< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - var: O0, - alpha: O1, - l1: O2, - l2: O3, - delta: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_proximal_gradient_descent, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(var: O0, alpha: O1, l1: O2, l2: O3, delta: O4, scope: &mut crate::Scope) -> crate::Result { ApplyProximalGradientDescent::new().build(var, alpha, l1, l2, delta, scope) } + /// Builder for the `ApplyRMSProp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApplyRMSProp { @@ -4306,6 +5128,12 @@ pub struct ApplyRMSProp { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApplyRMSProp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApplyRMSPropInst { + /// An instance of a fully built ApplyRMSProp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApplyRMSProp { /// Creates a new `ApplyRMSProp`. @@ -4332,52 +5160,10 @@ impl ApplyRMSProp { } /// Builds the `ApplyRMSProp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - var: O0, - ms: O1, - mom: O2, - lr: O3, - rho: O4, - momentum: O5, - epsilon: O6, - grad: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - ms.into(), - mom.into(), - lr.into(), - rho.into(), - momentum.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - ms: crate::Output, - mom: crate::Output, - lr: crate::Output, - rho: crate::Output, - momentum: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApplyRMSProp", |nd| { nd.add_input(var); nd.add_input(ms); @@ -4390,40 +5176,233 @@ impl ApplyRMSProp { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApplyRMSProp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApplyRMSProp", |nd| { + nd.add_input(var); + nd.add_input(ms); + nd.add_input(mom); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(momentum); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApplyRMSPropInst{op}) + } +} +impl ApplyRMSPropInst { + /// Returns the 'out' output of this 'ApplyRMSProp' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApplyRMSPropInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApplyRMSProp::new().build(var, ms, mom, lr, rho, momentum, epsilon, grad, scope)`. -pub fn apply_rmsprop< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - var: O0, - ms: O1, - mom: O2, - lr: O3, - rho: O4, - momentum: O5, - epsilon: O6, - grad: O7, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn apply_rmsprop, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, scope: &mut crate::Scope) -> crate::Result { ApplyRMSProp::new().build(var, ms, mom, lr, rho, momentum, epsilon, grad, scope) } + +/// Builder for the `ApproxTopK` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct ApproxTopK { + k: ::std::option::Option, + reduction_dimension: ::std::option::Option, + recall_target: ::std::option::Option, + is_max_k: ::std::option::Option, + reduction_input_size_override: ::std::option::Option, + aggregate_to_topk: ::std::option::Option, + T: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'ApproxTopK' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApproxTopKInst { + /// An instance of a fully built ApproxTopK Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl ApproxTopK { + /// Creates a new `ApproxTopK`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `k` attribute. + pub fn k>(mut self, value: ArgType) -> Self { + self.k = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `reduction_dimension` attribute. + pub fn reduction_dimension>(mut self, value: ArgType) -> Self { + self.reduction_dimension = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `recall_target` attribute. + pub fn recall_target>(mut self, value: ArgType) -> Self { + self.recall_target = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `is_max_k` attribute. + pub fn is_max_k>(mut self, value: ArgType) -> Self { + self.is_max_k = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `reduction_input_size_override` attribute. + pub fn reduction_input_size_override>(mut self, value: ArgType) -> Self { + self.reduction_input_size_override = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `aggregate_to_topk` attribute. + pub fn aggregate_to_topk>(mut self, value: ArgType) -> Self { + self.aggregate_to_topk = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `T` attribute. + pub fn T>(mut self, value: ArgType) -> Self { + self.T = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `ApproxTopK` operation. + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), scope) + } + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("ApproxTopK", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction_dimension { + nd.set_attr_int("reduction_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.recall_target { + nd.set_attr_float("recall_target", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_max_k { + nd.set_attr_bool("is_max_k", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction_input_size_override { + nd.set_attr_int("reduction_input_size_override", *value)?; + } + if let ::std::option::Option::Some(value) = &self.aggregate_to_topk { + nd.set_attr_bool("aggregate_to_topk", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ApproxTopK` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApproxTopK", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction_dimension { + nd.set_attr_int("reduction_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.recall_target { + nd.set_attr_float("recall_target", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_max_k { + nd.set_attr_bool("is_max_k", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction_input_size_override { + nd.set_attr_int("reduction_input_size_override", *value)?; + } + if let ::std::option::Option::Some(value) = &self.aggregate_to_topk { + nd.set_attr_bool("aggregate_to_topk", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApproxTopKInst{op}) + } +} +impl ApproxTopKInst { + /// Returns the 'values' output of this 'ApproxTopK' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'indices' output of this 'ApproxTopK' operation. + pub fn indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for ApproxTopKInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `ApproxTopK::new().build(input, scope)`. +pub fn approx_top_k>(input: O0, scope: &mut crate::Scope) -> crate::Result { + ApproxTopK::new().build(input, scope) +} + /// Builder for the `ApproximateEqual` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ApproximateEqual { @@ -4431,6 +5410,12 @@ pub struct ApproximateEqual { tolerance: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ApproximateEqual' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ApproximateEqualInst { + /// An instance of a fully built ApproximateEqual Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ApproximateEqual { /// Creates a new `ApproximateEqual`. @@ -4457,52 +5442,67 @@ impl ApproximateEqual { } /// Builds the `ApproximateEqual` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ApproximateEqual", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tolerance { - nd.set_attr_float("tolerance", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tolerance { + nd.set_attr_float("tolerance", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ApproximateEqual` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ApproximateEqual", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tolerance { + nd.set_attr_float("tolerance", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ApproximateEqualInst{op}) + } +} +impl ApproximateEqualInst { + /// Returns the 'z' output of this 'ApproximateEqual' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ApproximateEqualInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ApproximateEqual::new().build(x, y, scope)`. -pub fn approximate_equal< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn approximate_equal, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { ApproximateEqual::new().build(x, y, scope) } + /// Builder for the `ArgMax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ArgMax { @@ -4511,6 +5511,12 @@ pub struct ArgMax { output_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ArgMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ArgMaxInst { + /// An instance of a fully built ArgMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ArgMax { /// Creates a new `ArgMax`. @@ -4531,10 +5537,7 @@ impl ArgMax { } /// Sets the `output_type` attribute. - pub fn output_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_type>(mut self, value: ArgType) -> Self { self.output_type = ::std::option::Option::Some(value.into()); self } @@ -4546,52 +5549,73 @@ impl ArgMax { } /// Builds the `ArgMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - dimension: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, dimension: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), dimension.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - dimension: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, dimension: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ArgMax", |nd| { nd.add_input(input); nd.add_input(dimension); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_type { - nd.set_attr_type("output_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ArgMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, dimension: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), dimension.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, dimension: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ArgMax", |nd| { + nd.add_input(input); + nd.add_input(dimension); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ArgMaxInst{op}) + } +} +impl ArgMaxInst { + /// Returns the 'output' output of this 'ArgMax' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ArgMaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ArgMax::new().build(input, dimension, scope)`. -pub fn arg_max, O1: ::std::convert::Into>( - input: O0, - dimension: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn arg_max, O1: ::std::convert::Into>(input: O0, dimension: O1, scope: &mut crate::Scope) -> crate::Result { ArgMax::new().build(input, dimension, scope) } + /// Builder for the `ArgMin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ArgMin { @@ -4600,6 +5624,12 @@ pub struct ArgMin { output_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ArgMin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ArgMinInst { + /// An instance of a fully built ArgMin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ArgMin { /// Creates a new `ArgMin`. @@ -4620,10 +5650,7 @@ impl ArgMin { } /// Sets the `output_type` attribute. - pub fn output_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_type>(mut self, value: ArgType) -> Self { self.output_type = ::std::option::Option::Some(value.into()); self } @@ -4635,52 +5662,73 @@ impl ArgMin { } /// Builds the `ArgMin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - dimension: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, dimension: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), dimension.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - dimension: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, dimension: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ArgMin", |nd| { nd.add_input(input); nd.add_input(dimension); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_type { - nd.set_attr_type("output_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ArgMin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, dimension: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), dimension.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, dimension: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ArgMin", |nd| { + nd.add_input(input); + nd.add_input(dimension); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ArgMinInst{op}) + } +} +impl ArgMinInst { + /// Returns the 'output' output of this 'ArgMin' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ArgMinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ArgMin::new().build(input, dimension, scope)`. -pub fn arg_min, O1: ::std::convert::Into>( - input: O0, - dimension: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn arg_min, O1: ::std::convert::Into>(input: O0, dimension: O1, scope: &mut crate::Scope) -> crate::Result { ArgMin::new().build(input, dimension, scope) } + /// Builder for the `AsString` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AsString { @@ -4692,6 +5740,12 @@ pub struct AsString { fill: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'AsString' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AsStringInst { + /// An instance of a fully built AsString Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AsString { /// Creates a new `AsString`. @@ -4730,10 +5784,7 @@ impl AsString { } /// Sets the `fill` attribute. - pub fn fill>( - mut self, - value: ArgType, - ) -> Self { + pub fn fill>(mut self, value: ArgType) -> Self { self.fill = ::std::option::Option::Some(value.into()); self } @@ -4745,60 +5796,101 @@ impl AsString { } /// Builds the `AsString` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AsString", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.precision { - nd.set_attr_int("precision", *value)?; - } - if let ::std::option::Option::Some(value) = &self.scientific { - nd.set_attr_bool("scientific", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shortest { - nd.set_attr_bool("shortest", *value)?; - } - if let ::std::option::Option::Some(value) = &self.width { - nd.set_attr_int("width", *value)?; - } - if let ::std::option::Option::Some(value) = &self.fill { - nd.set_attr_string("fill", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.precision { + nd.set_attr_int("precision", *value)?; + } + if let ::std::option::Option::Some(value) = &self.scientific { + nd.set_attr_bool("scientific", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shortest { + nd.set_attr_bool("shortest", *value)?; + } + if let ::std::option::Option::Some(value) = &self.width { + nd.set_attr_int("width", *value)?; + } + if let ::std::option::Option::Some(value) = &self.fill { + nd.set_attr_string("fill", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AsString` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AsString", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.precision { + nd.set_attr_int("precision", *value)?; + } + if let ::std::option::Option::Some(value) = &self.scientific { + nd.set_attr_bool("scientific", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shortest { + nd.set_attr_bool("shortest", *value)?; + } + if let ::std::option::Option::Some(value) = &self.width { + nd.set_attr_int("width", *value)?; + } + if let ::std::option::Option::Some(value) = &self.fill { + nd.set_attr_string("fill", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AsStringInst{op}) + } +} +impl AsStringInst { + /// Returns the 'output' output of this 'AsString' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AsStringInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AsString::new().build(input, scope)`. -pub fn as_string>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn as_string>(input: O0, scope: &mut crate::Scope) -> crate::Result { AsString::new().build(input, scope) } + /// Builder for the `Asin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Asin { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Asin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AsinInst { + /// An instance of a fully built Asin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Asin { /// Creates a new `Asin`. @@ -4819,45 +5911,71 @@ impl Asin { } /// Builds the `Asin` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Asin", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Asin` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Asin", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AsinInst{op}) + } +} +impl AsinInst { + /// Returns the 'y' output of this 'Asin' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AsinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Asin::new().build(x, scope)`. -pub fn asin>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn asin>(x: O0, scope: &mut crate::Scope) -> crate::Result { Asin::new().build(x, scope) } + /// Builder for the `Asinh` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Asinh { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Asinh' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AsinhInst { + /// An instance of a fully built Asinh Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Asinh { /// Creates a new `Asinh`. @@ -4878,39 +5996,59 @@ impl Asinh { } /// Builds the `Asinh` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Asinh", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Asinh` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Asinh", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AsinhInst{op}) + } +} +impl AsinhInst { + /// Returns the 'y' output of this 'Asinh' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AsinhInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Asinh::new().build(x, scope)`. -pub fn asinh>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn asinh>(x: O0, scope: &mut crate::Scope) -> crate::Result { Asinh::new().build(x, scope) } + /// Builder for the `Assert` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Assert { @@ -4918,6 +6056,12 @@ pub struct Assert { summarize: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Assert' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssertInst { + /// An instance of a fully built Assert Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Assert { /// Creates a new `Assert`. @@ -4926,10 +6070,7 @@ impl Assert { } /// Sets the `T` attribute. - pub fn T>>( - mut self, - value: ArgType, - ) -> Self { + pub fn T>>(mut self, value: ArgType) -> Self { self.T = ::std::option::Option::Some(value.into()); self } @@ -4947,49 +6088,60 @@ impl Assert { } /// Builds the `Assert` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - condition: O0, - data: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, condition: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(condition.into(), data.into(), scope) } - - fn build_impl( - &self, - condition: crate::Output, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, condition: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Assert", |nd| { nd.add_input(condition); nd.add_input(data); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type_list("T", value)?; - } - if let ::std::option::Option::Some(value) = &self.summarize { - nd.set_attr_int("summarize", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.summarize { + nd.set_attr_int("summarize", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Assert` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, condition: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(condition.into(), data.into(), scope) + } + fn build_instance_impl(&self, condition: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Assert", |nd| { + nd.add_input(condition); + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.summarize { + nd.set_attr_int("summarize", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssertInst{op}) + } +} +impl AssertInst { +} +impl Into for AssertInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Assert::new().build(condition, data, scope)`. -pub fn assert, O1: ::std::convert::Into>( - condition: O0, - data: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn assert, O1: ::std::convert::Into>(condition: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { Assert::new().build(condition, data, scope) } + /// Builder for the `AssertCardinalityDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AssertCardinalityDataset { @@ -4997,6 +6149,12 @@ pub struct AssertCardinalityDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'AssertCardinalityDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssertCardinalityDatasetInst { + /// An instance of a fully built AssertCardinalityDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AssertCardinalityDataset { /// Creates a new `AssertCardinalityDataset`. @@ -5005,19 +6163,13 @@ impl AssertCardinalityDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -5029,52 +6181,67 @@ impl AssertCardinalityDataset { } /// Builds the `AssertCardinalityDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - cardinality: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, cardinality: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), cardinality.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - cardinality: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, cardinality: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AssertCardinalityDataset", |nd| { nd.add_input(input_dataset); nd.add_input(cardinality); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AssertCardinalityDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, cardinality: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), cardinality.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, cardinality: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AssertCardinalityDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(cardinality); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssertCardinalityDatasetInst{op}) + } +} +impl AssertCardinalityDatasetInst { + /// Returns the 'handle' output of this 'AssertCardinalityDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AssertCardinalityDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AssertCardinalityDataset::new().build(input_dataset, cardinality, scope)`. -pub fn assert_cardinality_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - cardinality: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn assert_cardinality_dataset, O1: ::std::convert::Into>(input_dataset: O0, cardinality: O1, scope: &mut crate::Scope) -> crate::Result { AssertCardinalityDataset::new().build(input_dataset, cardinality, scope) } + /// Builder for the `AssertNextDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AssertNextDataset { @@ -5082,6 +6249,12 @@ pub struct AssertNextDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'AssertNextDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssertNextDatasetInst { + /// An instance of a fully built AssertNextDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AssertNextDataset { /// Creates a new `AssertNextDataset`. @@ -5090,19 +6263,13 @@ impl AssertNextDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -5114,52 +6281,167 @@ impl AssertNextDataset { } /// Builds the `AssertNextDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - transformations: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, transformations: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), transformations.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - transformations: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, transformations: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AssertNextDataset", |nd| { nd.add_input(input_dataset); nd.add_input(transformations); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AssertNextDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, transformations: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), transformations.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, transformations: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AssertNextDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(transformations); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssertNextDatasetInst{op}) + } +} +impl AssertNextDatasetInst { + /// Returns the 'handle' output of this 'AssertNextDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AssertNextDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AssertNextDataset::new().build(input_dataset, transformations, scope)`. -pub fn assert_next_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - transformations: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn assert_next_dataset, O1: ::std::convert::Into>(input_dataset: O0, transformations: O1, scope: &mut crate::Scope) -> crate::Result { AssertNextDataset::new().build(input_dataset, transformations, scope) } + +/// Builder for the `AssertPrevDataset` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct AssertPrevDataset { + output_types: ::std::option::Option<::std::vec::Vec>, + output_shapes: ::std::option::Option<::std::vec::Vec>, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'AssertPrevDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssertPrevDatasetInst { + /// An instance of a fully built AssertPrevDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl AssertPrevDataset { + /// Creates a new `AssertPrevDataset`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `output_types` attribute. + pub fn output_types>>(mut self, value: ArgType) -> Self { + self.output_types = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `output_shapes` attribute. + pub fn output_shapes>>(mut self, value: ArgType) -> Self { + self.output_shapes = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `AssertPrevDataset` operation. + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, transformations: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), transformations.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, transformations: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("AssertPrevDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(transformations); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `AssertPrevDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, transformations: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), transformations.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, transformations: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AssertPrevDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(transformations); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssertPrevDatasetInst{op}) + } +} +impl AssertPrevDatasetInst { + /// Returns the 'handle' output of this 'AssertPrevDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AssertPrevDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `AssertPrevDataset::new().build(input_dataset, transformations, scope)`. +pub fn assert_prev_dataset, O1: ::std::convert::Into>(input_dataset: O0, transformations: O1, scope: &mut crate::Scope) -> crate::Result { + AssertPrevDataset::new().build(input_dataset, transformations, scope) +} + /// Builder for the `Assign` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Assign { @@ -5168,6 +6450,12 @@ pub struct Assign { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Assign' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssignInst { + /// An instance of a fully built Assign Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Assign { /// Creates a new `Assign`. @@ -5200,52 +6488,73 @@ impl Assign { } /// Builds the `Assign` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - ref_: O0, - value: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, ref_: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), value.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Assign", |nd| { nd.add_input(ref_); nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.validate_shape { - nd.set_attr_bool("validate_shape", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_shape { + nd.set_attr_bool("validate_shape", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Assign` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, ref_: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), value.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Assign", |nd| { + nd.add_input(ref_); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_shape { + nd.set_attr_bool("validate_shape", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssignInst{op}) + } +} +impl AssignInst { + /// Returns the 'output_ref' output of this 'Assign' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AssignInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Assign::new().build(ref_, value, scope)`. -pub fn assign, O1: ::std::convert::Into>( - ref_: O0, - value: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn assign, O1: ::std::convert::Into>(ref_: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { Assign::new().build(ref_, value, scope) } + /// Builder for the `AssignAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AssignAdd { @@ -5253,6 +6562,12 @@ pub struct AssignAdd { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AssignAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssignAddInst { + /// An instance of a fully built AssignAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AssignAdd { /// Creates a new `AssignAdd`. @@ -5279,58 +6594,79 @@ impl AssignAdd { } /// Builds the `AssignAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - ref_: O0, - value: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, ref_: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), value.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AssignAdd", |nd| { nd.add_input(ref_); nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AssignAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, ref_: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), value.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AssignAdd", |nd| { + nd.add_input(ref_); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssignAddInst{op}) + } +} +impl AssignAddInst { + /// Returns the 'output_ref' output of this 'AssignAdd' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AssignAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AssignAdd::new().build(ref_, value, scope)`. -pub fn assign_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - ref_: O0, - value: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn assign_add, O1: ::std::convert::Into>(ref_: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { AssignAdd::new().build(ref_, value, scope) } + /// Builder for the `AssignAddVariableOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AssignAddVariableOp { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AssignAddVariableOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssignAddVariableOpInst { + /// An instance of a fully built AssignAddVariableOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AssignAddVariableOp { /// Creates a new `AssignAddVariableOp`. @@ -5351,49 +6687,54 @@ impl AssignAddVariableOp { } /// Builds the `AssignAddVariableOp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - resource: O0, - value: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, resource: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), value.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AssignAddVariableOp", |nd| { nd.add_input(resource); nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AssignAddVariableOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, resource: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), value.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AssignAddVariableOp", |nd| { + nd.add_input(resource); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssignAddVariableOpInst{op}) + } +} +impl AssignAddVariableOpInst { +} +impl Into for AssignAddVariableOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AssignAddVariableOp::new().build(resource, value, scope)`. -pub fn assign_add_variable_op< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - resource: O0, - value: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn assign_add_variable_op, O1: ::std::convert::Into>(resource: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { AssignAddVariableOp::new().build(resource, value, scope) } + /// Builder for the `AssignSub` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AssignSub { @@ -5401,6 +6742,12 @@ pub struct AssignSub { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AssignSub' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssignSubInst { + /// An instance of a fully built AssignSub Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AssignSub { /// Creates a new `AssignSub`. @@ -5427,58 +6774,79 @@ impl AssignSub { } /// Builds the `AssignSub` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - ref_: O0, - value: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, ref_: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), value.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AssignSub", |nd| { nd.add_input(ref_); nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AssignSub` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, ref_: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), value.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AssignSub", |nd| { + nd.add_input(ref_); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssignSubInst{op}) + } +} +impl AssignSubInst { + /// Returns the 'output_ref' output of this 'AssignSub' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AssignSubInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AssignSub::new().build(ref_, value, scope)`. -pub fn assign_sub< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - ref_: O0, - value: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn assign_sub, O1: ::std::convert::Into>(ref_: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { AssignSub::new().build(ref_, value, scope) } + /// Builder for the `AssignSubVariableOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AssignSubVariableOp { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AssignSubVariableOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssignSubVariableOpInst { + /// An instance of a fully built AssignSubVariableOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AssignSubVariableOp { /// Creates a new `AssignSubVariableOp`. @@ -5499,49 +6867,54 @@ impl AssignSubVariableOp { } /// Builds the `AssignSubVariableOp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - resource: O0, - value: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, resource: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), value.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AssignSubVariableOp", |nd| { nd.add_input(resource); nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AssignSubVariableOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, resource: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), value.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AssignSubVariableOp", |nd| { + nd.add_input(resource); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssignSubVariableOpInst{op}) + } +} +impl AssignSubVariableOpInst { +} +impl Into for AssignSubVariableOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AssignSubVariableOp::new().build(resource, value, scope)`. -pub fn assign_sub_variable_op< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - resource: O0, - value: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn assign_sub_variable_op, O1: ::std::convert::Into>(resource: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { AssignSubVariableOp::new().build(resource, value, scope) } + /// Builder for the `AssignVariableOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AssignVariableOp { @@ -5549,6 +6922,12 @@ pub struct AssignVariableOp { validate_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AssignVariableOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssignVariableOpInst { + /// An instance of a fully built AssignVariableOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AssignVariableOp { /// Creates a new `AssignVariableOp`. @@ -5575,52 +6954,60 @@ impl AssignVariableOp { } /// Builds the `AssignVariableOp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - resource: O0, - value: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, resource: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), value.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AssignVariableOp", |nd| { nd.add_input(resource); nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.validate_shape { - nd.set_attr_bool("validate_shape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_shape { + nd.set_attr_bool("validate_shape", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AssignVariableOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, resource: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), value.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AssignVariableOp", |nd| { + nd.add_input(resource); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_shape { + nd.set_attr_bool("validate_shape", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssignVariableOpInst{op}) + } +} +impl AssignVariableOpInst { +} +impl Into for AssignVariableOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AssignVariableOp::new().build(resource, value, scope)`. -pub fn assign_variable_op< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - resource: O0, - value: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn assign_variable_op, O1: ::std::convert::Into>(resource: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { AssignVariableOp::new().build(resource, value, scope) } + /// Builder for the `AssignVariableXlaConcatND` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AssignVariableXlaConcatND { @@ -5630,6 +7017,12 @@ pub struct AssignVariableXlaConcatND { paddings: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'AssignVariableXlaConcatND' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AssignVariableXlaConcatNDInst { + /// An instance of a fully built AssignVariableXlaConcatND Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AssignVariableXlaConcatND { /// Creates a new `AssignVariableXlaConcatND`. @@ -5650,19 +7043,13 @@ impl AssignVariableXlaConcatND { } /// Sets the `num_concats` attribute. - pub fn num_concats>>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_concats>>(mut self, value: ArgType) -> Self { self.num_concats = ::std::option::Option::Some(value.into()); self } /// Sets the `paddings` attribute. - pub fn paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn paddings>>(mut self, value: ArgType) -> Self { self.paddings = ::std::option::Option::Some(value.into()); self } @@ -5674,64 +7061,84 @@ impl AssignVariableXlaConcatND { } /// Builds the `AssignVariableXlaConcatND` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - resource: O0, - inputs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, resource: O0, inputs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), inputs.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AssignVariableXlaConcatND", |nd| { nd.add_input(resource); nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_concats { - nd.set_attr_int_list("num_concats", value)?; - } - if let ::std::option::Option::Some(value) = &self.paddings { - nd.set_attr_int_list("paddings", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_concats { + nd.set_attr_int_list("num_concats", value)?; + } + if let ::std::option::Option::Some(value) = &self.paddings { + nd.set_attr_int_list("paddings", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AssignVariableXlaConcatND` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, resource: O0, inputs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), inputs.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AssignVariableXlaConcatND", |nd| { + nd.add_input(resource); + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_concats { + nd.set_attr_int_list("num_concats", value)?; + } + if let ::std::option::Option::Some(value) = &self.paddings { + nd.set_attr_int_list("paddings", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AssignVariableXlaConcatNDInst{op}) + } +} +impl AssignVariableXlaConcatNDInst { +} +impl Into for AssignVariableXlaConcatNDInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AssignVariableXlaConcatND::new().build(resource, inputs, scope)`. -pub fn assign_variable_xla_concat_nd< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - resource: O0, - inputs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn assign_variable_xla_concat_nd, O1: ::std::convert::Into>(resource: O0, inputs: O1, scope: &mut crate::Scope) -> crate::Result { AssignVariableXlaConcatND::new().build(resource, inputs, scope) } + /// Builder for the `Atan` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Atan { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Atan' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AtanInst { + /// An instance of a fully built Atan Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Atan { /// Creates a new `Atan`. @@ -5752,45 +7159,71 @@ impl Atan { } /// Builds the `Atan` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Atan", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Atan` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Atan", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AtanInst{op}) + } +} +impl AtanInst { + /// Returns the 'y' output of this 'Atan' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AtanInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Atan::new().build(x, scope)`. -pub fn atan>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn atan>(x: O0, scope: &mut crate::Scope) -> crate::Result { Atan::new().build(x, scope) } + /// Builder for the `Atan2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Atan2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Atan2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Atan2Inst { + /// An instance of a fully built Atan2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Atan2 { /// Creates a new `Atan2`. @@ -5811,52 +7244,73 @@ impl Atan2 { } /// Builds the `Atan2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - y: O0, - x: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, y: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(y.into(), x.into(), scope) } - - fn build_impl( - &self, - y: crate::Output, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, y: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Atan2", |nd| { nd.add_input(y); nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Atan2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, y: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(y.into(), x.into(), scope) + } + fn build_instance_impl(&self, y: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Atan2", |nd| { + nd.add_input(y); + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Atan2Inst{op}) + } +} +impl Atan2Inst { + /// Returns the 'z' output of this 'Atan2' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Atan2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Atan2::new().build(y, x, scope)`. -pub fn atan2, O1: ::std::convert::Into>( - y: O0, - x: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn atan2, O1: ::std::convert::Into>(y: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { Atan2::new().build(y, x, scope) } + /// Builder for the `Atanh` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Atanh { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Atanh' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AtanhInst { + /// An instance of a fully built Atanh Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Atanh { /// Creates a new `Atanh`. @@ -5877,39 +7331,59 @@ impl Atanh { } /// Builds the `Atanh` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Atanh", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Atanh` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Atanh", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AtanhInst{op}) + } +} +impl AtanhInst { + /// Returns the 'y' output of this 'Atanh' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AtanhInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Atanh::new().build(x, scope)`. -pub fn atanh>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn atanh>(x: O0, scope: &mut crate::Scope) -> crate::Result { Atanh::new().build(x, scope) } + /// Builder for the `AudioSpectrogram` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AudioSpectrogram { @@ -5918,6 +7392,12 @@ pub struct AudioSpectrogram { magnitude_squared: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AudioSpectrogram' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AudioSpectrogramInst { + /// An instance of a fully built AudioSpectrogram Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AudioSpectrogram { /// Creates a new `AudioSpectrogram`. @@ -5938,10 +7418,7 @@ impl AudioSpectrogram { } /// Sets the `magnitude_squared` attribute. - pub fn magnitude_squared>( - mut self, - value: ArgType, - ) -> Self { + pub fn magnitude_squared>(mut self, value: ArgType) -> Self { self.magnitude_squared = ::std::option::Option::Some(value.into()); self } @@ -5953,45 +7430,71 @@ impl AudioSpectrogram { } /// Builds the `AudioSpectrogram` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AudioSpectrogram", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.window_size { - nd.set_attr_int("window_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.stride { - nd.set_attr_int("stride", *value)?; - } - if let ::std::option::Option::Some(value) = &self.magnitude_squared { - nd.set_attr_bool("magnitude_squared", *value)?; - } + if let ::std::option::Option::Some(value) = &self.window_size { + nd.set_attr_int("window_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.stride { + nd.set_attr_int("stride", *value)?; + } + if let ::std::option::Option::Some(value) = &self.magnitude_squared { + nd.set_attr_bool("magnitude_squared", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AudioSpectrogram` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AudioSpectrogram", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.window_size { + nd.set_attr_int("window_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.stride { + nd.set_attr_int("stride", *value)?; + } + if let ::std::option::Option::Some(value) = &self.magnitude_squared { + nd.set_attr_bool("magnitude_squared", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AudioSpectrogramInst{op}) + } +} +impl AudioSpectrogramInst { + /// Returns the 'spectrogram' output of this 'AudioSpectrogram' operation. + pub fn spectrogram(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AudioSpectrogramInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AudioSpectrogram::new().build(input, scope)`. -pub fn audio_spectrogram>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn audio_spectrogram>(input: O0, scope: &mut crate::Scope) -> crate::Result { AudioSpectrogram::new().build(input, scope) } + /// Builder for the `AudioSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AudioSummary { @@ -5999,6 +7502,12 @@ pub struct AudioSummary { max_outputs: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AudioSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AudioSummaryInst { + /// An instance of a fully built AudioSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AudioSummary { /// Creates a new `AudioSummary`. @@ -6025,58 +7534,79 @@ impl AudioSummary { } /// Builds the `AudioSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tag: O0, - tensor: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tag: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tag.into(), tensor.into(), scope) } - - fn build_impl( - &self, - tag: crate::Output, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tag: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AudioSummary", |nd| { nd.add_input(tag); nd.add_input(tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.sample_rate { - nd.set_attr_float("sample_rate", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_outputs { - nd.set_attr_int("max_outputs", *value)?; - } + if let ::std::option::Option::Some(value) = &self.sample_rate { + nd.set_attr_float("sample_rate", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_outputs { + nd.set_attr_int("max_outputs", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AudioSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tag: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tag.into(), tensor.into(), scope) + } + fn build_instance_impl(&self, tag: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AudioSummary", |nd| { + nd.add_input(tag); + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.sample_rate { + nd.set_attr_float("sample_rate", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_outputs { + nd.set_attr_int("max_outputs", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AudioSummaryInst{op}) + } +} +impl AudioSummaryInst { + /// Returns the 'summary' output of this 'AudioSummary' operation. + pub fn summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AudioSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AudioSummary::new().build(tag, tensor, scope)`. -pub fn audio_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tag: O0, - tensor: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn audio_summary, O1: ::std::convert::Into>(tag: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { AudioSummary::new().build(tag, tensor, scope) } + /// Builder for the `AudioSummaryV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AudioSummaryV2 { max_outputs: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AudioSummaryV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AudioSummaryV2Inst { + /// An instance of a fully built AudioSummaryV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AudioSummaryV2 { /// Creates a new `AudioSummaryV2`. @@ -6097,27 +7627,10 @@ impl AudioSummaryV2 { } /// Builds the `AudioSummaryV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tag: O0, - tensor: O1, - sample_rate: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tag: O0, tensor: O1, sample_rate: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tag.into(), tensor.into(), sample_rate.into(), scope) } - - fn build_impl( - &self, - tag: crate::Output, - tensor: crate::Output, - sample_rate: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tag: crate::Output, tensor: crate::Output, sample_rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AudioSummaryV2", |nd| { nd.add_input(tag); nd.add_input(tensor); @@ -6125,27 +7638,52 @@ impl AudioSummaryV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.max_outputs { - nd.set_attr_int("max_outputs", *value)?; - } + if let ::std::option::Option::Some(value) = &self.max_outputs { + nd.set_attr_int("max_outputs", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AudioSummaryV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tag: O0, tensor: O1, sample_rate: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tag.into(), tensor.into(), sample_rate.into(), scope) + } + fn build_instance_impl(&self, tag: crate::Output, tensor: crate::Output, sample_rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AudioSummaryV2", |nd| { + nd.add_input(tag); + nd.add_input(tensor); + nd.add_input(sample_rate); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.max_outputs { + nd.set_attr_int("max_outputs", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AudioSummaryV2Inst{op}) + } +} +impl AudioSummaryV2Inst { + /// Returns the 'summary' output of this 'AudioSummaryV2' operation. + pub fn summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AudioSummaryV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AudioSummaryV2::new().build(tag, tensor, sample_rate, scope)`. -pub fn audio_summary_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tag: O0, - tensor: O1, - sample_rate: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn audio_summary_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(tag: O0, tensor: O1, sample_rate: O2, scope: &mut crate::Scope) -> crate::Result { AudioSummaryV2::new().build(tag, tensor, sample_rate, scope) } + /// Builder for the `AutoShardDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AutoShardDataset { @@ -6155,6 +7693,12 @@ pub struct AutoShardDataset { num_replicas: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AutoShardDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AutoShardDatasetInst { + /// An instance of a fully built AutoShardDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AutoShardDataset { /// Creates a new `AutoShardDataset`. @@ -6169,19 +7713,13 @@ impl AutoShardDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -6199,32 +7737,10 @@ impl AutoShardDataset { } /// Builds the `AutoShardDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - num_workers: O1, - index: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - num_workers.into(), - index.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - num_workers: crate::Output, - index: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_workers: O1, index: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), num_workers.into(), index.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, num_workers: crate::Output, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AutoShardDataset", |nd| { nd.add_input(input_dataset); nd.add_input(num_workers); @@ -6232,36 +7748,70 @@ impl AutoShardDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.auto_shard_policy { - nd.set_attr_int("auto_shard_policy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_replicas { - nd.set_attr_int("num_replicas", *value)?; - } + if let ::std::option::Option::Some(value) = &self.auto_shard_policy { + nd.set_attr_int("auto_shard_policy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_replicas { + nd.set_attr_int("num_replicas", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AutoShardDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_workers: O1, index: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), num_workers.into(), index.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, num_workers: crate::Output, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AutoShardDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(num_workers); + nd.add_input(index); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.auto_shard_policy { + nd.set_attr_int("auto_shard_policy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_replicas { + nd.set_attr_int("num_replicas", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AutoShardDatasetInst{op}) + } +} +impl AutoShardDatasetInst { + /// Returns the 'handle' output of this 'AutoShardDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AutoShardDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AutoShardDataset::new().build(input_dataset, num_workers, index, scope)`. -pub fn auto_shard_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - num_workers: O1, - index: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn auto_shard_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, num_workers: O1, index: O2, scope: &mut crate::Scope) -> crate::Result { AutoShardDataset::new().build(input_dataset, num_workers, index, scope) } + /// Builder for the `AvgPool` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AvgPool { @@ -6272,6 +7822,12 @@ pub struct AvgPool { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AvgPool' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AvgPoolInst { + /// An instance of a fully built AvgPool Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AvgPool { /// Creates a new `AvgPool`. @@ -6280,37 +7836,25 @@ impl AvgPool { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -6328,165 +7872,86 @@ impl AvgPool { } /// Builds the `AvgPool` operation. - pub fn build>( - &self, - value: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AvgPool", |nd| { nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} - -/// Shorthand for `AvgPool::new().build(value, scope)`. -pub fn avg_pool>( - value: O0, - scope: &mut crate::Scope, -) -> crate::Result { - AvgPool::new().build(value, scope) -} -/// Builder for the `AvgPool3D` operation. -#[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct AvgPool3D { - ksize: ::std::option::Option<::std::vec::Vec>, - strides: ::std::option::Option<::std::vec::Vec>, - padding: ::std::option::Option<::std::string::String>, - data_format: ::std::option::Option<::std::string::String>, - T: ::std::option::Option, - control_inputs: ::std::vec::Vec, -} -impl AvgPool3D { - /// Creates a new `AvgPool3D`. - pub fn new() -> Self { - Self::default() + /// Builds the `AvgPool` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), scope) } - - /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { - self.ksize = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { - self.strides = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { - self.padding = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { - self.data_format = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `T` attribute. - pub fn T>(mut self, value: ArgType) -> Self { - self.T = ::std::option::Option::Some(value.into()); - self - } - - /// Adds a control input. - pub fn add_control_input(mut self, op: crate::Operation) -> Self { - self.control_inputs.push(op); - self - } - - /// Builds the `AvgPool3D` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl(input.into(), scope) - } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("AvgPool3D", |nd| { - nd.add_input(input); + fn build_instance_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AvgPool", |nd| { + nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) - }) + })?; + Ok(AvgPoolInst{op}) } } - -/// Shorthand for `AvgPool3D::new().build(input, scope)`. -pub fn avg_pool3_d>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { - AvgPool3D::new().build(input, scope) +impl AvgPoolInst { + /// Returns the 'output' output of this 'AvgPool' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } } -/// Builder for the `AvgPool3DGrad` operation. +impl Into for AvgPoolInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `AvgPool::new().build(value, scope)`. +pub fn avg_pool>(value: O0, scope: &mut crate::Scope) -> crate::Result { + AvgPool::new().build(value, scope) +} + +/// Builder for the `AvgPool3D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct AvgPool3DGrad { +pub struct AvgPool3D { ksize: ::std::option::Option<::std::vec::Vec>, strides: ::std::option::Option<::std::vec::Vec>, padding: ::std::option::Option<::std::string::String>, @@ -6494,45 +7959,176 @@ pub struct AvgPool3DGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AvgPool3D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AvgPool3DInst { + /// An instance of a fully built AvgPool3D Operation in a Tensorflow graph. + pub op: crate::Operation, +} -impl AvgPool3DGrad { - /// Creates a new `AvgPool3DGrad`. +impl AvgPool3D { + /// Creates a new `AvgPool3D`. pub fn new() -> Self { Self::default() } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { + self.data_format = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `T` attribute. + pub fn T>(mut self, value: ArgType) -> Self { + self.T = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `AvgPool3D` operation. + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), scope) + } + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("AvgPool3D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `AvgPool3D` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AvgPool3D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AvgPool3DInst{op}) + } +} +impl AvgPool3DInst { + /// Returns the 'output' output of this 'AvgPool3D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AvgPool3DInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `AvgPool3D::new().build(input, scope)`. +pub fn avg_pool3_d>(input: O0, scope: &mut crate::Scope) -> crate::Result { + AvgPool3D::new().build(input, scope) +} + +/// Builder for the `AvgPool3DGrad` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct AvgPool3DGrad { + ksize: ::std::option::Option<::std::vec::Vec>, + strides: ::std::option::Option<::std::vec::Vec>, + padding: ::std::option::Option<::std::string::String>, + data_format: ::std::option::Option<::std::string::String>, + T: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'AvgPool3DGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AvgPool3DGradInst { + /// An instance of a fully built AvgPool3DGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl AvgPool3DGrad { + /// Creates a new `AvgPool3DGrad`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `ksize` attribute. + pub fn ksize>>(mut self, value: ArgType) -> Self { + self.ksize = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `strides` attribute. + pub fn strides>>(mut self, value: ArgType) -> Self { + self.strides = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `padding` attribute. + pub fn padding>(mut self, value: ArgType) -> Self { + self.padding = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `data_format` attribute. + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -6550,61 +8146,85 @@ impl AvgPool3DGrad { } /// Builds the `AvgPool3DGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - orig_input_shape: O0, - grad: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, orig_input_shape: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(orig_input_shape.into(), grad.into(), scope) } - - fn build_impl( - &self, - orig_input_shape: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, orig_input_shape: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AvgPool3DGrad", |nd| { nd.add_input(orig_input_shape); nd.add_input(grad); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AvgPool3DGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, orig_input_shape: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(orig_input_shape.into(), grad.into(), scope) + } + fn build_instance_impl(&self, orig_input_shape: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AvgPool3DGrad", |nd| { + nd.add_input(orig_input_shape); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AvgPool3DGradInst{op}) + } +} +impl AvgPool3DGradInst { + /// Returns the 'output' output of this 'AvgPool3DGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AvgPool3DGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AvgPool3DGrad::new().build(orig_input_shape, grad, scope)`. -pub fn avg_pool3_dgrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - orig_input_shape: O0, - grad: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn avg_pool3_dgrad, O1: ::std::convert::Into>(orig_input_shape: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { AvgPool3DGrad::new().build(orig_input_shape, grad, scope) } + /// Builder for the `AvgPoolGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct AvgPoolGrad { @@ -6615,6 +8235,12 @@ pub struct AvgPoolGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'AvgPoolGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct AvgPoolGradInst { + /// An instance of a fully built AvgPoolGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl AvgPoolGrad { /// Creates a new `AvgPoolGrad`. @@ -6623,37 +8249,25 @@ impl AvgPoolGrad { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -6671,61 +8285,85 @@ impl AvgPoolGrad { } /// Builds the `AvgPoolGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - orig_input_shape: O0, - grad: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, orig_input_shape: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(orig_input_shape.into(), grad.into(), scope) } - - fn build_impl( - &self, - orig_input_shape: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, orig_input_shape: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("AvgPoolGrad", |nd| { nd.add_input(orig_input_shape); nd.add_input(grad); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `AvgPoolGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, orig_input_shape: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(orig_input_shape.into(), grad.into(), scope) + } + fn build_instance_impl(&self, orig_input_shape: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("AvgPoolGrad", |nd| { + nd.add_input(orig_input_shape); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(AvgPoolGradInst{op}) + } +} +impl AvgPoolGradInst { + /// Returns the 'output' output of this 'AvgPoolGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for AvgPoolGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `AvgPoolGrad::new().build(orig_input_shape, grad, scope)`. -pub fn avg_pool_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - orig_input_shape: O0, - grad: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn avg_pool_grad, O1: ::std::convert::Into>(orig_input_shape: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { AvgPoolGrad::new().build(orig_input_shape, grad, scope) } + /// Builder for the `BandedTriangularSolve` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BandedTriangularSolve { @@ -6734,6 +8372,12 @@ pub struct BandedTriangularSolve { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BandedTriangularSolve' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BandedTriangularSolveInst { + /// An instance of a fully built BandedTriangularSolve Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BandedTriangularSolve { /// Creates a new `BandedTriangularSolve`. @@ -6766,55 +8410,73 @@ impl BandedTriangularSolve { } /// Builds the `BandedTriangularSolve` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(matrix.into(), rhs.into(), scope) } - - fn build_impl( - &self, - matrix: crate::Output, - rhs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BandedTriangularSolve", |nd| { nd.add_input(matrix); nd.add_input(rhs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.lower { - nd.set_attr_bool("lower", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adjoint { - nd.set_attr_bool("adjoint", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.lower { + nd.set_attr_bool("lower", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BandedTriangularSolve` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(matrix.into(), rhs.into(), scope) + } + fn build_instance_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BandedTriangularSolve", |nd| { + nd.add_input(matrix); + nd.add_input(rhs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.lower { + nd.set_attr_bool("lower", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BandedTriangularSolveInst{op}) + } +} +impl BandedTriangularSolveInst { + /// Returns the 'output' output of this 'BandedTriangularSolve' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BandedTriangularSolveInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BandedTriangularSolve::new().build(matrix, rhs, scope)`. -pub fn banded_triangular_solve< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn banded_triangular_solve, O1: ::std::convert::Into>(matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { BandedTriangularSolve::new().build(matrix, rhs, scope) } + /// Builder for the `Barrier` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Barrier { @@ -6825,6 +8487,12 @@ pub struct Barrier { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Barrier' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BarrierInst { + /// An instance of a fully built Barrier Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Barrier { /// Creates a new `Barrier`. @@ -6833,19 +8501,13 @@ impl Barrier { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -6857,19 +8519,13 @@ impl Barrier { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -6881,45 +8537,93 @@ impl Barrier { } /// Builds the `Barrier` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Barrier", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Barrier` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Barrier", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BarrierInst{op}) + } +} +impl BarrierInst { + /// Returns the 'handle' output of this 'Barrier' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BarrierInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Barrier::new().build(scope)`. -pub fn barrier(scope: &mut crate::Scope) -> crate::Result { +pub fn barrier<>(scope: &mut crate::Scope) -> crate::Result { Barrier::new().build(scope) } + /// Builder for the `BarrierClose` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BarrierClose { cancel_pending_enqueues: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BarrierClose' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BarrierCloseInst { + /// An instance of a fully built BarrierClose Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BarrierClose { /// Creates a new `BarrierClose`. @@ -6928,10 +8632,7 @@ impl BarrierClose { } /// Sets the `cancel_pending_enqueues` attribute. - pub fn cancel_pending_enqueues>( - mut self, - value: ArgType, - ) -> Self { + pub fn cancel_pending_enqueues>(mut self, value: ArgType) -> Self { self.cancel_pending_enqueues = ::std::option::Option::Some(value.into()); self } @@ -6943,44 +8644,63 @@ impl BarrierClose { } /// Builds the `BarrierClose` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BarrierClose", |nd| { nd.add_input(handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.cancel_pending_enqueues { - nd.set_attr_bool("cancel_pending_enqueues", *value)?; - } + if let ::std::option::Option::Some(value) = &self.cancel_pending_enqueues { + nd.set_attr_bool("cancel_pending_enqueues", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BarrierClose` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BarrierClose", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.cancel_pending_enqueues { + nd.set_attr_bool("cancel_pending_enqueues", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BarrierCloseInst{op}) + } +} +impl BarrierCloseInst { +} +impl Into for BarrierCloseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BarrierClose::new().build(handle, scope)`. -pub fn barrier_close>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn barrier_close>(handle: O0, scope: &mut crate::Scope) -> crate::Result { BarrierClose::new().build(handle, scope) } + /// Builder for the `BarrierIncompleteSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BarrierIncompleteSize { control_inputs: ::std::vec::Vec, } +/// An instance of 'BarrierIncompleteSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BarrierIncompleteSizeInst { + /// An instance of a fully built BarrierIncompleteSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BarrierIncompleteSize { /// Creates a new `BarrierIncompleteSize`. @@ -6995,19 +8715,10 @@ impl BarrierIncompleteSize { } /// Builds the `BarrierIncompleteSize` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BarrierIncompleteSize", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -7016,15 +8727,41 @@ impl BarrierIncompleteSize { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BarrierIncompleteSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BarrierIncompleteSize", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BarrierIncompleteSizeInst{op}) + } +} +impl BarrierIncompleteSizeInst { + /// Returns the 'size' output of this 'BarrierIncompleteSize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BarrierIncompleteSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BarrierIncompleteSize::new().build(handle, scope)`. -pub fn barrier_incomplete_size>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn barrier_incomplete_size>(handle: O0, scope: &mut crate::Scope) -> crate::Result { BarrierIncompleteSize::new().build(handle, scope) } + /// Builder for the `BarrierInsertMany` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BarrierInsertMany { @@ -7032,6 +8769,12 @@ pub struct BarrierInsertMany { component_index: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BarrierInsertMany' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BarrierInsertManyInst { + /// An instance of a fully built BarrierInsertMany Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BarrierInsertMany { /// Creates a new `BarrierInsertMany`. @@ -7058,27 +8801,10 @@ impl BarrierInsertMany { } /// Builds the `BarrierInsertMany` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), keys.into(), values.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - keys: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BarrierInsertMany", |nd| { nd.add_input(handle); nd.add_input(keys); @@ -7086,35 +8812,62 @@ impl BarrierInsertMany { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.component_index { - nd.set_attr_int("component_index", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.component_index { + nd.set_attr_int("component_index", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BarrierInsertMany` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), keys.into(), values.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BarrierInsertMany", |nd| { + nd.add_input(handle); + nd.add_input(keys); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.component_index { + nd.set_attr_int("component_index", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BarrierInsertManyInst{op}) + } +} +impl BarrierInsertManyInst { +} +impl Into for BarrierInsertManyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BarrierInsertMany::new().build(handle, keys, values, scope)`. -pub fn barrier_insert_many< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn barrier_insert_many, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { BarrierInsertMany::new().build(handle, keys, values, scope) } + /// Builder for the `BarrierReadySize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BarrierReadySize { control_inputs: ::std::vec::Vec, } +/// An instance of 'BarrierReadySize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BarrierReadySizeInst { + /// An instance of a fully built BarrierReadySize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BarrierReadySize { /// Creates a new `BarrierReadySize`. @@ -7129,19 +8882,10 @@ impl BarrierReadySize { } /// Builds the `BarrierReadySize` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BarrierReadySize", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -7150,15 +8894,41 @@ impl BarrierReadySize { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BarrierReadySize` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BarrierReadySize", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BarrierReadySizeInst{op}) + } +} +impl BarrierReadySizeInst { + /// Returns the 'size' output of this 'BarrierReadySize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BarrierReadySizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BarrierReadySize::new().build(handle, scope)`. -pub fn barrier_ready_size>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn barrier_ready_size>(handle: O0, scope: &mut crate::Scope) -> crate::Result { BarrierReadySize::new().build(handle, scope) } + /// Builder for the `BarrierTakeMany` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BarrierTakeMany { @@ -7168,6 +8938,12 @@ pub struct BarrierTakeMany { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BarrierTakeMany' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BarrierTakeManyInst { + /// An instance of a fully built BarrierTakeMany Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BarrierTakeMany { /// Creates a new `BarrierTakeMany`. @@ -7176,28 +8952,19 @@ impl BarrierTakeMany { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } /// Sets the `allow_small_batch` attribute. - pub fn allow_small_batch>( - mut self, - value: ArgType, - ) -> Self { + pub fn allow_small_batch>(mut self, value: ArgType) -> Self { self.allow_small_batch = ::std::option::Option::Some(value.into()); self } /// Sets the `wait_for_incomplete` attribute. - pub fn wait_for_incomplete>( - mut self, - value: ArgType, - ) -> Self { + pub fn wait_for_incomplete>(mut self, value: ArgType) -> Self { self.wait_for_incomplete = ::std::option::Option::Some(value.into()); self } @@ -7215,58 +8982,93 @@ impl BarrierTakeMany { } /// Builds the `BarrierTakeMany` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - num_elements: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, num_elements: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), num_elements.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - num_elements: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, num_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BarrierTakeMany", |nd| { nd.add_input(handle); nd.add_input(num_elements); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.allow_small_batch { - nd.set_attr_bool("allow_small_batch", *value)?; - } - if let ::std::option::Option::Some(value) = &self.wait_for_incomplete { - nd.set_attr_bool("wait_for_incomplete", *value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.allow_small_batch { + nd.set_attr_bool("allow_small_batch", *value)?; + } + if let ::std::option::Option::Some(value) = &self.wait_for_incomplete { + nd.set_attr_bool("wait_for_incomplete", *value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BarrierTakeMany` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, num_elements: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), num_elements.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, num_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BarrierTakeMany", |nd| { + nd.add_input(handle); + nd.add_input(num_elements); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.allow_small_batch { + nd.set_attr_bool("allow_small_batch", *value)?; + } + if let ::std::option::Option::Some(value) = &self.wait_for_incomplete { + nd.set_attr_bool("wait_for_incomplete", *value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BarrierTakeManyInst{op}) + } +} +impl BarrierTakeManyInst { + /// Returns the 'indices' output of this 'BarrierTakeMany' operation. + pub fn indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'keys' output of this 'BarrierTakeMany' operation. + pub fn keys(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'values' output of this 'BarrierTakeMany' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for BarrierTakeManyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BarrierTakeMany::new().build(handle, num_elements, scope)`. -pub fn barrier_take_many< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - num_elements: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn barrier_take_many, O1: ::std::convert::Into>(handle: O0, num_elements: O1, scope: &mut crate::Scope) -> crate::Result { BarrierTakeMany::new().build(handle, num_elements, scope) } + /// Builder for the `Batch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Batch { @@ -7282,6 +9084,12 @@ pub struct Batch { T: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Batch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchInst { + /// An instance of a fully built Batch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Batch { /// Creates a new `Batch`. @@ -7302,73 +9110,49 @@ impl Batch { } /// Sets the `max_enqueued_batches` attribute. - pub fn max_enqueued_batches>( - mut self, - value: ArgType, - ) -> Self { + pub fn max_enqueued_batches>(mut self, value: ArgType) -> Self { self.max_enqueued_batches = ::std::option::Option::Some(value.into()); self } /// Sets the `batch_timeout_micros` attribute. - pub fn batch_timeout_micros>( - mut self, - value: ArgType, - ) -> Self { + pub fn batch_timeout_micros>(mut self, value: ArgType) -> Self { self.batch_timeout_micros = ::std::option::Option::Some(value.into()); self } /// Sets the `allowed_batch_sizes` attribute. - pub fn allowed_batch_sizes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn allowed_batch_sizes>>(mut self, value: ArgType) -> Self { self.allowed_batch_sizes = ::std::option::Option::Some(value.into()); self } /// Sets the `grad_timeout_micros` attribute. - pub fn grad_timeout_micros>( - mut self, - value: ArgType, - ) -> Self { + pub fn grad_timeout_micros>(mut self, value: ArgType) -> Self { self.grad_timeout_micros = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `batching_queue` attribute. - pub fn batching_queue>( - mut self, - value: ArgType, - ) -> Self { + pub fn batching_queue>(mut self, value: ArgType) -> Self { self.batching_queue = ::std::option::Option::Some(value.into()); self } /// Sets the `T` attribute. - pub fn T>>( - mut self, - value: ArgType, - ) -> Self { + pub fn T>>(mut self, value: ArgType) -> Self { self.T = ::std::option::Option::Some(value.into()); self } @@ -7380,72 +9164,139 @@ impl Batch { } /// Builds the `Batch` operation. - pub fn build>( - &self, - in_tensors: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, in_tensors: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(in_tensors.into(), scope) } - - fn build_impl( - &self, - in_tensors: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, in_tensors: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Batch", |nd| { nd.add_input(in_tensors); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_batch_threads { - nd.set_attr_int("num_batch_threads", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_batch_size { - nd.set_attr_int("max_batch_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_enqueued_batches { - nd.set_attr_int("max_enqueued_batches", *value)?; - } - if let ::std::option::Option::Some(value) = &self.batch_timeout_micros { - nd.set_attr_int("batch_timeout_micros", *value)?; - } - if let ::std::option::Option::Some(value) = &self.allowed_batch_sizes { - nd.set_attr_int_list("allowed_batch_sizes", value)?; - } - if let ::std::option::Option::Some(value) = &self.grad_timeout_micros { - nd.set_attr_int("grad_timeout_micros", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.batching_queue { - nd.set_attr_string("batching_queue", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type_list("T", value)?; + if let ::std::option::Option::Some(value) = &self.num_batch_threads { + nd.set_attr_int("num_batch_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_batch_size { + nd.set_attr_int("max_batch_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_enqueued_batches { + nd.set_attr_int("max_enqueued_batches", *value)?; + } + if let ::std::option::Option::Some(value) = &self.batch_timeout_micros { + nd.set_attr_int("batch_timeout_micros", *value)?; + } + if let ::std::option::Option::Some(value) = &self.allowed_batch_sizes { + nd.set_attr_int_list("allowed_batch_sizes", value)?; + } + if let ::std::option::Option::Some(value) = &self.grad_timeout_micros { + nd.set_attr_int("grad_timeout_micros", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.batching_queue { + nd.set_attr_string("batching_queue", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `Batch` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, in_tensors: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(in_tensors.into(), scope) + } + fn build_instance_impl(&self, in_tensors: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Batch", |nd| { + nd.add_input(in_tensors); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.num_batch_threads { + nd.set_attr_int("num_batch_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_batch_size { + nd.set_attr_int("max_batch_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_enqueued_batches { + nd.set_attr_int("max_enqueued_batches", *value)?; + } + if let ::std::option::Option::Some(value) = &self.batch_timeout_micros { + nd.set_attr_int("batch_timeout_micros", *value)?; + } + if let ::std::option::Option::Some(value) = &self.allowed_batch_sizes { + nd.set_attr_int_list("allowed_batch_sizes", value)?; + } + if let ::std::option::Option::Some(value) = &self.grad_timeout_micros { + nd.set_attr_int("grad_timeout_micros", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.batching_queue { + nd.set_attr_string("batching_queue", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchInst{op}) + } +} +impl BatchInst { + /// Returns the 'batched_tensors' output of this 'Batch' operation. + pub fn batched_tensors(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'batch_index' output of this 'Batch' operation. + pub fn batch_index(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'id' output of this 'Batch' operation. + pub fn id(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for BatchInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `Batch::new().build(in_tensors, scope)`. -pub fn batch>( - in_tensors: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch>(in_tensors: O0, scope: &mut crate::Scope) -> crate::Result { Batch::new().build(in_tensors, scope) } + /// Builder for the `BatchCholesky` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchCholesky { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchCholesky' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchCholeskyInst { + /// An instance of a fully built BatchCholesky Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchCholesky { /// Creates a new `BatchCholesky`. @@ -7466,45 +9317,71 @@ impl BatchCholesky { } /// Builds the `BatchCholesky` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchCholesky", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchCholesky` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchCholesky", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchCholeskyInst{op}) + } +} +impl BatchCholeskyInst { + /// Returns the 'output' output of this 'BatchCholesky' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchCholeskyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchCholesky::new().build(input, scope)`. -pub fn batch_cholesky>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_cholesky>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchCholesky::new().build(input, scope) } + /// Builder for the `BatchCholeskyGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchCholeskyGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchCholeskyGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchCholeskyGradInst { + /// An instance of a fully built BatchCholeskyGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchCholeskyGrad { /// Creates a new `BatchCholeskyGrad`. @@ -7525,49 +9402,61 @@ impl BatchCholeskyGrad { } /// Builds the `BatchCholeskyGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - l: O0, - grad: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, l: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(l.into(), grad.into(), scope) } - - fn build_impl( - &self, - l: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, l: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchCholeskyGrad", |nd| { nd.add_input(l); nd.add_input(grad); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchCholeskyGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, l: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(l.into(), grad.into(), scope) + } + fn build_instance_impl(&self, l: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchCholeskyGrad", |nd| { + nd.add_input(l); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchCholeskyGradInst{op}) + } +} +impl BatchCholeskyGradInst { + /// Returns the 'output' output of this 'BatchCholeskyGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchCholeskyGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchCholeskyGrad::new().build(l, grad, scope)`. -pub fn batch_cholesky_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - l: O0, - grad: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_cholesky_grad, O1: ::std::convert::Into>(l: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { BatchCholeskyGrad::new().build(l, grad, scope) } + /// Builder for the `BatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchDataset { @@ -7576,6 +9465,12 @@ pub struct BatchDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchDatasetInst { + /// An instance of a fully built BatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchDataset { /// Creates a new `BatchDataset`. @@ -7584,28 +9479,19 @@ impl BatchDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -7617,55 +9503,73 @@ impl BatchDataset { } /// Builds the `BatchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - batch_size: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), batch_size.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - batch_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(batch_size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), batch_size.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(batch_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchDatasetInst{op}) + } +} +impl BatchDatasetInst { + /// Returns the 'handle' output of this 'BatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchDataset::new().build(input_dataset, batch_size, scope)`. -pub fn batch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - batch_size: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_dataset, O1: ::std::convert::Into>(input_dataset: O0, batch_size: O1, scope: &mut crate::Scope) -> crate::Result { BatchDataset::new().build(input_dataset, batch_size, scope) } + /// Builder for the `BatchDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchDatasetV2 { @@ -7675,6 +9579,12 @@ pub struct BatchDatasetV2 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchDatasetV2Inst { + /// An instance of a fully built BatchDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchDatasetV2 { /// Creates a new `BatchDatasetV2`. @@ -7689,28 +9599,19 @@ impl BatchDatasetV2 { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -7722,32 +9623,10 @@ impl BatchDatasetV2 { } /// Builds the `BatchDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - batch_size: O1, - drop_remainder: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - batch_size.into(), - drop_remainder.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - batch_size: crate::Output, - drop_remainder: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, drop_remainder: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), batch_size.into(), drop_remainder.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(batch_size); @@ -7755,41 +9634,81 @@ impl BatchDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.parallel_copy { - nd.set_attr_bool("parallel_copy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.parallel_copy { + nd.set_attr_bool("parallel_copy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, drop_remainder: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), batch_size.into(), drop_remainder.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(batch_size); + nd.add_input(drop_remainder); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.parallel_copy { + nd.set_attr_bool("parallel_copy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchDatasetV2Inst{op}) + } +} +impl BatchDatasetV2Inst { + /// Returns the 'handle' output of this 'BatchDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchDatasetV2::new().build(input_dataset, batch_size, drop_remainder, scope)`. -pub fn batch_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - batch_size: O1, - drop_remainder: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, batch_size: O1, drop_remainder: O2, scope: &mut crate::Scope) -> crate::Result { BatchDatasetV2::new().build(input_dataset, batch_size, drop_remainder, scope) } + /// Builder for the `BatchFFT` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchFFT { control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchFFT' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchFFTInst { + /// An instance of a fully built BatchFFT Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchFFT { /// Creates a new `BatchFFT`. @@ -7804,19 +9723,10 @@ impl BatchFFT { } /// Builds the `BatchFFT` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchFFT", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -7825,20 +9735,52 @@ impl BatchFFT { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchFFT` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchFFT", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchFFTInst{op}) + } +} +impl BatchFFTInst { + /// Returns the 'output' output of this 'BatchFFT' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchFFTInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchFFT::new().build(input, scope)`. -pub fn batch_fft>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_fft>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchFFT::new().build(input, scope) } + /// Builder for the `BatchFFT2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchFFT2D { control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchFFT2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchFFT2DInst { + /// An instance of a fully built BatchFFT2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchFFT2D { /// Creates a new `BatchFFT2D`. @@ -7853,19 +9795,10 @@ impl BatchFFT2D { } /// Builds the `BatchFFT2D` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchFFT2D", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -7874,20 +9807,52 @@ impl BatchFFT2D { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchFFT2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchFFT2D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchFFT2DInst{op}) + } +} +impl BatchFFT2DInst { + /// Returns the 'output' output of this 'BatchFFT2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchFFT2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchFFT2D::new().build(input, scope)`. -pub fn batch_fft2_d>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_fft2_d>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchFFT2D::new().build(input, scope) } + /// Builder for the `BatchFFT3D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchFFT3D { control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchFFT3D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchFFT3DInst { + /// An instance of a fully built BatchFFT3D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchFFT3D { /// Creates a new `BatchFFT3D`. @@ -7902,19 +9867,10 @@ impl BatchFFT3D { } /// Builds the `BatchFFT3D` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchFFT3D", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -7923,15 +9879,41 @@ impl BatchFFT3D { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchFFT3D` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchFFT3D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchFFT3DInst{op}) + } +} +impl BatchFFT3DInst { + /// Returns the 'output' output of this 'BatchFFT3D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchFFT3DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchFFT3D::new().build(input, scope)`. -pub fn batch_fft3_d>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_fft3_d>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchFFT3D::new().build(input, scope) } + /// Builder for the `BatchFunction` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchFunction { @@ -7950,6 +9932,12 @@ pub struct BatchFunction { enable_large_batch_splitting: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchFunction' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchFunctionInst { + /// An instance of a fully built BatchFunction Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchFunction { /// Creates a new `BatchFunction`. @@ -7958,10 +9946,7 @@ impl BatchFunction { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } @@ -7979,91 +9964,61 @@ impl BatchFunction { } /// Sets the `batch_timeout_micros` attribute. - pub fn batch_timeout_micros>( - mut self, - value: ArgType, - ) -> Self { + pub fn batch_timeout_micros>(mut self, value: ArgType) -> Self { self.batch_timeout_micros = ::std::option::Option::Some(value.into()); self } /// Sets the `max_enqueued_batches` attribute. - pub fn max_enqueued_batches>( - mut self, - value: ArgType, - ) -> Self { + pub fn max_enqueued_batches>(mut self, value: ArgType) -> Self { self.max_enqueued_batches = ::std::option::Option::Some(value.into()); self } /// Sets the `allowed_batch_sizes` attribute. - pub fn allowed_batch_sizes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn allowed_batch_sizes>>(mut self, value: ArgType) -> Self { self.allowed_batch_sizes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `batching_queue` attribute. - pub fn batching_queue>( - mut self, - value: ArgType, - ) -> Self { + pub fn batching_queue>(mut self, value: ArgType) -> Self { self.batching_queue = ::std::option::Option::Some(value.into()); self } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tcaptured` attribute. - pub fn Tcaptured>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcaptured>>(mut self, value: ArgType) -> Self { self.Tcaptured = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } /// Sets the `enable_large_batch_splitting` attribute. - pub fn enable_large_batch_splitting>( - mut self, - value: ArgType, - ) -> Self { + pub fn enable_large_batch_splitting>(mut self, value: ArgType) -> Self { self.enable_large_batch_splitting = ::std::option::Option::Some(value.into()); self } @@ -8075,90 +10030,144 @@ impl BatchFunction { } /// Builds the `BatchFunction` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - in_tensors: O0, - captured_tensors: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, in_tensors: O0, captured_tensors: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(in_tensors.into(), captured_tensors.into(), scope) } - - fn build_impl( - &self, - in_tensors: crate::Output, - captured_tensors: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, in_tensors: crate::Output, captured_tensors: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchFunction", |nd| { nd.add_input(in_tensors); nd.add_input(captured_tensors); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_batch_threads { - nd.set_attr_int("num_batch_threads", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_batch_size { - nd.set_attr_int("max_batch_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.batch_timeout_micros { - nd.set_attr_int("batch_timeout_micros", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_enqueued_batches { - nd.set_attr_int("max_enqueued_batches", *value)?; - } - if let ::std::option::Option::Some(value) = &self.allowed_batch_sizes { - nd.set_attr_int_list("allowed_batch_sizes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.batching_queue { - nd.set_attr_string("batching_queue", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcaptured { - nd.set_attr_type_list("Tcaptured", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } - if let ::std::option::Option::Some(value) = &self.enable_large_batch_splitting { - nd.set_attr_bool("enable_large_batch_splitting", *value)?; + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_batch_threads { + nd.set_attr_int("num_batch_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_batch_size { + nd.set_attr_int("max_batch_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.batch_timeout_micros { + nd.set_attr_int("batch_timeout_micros", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_enqueued_batches { + nd.set_attr_int("max_enqueued_batches", *value)?; + } + if let ::std::option::Option::Some(value) = &self.allowed_batch_sizes { + nd.set_attr_int_list("allowed_batch_sizes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.batching_queue { + nd.set_attr_string("batching_queue", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcaptured { + nd.set_attr_type_list("Tcaptured", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.enable_large_batch_splitting { + nd.set_attr_bool("enable_large_batch_splitting", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `BatchFunction` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, in_tensors: O0, captured_tensors: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(in_tensors.into(), captured_tensors.into(), scope) + } + fn build_instance_impl(&self, in_tensors: crate::Output, captured_tensors: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchFunction", |nd| { + nd.add_input(in_tensors); + nd.add_input(captured_tensors); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_batch_threads { + nd.set_attr_int("num_batch_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_batch_size { + nd.set_attr_int("max_batch_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.batch_timeout_micros { + nd.set_attr_int("batch_timeout_micros", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_enqueued_batches { + nd.set_attr_int("max_enqueued_batches", *value)?; + } + if let ::std::option::Option::Some(value) = &self.allowed_batch_sizes { + nd.set_attr_int_list("allowed_batch_sizes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.batching_queue { + nd.set_attr_string("batching_queue", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcaptured { + nd.set_attr_type_list("Tcaptured", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.enable_large_batch_splitting { + nd.set_attr_bool("enable_large_batch_splitting", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchFunctionInst{op}) + } +} +impl BatchFunctionInst { + /// Returns the 'out_tensors' output of this 'BatchFunction' operation. + pub fn out_tensors(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchFunctionInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `BatchFunction::new().build(in_tensors, captured_tensors, scope)`. -pub fn batch_function< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - in_tensors: O0, - captured_tensors: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_function, O1: ::std::convert::Into>(in_tensors: O0, captured_tensors: O1, scope: &mut crate::Scope) -> crate::Result { BatchFunction::new().build(in_tensors, captured_tensors, scope) } + /// Builder for the `BatchIFFT` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchIFFT { control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchIFFT' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchIFFTInst { + /// An instance of a fully built BatchIFFT Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchIFFT { /// Creates a new `BatchIFFT`. @@ -8173,19 +10182,10 @@ impl BatchIFFT { } /// Builds the `BatchIFFT` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchIFFT", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -8194,20 +10194,52 @@ impl BatchIFFT { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchIFFT` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchIFFT", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchIFFTInst{op}) + } +} +impl BatchIFFTInst { + /// Returns the 'output' output of this 'BatchIFFT' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchIFFTInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchIFFT::new().build(input, scope)`. -pub fn batch_ifft>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_ifft>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchIFFT::new().build(input, scope) } + /// Builder for the `BatchIFFT2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchIFFT2D { control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchIFFT2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchIFFT2DInst { + /// An instance of a fully built BatchIFFT2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchIFFT2D { /// Creates a new `BatchIFFT2D`. @@ -8222,19 +10254,10 @@ impl BatchIFFT2D { } /// Builds the `BatchIFFT2D` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchIFFT2D", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -8243,20 +10266,52 @@ impl BatchIFFT2D { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchIFFT2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchIFFT2D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchIFFT2DInst{op}) + } +} +impl BatchIFFT2DInst { + /// Returns the 'output' output of this 'BatchIFFT2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchIFFT2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchIFFT2D::new().build(input, scope)`. -pub fn batch_ifft2_d>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_ifft2_d>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchIFFT2D::new().build(input, scope) } + /// Builder for the `BatchIFFT3D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchIFFT3D { control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchIFFT3D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchIFFT3DInst { + /// An instance of a fully built BatchIFFT3D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchIFFT3D { /// Creates a new `BatchIFFT3D`. @@ -8271,19 +10326,10 @@ impl BatchIFFT3D { } /// Builds the `BatchIFFT3D` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchIFFT3D", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -8292,15 +10338,41 @@ impl BatchIFFT3D { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchIFFT3D` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchIFFT3D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchIFFT3DInst{op}) + } +} +impl BatchIFFT3DInst { + /// Returns the 'output' output of this 'BatchIFFT3D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchIFFT3DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchIFFT3D::new().build(input, scope)`. -pub fn batch_ifft3_d>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_ifft3_d>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchIFFT3D::new().build(input, scope) } + /// Builder for the `BatchMatMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatMul { @@ -8309,6 +10381,12 @@ pub struct BatchMatMul { adj_y: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatMulInst { + /// An instance of a fully built BatchMatMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatMul { /// Creates a new `BatchMatMul`. @@ -8341,55 +10419,73 @@ impl BatchMatMul { } /// Builds the `BatchMatMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatMul", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adj_x { - nd.set_attr_bool("adj_x", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adj_y { - nd.set_attr_bool("adj_y", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_x { + nd.set_attr_bool("adj_x", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_y { + nd.set_attr_bool("adj_y", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatMul", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_x { + nd.set_attr_bool("adj_x", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_y { + nd.set_attr_bool("adj_y", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatMulInst{op}) + } +} +impl BatchMatMulInst { + /// Returns the 'output' output of this 'BatchMatMul' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatMul::new().build(x, y, scope)`. -pub fn batch_mat_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_mat_mul, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { BatchMatMul::new().build(x, y, scope) } + /// Builder for the `BatchMatMulV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatMulV2 { @@ -8398,6 +10494,12 @@ pub struct BatchMatMulV2 { adj_y: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatMulV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatMulV2Inst { + /// An instance of a fully built BatchMatMulV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatMulV2 { /// Creates a new `BatchMatMulV2`. @@ -8430,55 +10532,73 @@ impl BatchMatMulV2 { } /// Builds the `BatchMatMulV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatMulV2", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adj_x { - nd.set_attr_bool("adj_x", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adj_y { - nd.set_attr_bool("adj_y", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_x { + nd.set_attr_bool("adj_x", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_y { + nd.set_attr_bool("adj_y", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatMulV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatMulV2", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_x { + nd.set_attr_bool("adj_x", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_y { + nd.set_attr_bool("adj_y", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatMulV2Inst{op}) + } +} +impl BatchMatMulV2Inst { + /// Returns the 'output' output of this 'BatchMatMulV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatMulV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatMulV2::new().build(x, y, scope)`. -pub fn batch_mat_mul_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_mat_mul_v2, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { BatchMatMulV2::new().build(x, y, scope) } + /// Builder for the `BatchMatMulV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatMulV3 { @@ -8489,6 +10609,12 @@ pub struct BatchMatMulV3 { adj_y: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatMulV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatMulV3Inst { + /// An instance of a fully built BatchMatMulV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatMulV3 { /// Creates a new `BatchMatMulV3`. @@ -8533,67 +10659,97 @@ impl BatchMatMulV3 { } /// Builds the `BatchMatMulV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatMulV3", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Ta { - nd.set_attr_type("Ta", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tb { - nd.set_attr_type("Tb", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adj_x { - nd.set_attr_bool("adj_x", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adj_y { - nd.set_attr_bool("adj_y", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Ta { + nd.set_attr_type("Ta", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tb { + nd.set_attr_type("Tb", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_x { + nd.set_attr_bool("adj_x", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_y { + nd.set_attr_bool("adj_y", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatMulV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatMulV3", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Ta { + nd.set_attr_type("Ta", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tb { + nd.set_attr_type("Tb", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_x { + nd.set_attr_bool("adj_x", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adj_y { + nd.set_attr_bool("adj_y", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatMulV3Inst{op}) + } +} +impl BatchMatMulV3Inst { + /// Returns the 'output' output of this 'BatchMatMulV3' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatMulV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatMulV3::new().build(x, y, scope)`. -pub fn batch_mat_mul_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_mat_mul_v3, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { BatchMatMulV3::new().build(x, y, scope) } + /// Builder for the `BatchMatrixBandPart` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatrixBandPart { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatrixBandPart' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatrixBandPartInst { + /// An instance of a fully built BatchMatrixBandPart Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatrixBandPart { /// Creates a new `BatchMatrixBandPart`. @@ -8614,27 +10770,10 @@ impl BatchMatrixBandPart { } /// Builds the `BatchMatrixBandPart` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - num_lower: O1, - num_upper: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, num_lower: O1, num_upper: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), num_lower.into(), num_upper.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - num_lower: crate::Output, - num_upper: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, num_lower: crate::Output, num_upper: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatrixBandPart", |nd| { nd.add_input(input); nd.add_input(num_lower); @@ -8642,33 +10781,64 @@ impl BatchMatrixBandPart { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatrixBandPart` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, num_lower: O1, num_upper: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), num_lower.into(), num_upper.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, num_lower: crate::Output, num_upper: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatrixBandPart", |nd| { + nd.add_input(input); + nd.add_input(num_lower); + nd.add_input(num_upper); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatrixBandPartInst{op}) + } +} +impl BatchMatrixBandPartInst { + /// Returns the 'band' output of this 'BatchMatrixBandPart' operation. + pub fn band(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatrixBandPartInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatrixBandPart::new().build(input, num_lower, num_upper, scope)`. -pub fn batch_matrix_band_part< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - num_lower: O1, - num_upper: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_matrix_band_part, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, num_lower: O1, num_upper: O2, scope: &mut crate::Scope) -> crate::Result { BatchMatrixBandPart::new().build(input, num_lower, num_upper, scope) } + /// Builder for the `BatchMatrixDeterminant` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatrixDeterminant { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatrixDeterminant' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatrixDeterminantInst { + /// An instance of a fully built BatchMatrixDeterminant Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatrixDeterminant { /// Creates a new `BatchMatrixDeterminant`. @@ -8689,45 +10859,71 @@ impl BatchMatrixDeterminant { } /// Builds the `BatchMatrixDeterminant` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatrixDeterminant", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatrixDeterminant` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatrixDeterminant", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatrixDeterminantInst{op}) + } +} +impl BatchMatrixDeterminantInst { + /// Returns the 'output' output of this 'BatchMatrixDeterminant' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatrixDeterminantInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatrixDeterminant::new().build(input, scope)`. -pub fn batch_matrix_determinant>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_matrix_determinant>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchMatrixDeterminant::new().build(input, scope) } + /// Builder for the `BatchMatrixDiag` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatrixDiag { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatrixDiag' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatrixDiagInst { + /// An instance of a fully built BatchMatrixDiag Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatrixDiag { /// Creates a new `BatchMatrixDiag`. @@ -8748,45 +10944,71 @@ impl BatchMatrixDiag { } /// Builds the `BatchMatrixDiag` operation. - pub fn build>( - &self, - diagonal: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, diagonal: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(diagonal.into(), scope) } - - fn build_impl( - &self, - diagonal: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, diagonal: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatrixDiag", |nd| { nd.add_input(diagonal); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatrixDiag` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, diagonal: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(diagonal.into(), scope) + } + fn build_instance_impl(&self, diagonal: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatrixDiag", |nd| { + nd.add_input(diagonal); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatrixDiagInst{op}) + } +} +impl BatchMatrixDiagInst { + /// Returns the 'output' output of this 'BatchMatrixDiag' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatrixDiagInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatrixDiag::new().build(diagonal, scope)`. -pub fn batch_matrix_diag>( - diagonal: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_matrix_diag>(diagonal: O0, scope: &mut crate::Scope) -> crate::Result { BatchMatrixDiag::new().build(diagonal, scope) } + /// Builder for the `BatchMatrixDiagPart` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatrixDiagPart { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatrixDiagPart' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatrixDiagPartInst { + /// An instance of a fully built BatchMatrixDiagPart Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatrixDiagPart { /// Creates a new `BatchMatrixDiagPart`. @@ -8807,39 +11029,59 @@ impl BatchMatrixDiagPart { } /// Builds the `BatchMatrixDiagPart` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatrixDiagPart", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatrixDiagPart` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatrixDiagPart", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatrixDiagPartInst{op}) + } +} +impl BatchMatrixDiagPartInst { + /// Returns the 'diagonal' output of this 'BatchMatrixDiagPart' operation. + pub fn diagonal(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatrixDiagPartInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatrixDiagPart::new().build(input, scope)`. -pub fn batch_matrix_diag_part>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_matrix_diag_part>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchMatrixDiagPart::new().build(input, scope) } + /// Builder for the `BatchMatrixInverse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatrixInverse { @@ -8847,6 +11089,12 @@ pub struct BatchMatrixInverse { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatrixInverse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatrixInverseInst { + /// An instance of a fully built BatchMatrixInverse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatrixInverse { /// Creates a new `BatchMatrixInverse`. @@ -8873,48 +11121,77 @@ impl BatchMatrixInverse { } /// Builds the `BatchMatrixInverse` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatrixInverse", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.adjoint { - nd.set_attr_bool("adjoint", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatrixInverse` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatrixInverse", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatrixInverseInst{op}) + } +} +impl BatchMatrixInverseInst { + /// Returns the 'output' output of this 'BatchMatrixInverse' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatrixInverseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatrixInverse::new().build(input, scope)`. -pub fn batch_matrix_inverse>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_matrix_inverse>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchMatrixInverse::new().build(input, scope) } + /// Builder for the `BatchMatrixSetDiag` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatrixSetDiag { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatrixSetDiag' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatrixSetDiagInst { + /// An instance of a fully built BatchMatrixSetDiag Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatrixSetDiag { /// Creates a new `BatchMatrixSetDiag`. @@ -8935,49 +11212,61 @@ impl BatchMatrixSetDiag { } /// Builds the `BatchMatrixSetDiag` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - diagonal: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, diagonal: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), diagonal.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - diagonal: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, diagonal: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatrixSetDiag", |nd| { nd.add_input(input); nd.add_input(diagonal); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatrixSetDiag` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, diagonal: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), diagonal.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, diagonal: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatrixSetDiag", |nd| { + nd.add_input(input); + nd.add_input(diagonal); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatrixSetDiagInst{op}) + } +} +impl BatchMatrixSetDiagInst { + /// Returns the 'output' output of this 'BatchMatrixSetDiag' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatrixSetDiagInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatrixSetDiag::new().build(input, diagonal, scope)`. -pub fn batch_matrix_set_diag< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - diagonal: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_matrix_set_diag, O1: ::std::convert::Into>(input: O0, diagonal: O1, scope: &mut crate::Scope) -> crate::Result { BatchMatrixSetDiag::new().build(input, diagonal, scope) } + /// Builder for the `BatchMatrixSolve` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatrixSolve { @@ -8985,6 +11274,12 @@ pub struct BatchMatrixSolve { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatrixSolve' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatrixSolveInst { + /// An instance of a fully built BatchMatrixSolve Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatrixSolve { /// Creates a new `BatchMatrixSolve`. @@ -9011,52 +11306,67 @@ impl BatchMatrixSolve { } /// Builds the `BatchMatrixSolve` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(matrix.into(), rhs.into(), scope) } - - fn build_impl( - &self, - matrix: crate::Output, - rhs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatrixSolve", |nd| { nd.add_input(matrix); nd.add_input(rhs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.adjoint { - nd.set_attr_bool("adjoint", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatrixSolve` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(matrix.into(), rhs.into(), scope) + } + fn build_instance_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatrixSolve", |nd| { + nd.add_input(matrix); + nd.add_input(rhs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatrixSolveInst{op}) + } +} +impl BatchMatrixSolveInst { + /// Returns the 'output' output of this 'BatchMatrixSolve' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatrixSolveInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatrixSolve::new().build(matrix, rhs, scope)`. -pub fn batch_matrix_solve< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_matrix_solve, O1: ::std::convert::Into>(matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { BatchMatrixSolve::new().build(matrix, rhs, scope) } + /// Builder for the `BatchMatrixSolveLs` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatrixSolveLs { @@ -9064,6 +11374,12 @@ pub struct BatchMatrixSolveLs { fast: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatrixSolveLs' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatrixSolveLsInst { + /// An instance of a fully built BatchMatrixSolveLs Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatrixSolveLs { /// Creates a new `BatchMatrixSolveLs`. @@ -9090,27 +11406,10 @@ impl BatchMatrixSolveLs { } /// Builds the `BatchMatrixSolveLs` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - matrix: O0, - rhs: O1, - l2_regularizer: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, matrix: O0, rhs: O1, l2_regularizer: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(matrix.into(), rhs.into(), l2_regularizer.into(), scope) } - - fn build_impl( - &self, - matrix: crate::Output, - rhs: crate::Output, - l2_regularizer: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, matrix: crate::Output, rhs: crate::Output, l2_regularizer: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatrixSolveLs", |nd| { nd.add_input(matrix); nd.add_input(rhs); @@ -9118,30 +11417,58 @@ impl BatchMatrixSolveLs { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.fast { - nd.set_attr_bool("fast", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.fast { + nd.set_attr_bool("fast", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatrixSolveLs` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, matrix: O0, rhs: O1, l2_regularizer: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(matrix.into(), rhs.into(), l2_regularizer.into(), scope) + } + fn build_instance_impl(&self, matrix: crate::Output, rhs: crate::Output, l2_regularizer: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatrixSolveLs", |nd| { + nd.add_input(matrix); + nd.add_input(rhs); + nd.add_input(l2_regularizer); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.fast { + nd.set_attr_bool("fast", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatrixSolveLsInst{op}) + } +} +impl BatchMatrixSolveLsInst { + /// Returns the 'output' output of this 'BatchMatrixSolveLs' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatrixSolveLsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatrixSolveLs::new().build(matrix, rhs, l2_regularizer, scope)`. -pub fn batch_matrix_solve_ls< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - matrix: O0, - rhs: O1, - l2_regularizer: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_matrix_solve_ls, O1: ::std::convert::Into, O2: ::std::convert::Into>(matrix: O0, rhs: O1, l2_regularizer: O2, scope: &mut crate::Scope) -> crate::Result { BatchMatrixSolveLs::new().build(matrix, rhs, l2_regularizer, scope) } + /// Builder for the `BatchMatrixTriangularSolve` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchMatrixTriangularSolve { @@ -9150,6 +11477,12 @@ pub struct BatchMatrixTriangularSolve { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchMatrixTriangularSolve' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchMatrixTriangularSolveInst { + /// An instance of a fully built BatchMatrixTriangularSolve Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchMatrixTriangularSolve { /// Creates a new `BatchMatrixTriangularSolve`. @@ -9182,55 +11515,73 @@ impl BatchMatrixTriangularSolve { } /// Builds the `BatchMatrixTriangularSolve` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(matrix.into(), rhs.into(), scope) } - - fn build_impl( - &self, - matrix: crate::Output, - rhs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchMatrixTriangularSolve", |nd| { nd.add_input(matrix); nd.add_input(rhs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.lower { - nd.set_attr_bool("lower", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adjoint { - nd.set_attr_bool("adjoint", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.lower { + nd.set_attr_bool("lower", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchMatrixTriangularSolve` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(matrix.into(), rhs.into(), scope) + } + fn build_instance_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchMatrixTriangularSolve", |nd| { + nd.add_input(matrix); + nd.add_input(rhs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.lower { + nd.set_attr_bool("lower", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchMatrixTriangularSolveInst{op}) + } +} +impl BatchMatrixTriangularSolveInst { + /// Returns the 'output' output of this 'BatchMatrixTriangularSolve' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchMatrixTriangularSolveInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchMatrixTriangularSolve::new().build(matrix, rhs, scope)`. -pub fn batch_matrix_triangular_solve< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_matrix_triangular_solve, O1: ::std::convert::Into>(matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { BatchMatrixTriangularSolve::new().build(matrix, rhs, scope) } + /// Builder for the `BatchNormWithGlobalNormalization` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchNormWithGlobalNormalization { @@ -9239,6 +11590,12 @@ pub struct BatchNormWithGlobalNormalization { scale_after_normalization: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchNormWithGlobalNormalization' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchNormWithGlobalNormalizationInst { + /// An instance of a fully built BatchNormWithGlobalNormalization Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchNormWithGlobalNormalization { /// Creates a new `BatchNormWithGlobalNormalization`. @@ -9259,10 +11616,7 @@ impl BatchNormWithGlobalNormalization { } /// Sets the `scale_after_normalization` attribute. - pub fn scale_after_normalization>( - mut self, - value: ArgType, - ) -> Self { + pub fn scale_after_normalization>(mut self, value: ArgType) -> Self { self.scale_after_normalization = ::std::option::Option::Some(value.into()); self } @@ -9274,40 +11628,10 @@ impl BatchNormWithGlobalNormalization { } /// Builds the `BatchNormWithGlobalNormalization` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - t: O0, - m: O1, - v: O2, - beta: O3, - gamma: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - t.into(), - m.into(), - v.into(), - beta.into(), - gamma.into(), - scope, - ) - } - - fn build_impl( - &self, - t: crate::Output, - m: crate::Output, - v: crate::Output, - beta: crate::Output, - gamma: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, t: O0, m: O1, v: O2, beta: O3, gamma: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(t.into(), m.into(), v.into(), beta.into(), gamma.into(), scope) + } + fn build_impl(&self, t: crate::Output, m: crate::Output, v: crate::Output, beta: crate::Output, gamma: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchNormWithGlobalNormalization", |nd| { nd.add_input(t); nd.add_input(m); @@ -9317,37 +11641,66 @@ impl BatchNormWithGlobalNormalization { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.variance_epsilon { - nd.set_attr_float("variance_epsilon", *value)?; - } - if let ::std::option::Option::Some(value) = &self.scale_after_normalization { - nd.set_attr_bool("scale_after_normalization", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.variance_epsilon { + nd.set_attr_float("variance_epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.scale_after_normalization { + nd.set_attr_bool("scale_after_normalization", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchNormWithGlobalNormalization` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, t: O0, m: O1, v: O2, beta: O3, gamma: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(t.into(), m.into(), v.into(), beta.into(), gamma.into(), scope) + } + fn build_instance_impl(&self, t: crate::Output, m: crate::Output, v: crate::Output, beta: crate::Output, gamma: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchNormWithGlobalNormalization", |nd| { + nd.add_input(t); + nd.add_input(m); + nd.add_input(v); + nd.add_input(beta); + nd.add_input(gamma); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.variance_epsilon { + nd.set_attr_float("variance_epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.scale_after_normalization { + nd.set_attr_bool("scale_after_normalization", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchNormWithGlobalNormalizationInst{op}) + } +} +impl BatchNormWithGlobalNormalizationInst { + /// Returns the 'result' output of this 'BatchNormWithGlobalNormalization' operation. + pub fn result(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchNormWithGlobalNormalizationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchNormWithGlobalNormalization::new().build(t, m, v, beta, gamma, scope)`. -pub fn batch_norm_with_global_normalization< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - t: O0, - m: O1, - v: O2, - beta: O3, - gamma: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_norm_with_global_normalization, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(t: O0, m: O1, v: O2, beta: O3, gamma: O4, scope: &mut crate::Scope) -> crate::Result { BatchNormWithGlobalNormalization::new().build(t, m, v, beta, gamma, scope) } + /// Builder for the `BatchNormWithGlobalNormalizationGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchNormWithGlobalNormalizationGrad { @@ -9356,6 +11709,12 @@ pub struct BatchNormWithGlobalNormalizationGrad { scale_after_normalization: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchNormWithGlobalNormalizationGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchNormWithGlobalNormalizationGradInst { + /// An instance of a fully built BatchNormWithGlobalNormalizationGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchNormWithGlobalNormalizationGrad { /// Creates a new `BatchNormWithGlobalNormalizationGrad`. @@ -9376,10 +11735,7 @@ impl BatchNormWithGlobalNormalizationGrad { } /// Sets the `scale_after_normalization` attribute. - pub fn scale_after_normalization>( - mut self, - value: ArgType, - ) -> Self { + pub fn scale_after_normalization>(mut self, value: ArgType) -> Self { self.scale_after_normalization = ::std::option::Option::Some(value.into()); self } @@ -9391,40 +11747,10 @@ impl BatchNormWithGlobalNormalizationGrad { } /// Builds the `BatchNormWithGlobalNormalizationGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - t: O0, - m: O1, - v: O2, - gamma: O3, - backprop: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - t.into(), - m.into(), - v.into(), - gamma.into(), - backprop.into(), - scope, - ) - } - - fn build_impl( - &self, - t: crate::Output, - m: crate::Output, - v: crate::Output, - gamma: crate::Output, - backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, t: O0, m: O1, v: O2, gamma: O3, backprop: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(t.into(), m.into(), v.into(), gamma.into(), backprop.into(), scope) + } + fn build_impl(&self, t: crate::Output, m: crate::Output, v: crate::Output, gamma: crate::Output, backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchNormWithGlobalNormalizationGrad", |nd| { nd.add_input(t); nd.add_input(m); @@ -9434,43 +11760,106 @@ impl BatchNormWithGlobalNormalizationGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.variance_epsilon { - nd.set_attr_float("variance_epsilon", *value)?; - } - if let ::std::option::Option::Some(value) = &self.scale_after_normalization { - nd.set_attr_bool("scale_after_normalization", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.variance_epsilon { + nd.set_attr_float("variance_epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.scale_after_normalization { + nd.set_attr_bool("scale_after_normalization", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchNormWithGlobalNormalizationGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, t: O0, m: O1, v: O2, gamma: O3, backprop: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(t.into(), m.into(), v.into(), gamma.into(), backprop.into(), scope) + } + fn build_instance_impl(&self, t: crate::Output, m: crate::Output, v: crate::Output, gamma: crate::Output, backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchNormWithGlobalNormalizationGrad", |nd| { + nd.add_input(t); + nd.add_input(m); + nd.add_input(v); + nd.add_input(gamma); + nd.add_input(backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.variance_epsilon { + nd.set_attr_float("variance_epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.scale_after_normalization { + nd.set_attr_bool("scale_after_normalization", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchNormWithGlobalNormalizationGradInst{op}) + } +} +impl BatchNormWithGlobalNormalizationGradInst { + /// Returns the 'dx' output of this 'BatchNormWithGlobalNormalizationGrad' operation. + pub fn dx(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'dm' output of this 'BatchNormWithGlobalNormalizationGrad' operation. + pub fn dm(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'dv' output of this 'BatchNormWithGlobalNormalizationGrad' operation. + pub fn dv(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'db' output of this 'BatchNormWithGlobalNormalizationGrad' operation. + pub fn db(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'dg' output of this 'BatchNormWithGlobalNormalizationGrad' operation. + pub fn dg(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } +} +impl Into for BatchNormWithGlobalNormalizationGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchNormWithGlobalNormalizationGrad::new().build(t, m, v, gamma, backprop, scope)`. -pub fn batch_norm_with_global_normalization_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - t: O0, - m: O1, - v: O2, - gamma: O3, - backprop: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_norm_with_global_normalization_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(t: O0, m: O1, v: O2, gamma: O3, backprop: O4, scope: &mut crate::Scope) -> crate::Result { BatchNormWithGlobalNormalizationGrad::new().build(t, m, v, gamma, backprop, scope) } + /// Builder for the `BatchSelfAdjointEig` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchSelfAdjointEig { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchSelfAdjointEig' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchSelfAdjointEigInst { + /// An instance of a fully built BatchSelfAdjointEig Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchSelfAdjointEig { /// Creates a new `BatchSelfAdjointEig`. @@ -9491,39 +11880,59 @@ impl BatchSelfAdjointEig { } /// Builds the `BatchSelfAdjointEig` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchSelfAdjointEig", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchSelfAdjointEig` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchSelfAdjointEig", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchSelfAdjointEigInst{op}) + } +} +impl BatchSelfAdjointEigInst { + /// Returns the 'output' output of this 'BatchSelfAdjointEig' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchSelfAdjointEigInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchSelfAdjointEig::new().build(input, scope)`. -pub fn batch_self_adjoint_eig>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_self_adjoint_eig>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchSelfAdjointEig::new().build(input, scope) } + /// Builder for the `BatchSelfAdjointEigV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchSelfAdjointEigV2 { @@ -9531,6 +11940,12 @@ pub struct BatchSelfAdjointEigV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchSelfAdjointEigV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchSelfAdjointEigV2Inst { + /// An instance of a fully built BatchSelfAdjointEigV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchSelfAdjointEigV2 { /// Creates a new `BatchSelfAdjointEigV2`. @@ -9557,42 +11972,72 @@ impl BatchSelfAdjointEigV2 { } /// Builds the `BatchSelfAdjointEigV2` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchSelfAdjointEigV2", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.compute_v { - nd.set_attr_bool("compute_v", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.compute_v { + nd.set_attr_bool("compute_v", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchSelfAdjointEigV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchSelfAdjointEigV2", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.compute_v { + nd.set_attr_bool("compute_v", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchSelfAdjointEigV2Inst{op}) + } +} +impl BatchSelfAdjointEigV2Inst { + /// Returns the 'e' output of this 'BatchSelfAdjointEigV2' operation. + pub fn e(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'v' output of this 'BatchSelfAdjointEigV2' operation. + pub fn v(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for BatchSelfAdjointEigV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchSelfAdjointEigV2::new().build(input, scope)`. -pub fn batch_self_adjoint_eig_v2>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_self_adjoint_eig_v2>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchSelfAdjointEigV2::new().build(input, scope) } + /// Builder for the `BatchSvd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchSvd { @@ -9601,6 +12046,12 @@ pub struct BatchSvd { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchSvd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchSvdInst { + /// An instance of a fully built BatchSvd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchSvd { /// Creates a new `BatchSvd`. @@ -9633,45 +12084,85 @@ impl BatchSvd { } /// Builds the `BatchSvd` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchSvd", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.compute_uv { - nd.set_attr_bool("compute_uv", *value)?; - } - if let ::std::option::Option::Some(value) = &self.full_matrices { - nd.set_attr_bool("full_matrices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.compute_uv { + nd.set_attr_bool("compute_uv", *value)?; + } + if let ::std::option::Option::Some(value) = &self.full_matrices { + nd.set_attr_bool("full_matrices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchSvd` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchSvd", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.compute_uv { + nd.set_attr_bool("compute_uv", *value)?; + } + if let ::std::option::Option::Some(value) = &self.full_matrices { + nd.set_attr_bool("full_matrices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchSvdInst{op}) + } +} +impl BatchSvdInst { + /// Returns the 's' output of this 'BatchSvd' operation. + pub fn s(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'u' output of this 'BatchSvd' operation. + pub fn u(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'v' output of this 'BatchSvd' operation. + pub fn v(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for BatchSvdInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchSvd::new().build(input, scope)`. -pub fn batch_svd>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_svd>(input: O0, scope: &mut crate::Scope) -> crate::Result { BatchSvd::new().build(input, scope) } + /// Builder for the `BatchToSpace` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchToSpace { @@ -9680,6 +12171,12 @@ pub struct BatchToSpace { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchToSpace' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchToSpaceInst { + /// An instance of a fully built BatchToSpace Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchToSpace { /// Creates a new `BatchToSpace`. @@ -9712,55 +12209,73 @@ impl BatchToSpace { } /// Builds the `BatchToSpace` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - crops: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, crops: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), crops.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - crops: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, crops: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchToSpace", |nd| { nd.add_input(input); nd.add_input(crops); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.block_size { - nd.set_attr_int("block_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.block_size { + nd.set_attr_int("block_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchToSpace` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, crops: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), crops.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, crops: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchToSpace", |nd| { + nd.add_input(input); + nd.add_input(crops); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.block_size { + nd.set_attr_int("block_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchToSpaceInst{op}) + } +} +impl BatchToSpaceInst { + /// Returns the 'output' output of this 'BatchToSpace' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchToSpaceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchToSpace::new().build(input, crops, scope)`. -pub fn batch_to_space< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - crops: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_to_space, O1: ::std::convert::Into>(input: O0, crops: O1, scope: &mut crate::Scope) -> crate::Result { BatchToSpace::new().build(input, crops, scope) } + /// Builder for the `BatchToSpaceND` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BatchToSpaceND { @@ -9769,6 +12284,12 @@ pub struct BatchToSpaceND { Tcrops: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BatchToSpaceND' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BatchToSpaceNDInst { + /// An instance of a fully built BatchToSpaceND Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BatchToSpaceND { /// Creates a new `BatchToSpaceND`. @@ -9783,19 +12304,13 @@ impl BatchToSpaceND { } /// Sets the `Tblock_shape` attribute. - pub fn Tblock_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tblock_shape>(mut self, value: ArgType) -> Self { self.Tblock_shape = ::std::option::Option::Some(value.into()); self } /// Sets the `Tcrops` attribute. - pub fn Tcrops>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcrops>(mut self, value: ArgType) -> Self { self.Tcrops = ::std::option::Option::Some(value.into()); self } @@ -9807,27 +12322,10 @@ impl BatchToSpaceND { } /// Builds the `BatchToSpaceND` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - block_shape: O1, - crops: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, block_shape: O1, crops: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), block_shape.into(), crops.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - block_shape: crate::Output, - crops: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, block_shape: crate::Output, crops: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BatchToSpaceND", |nd| { nd.add_input(input); nd.add_input(block_shape); @@ -9835,39 +12333,76 @@ impl BatchToSpaceND { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tblock_shape { - nd.set_attr_type("Tblock_shape", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcrops { - nd.set_attr_type("Tcrops", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tblock_shape { + nd.set_attr_type("Tblock_shape", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcrops { + nd.set_attr_type("Tcrops", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BatchToSpaceND` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, block_shape: O1, crops: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), block_shape.into(), crops.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, block_shape: crate::Output, crops: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BatchToSpaceND", |nd| { + nd.add_input(input); + nd.add_input(block_shape); + nd.add_input(crops); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tblock_shape { + nd.set_attr_type("Tblock_shape", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcrops { + nd.set_attr_type("Tcrops", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BatchToSpaceNDInst{op}) + } +} +impl BatchToSpaceNDInst { + /// Returns the 'output' output of this 'BatchToSpaceND' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BatchToSpaceNDInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BatchToSpaceND::new().build(input, block_shape, crops, scope)`. -pub fn batch_to_space_nd< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - block_shape: O1, - crops: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn batch_to_space_nd, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, block_shape: O1, crops: O2, scope: &mut crate::Scope) -> crate::Result { BatchToSpaceND::new().build(input, block_shape, crops, scope) } + /// Builder for the `BesselI0` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselI0 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselI0' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselI0Inst { + /// An instance of a fully built BesselI0 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselI0 { /// Creates a new `BesselI0`. @@ -9888,45 +12423,71 @@ impl BesselI0 { } /// Builds the `BesselI0` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselI0", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselI0` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselI0", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselI0Inst{op}) + } +} +impl BesselI0Inst { + /// Returns the 'y' output of this 'BesselI0' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselI0Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselI0::new().build(x, scope)`. -pub fn bessel_i0>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_i0>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselI0::new().build(x, scope) } + /// Builder for the `BesselI0e` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselI0e { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselI0e' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselI0eInst { + /// An instance of a fully built BesselI0e Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselI0e { /// Creates a new `BesselI0e`. @@ -9947,45 +12508,71 @@ impl BesselI0e { } /// Builds the `BesselI0e` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselI0e", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselI0e` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselI0e", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselI0eInst{op}) + } +} +impl BesselI0eInst { + /// Returns the 'y' output of this 'BesselI0e' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselI0eInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselI0e::new().build(x, scope)`. -pub fn bessel_i0e>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_i0e>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselI0e::new().build(x, scope) } + /// Builder for the `BesselI1` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselI1 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselI1' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselI1Inst { + /// An instance of a fully built BesselI1 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselI1 { /// Creates a new `BesselI1`. @@ -10006,45 +12593,71 @@ impl BesselI1 { } /// Builds the `BesselI1` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselI1", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselI1` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselI1", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselI1Inst{op}) + } +} +impl BesselI1Inst { + /// Returns the 'y' output of this 'BesselI1' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselI1Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselI1::new().build(x, scope)`. -pub fn bessel_i1>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_i1>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselI1::new().build(x, scope) } + /// Builder for the `BesselI1e` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselI1e { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselI1e' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselI1eInst { + /// An instance of a fully built BesselI1e Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselI1e { /// Creates a new `BesselI1e`. @@ -10065,45 +12678,71 @@ impl BesselI1e { } /// Builds the `BesselI1e` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselI1e", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselI1e` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselI1e", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselI1eInst{op}) + } +} +impl BesselI1eInst { + /// Returns the 'y' output of this 'BesselI1e' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselI1eInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselI1e::new().build(x, scope)`. -pub fn bessel_i1e>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_i1e>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselI1e::new().build(x, scope) } + /// Builder for the `BesselJ0` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselJ0 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselJ0' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselJ0Inst { + /// An instance of a fully built BesselJ0 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselJ0 { /// Creates a new `BesselJ0`. @@ -10124,45 +12763,71 @@ impl BesselJ0 { } /// Builds the `BesselJ0` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselJ0", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselJ0` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselJ0", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselJ0Inst{op}) + } +} +impl BesselJ0Inst { + /// Returns the 'y' output of this 'BesselJ0' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselJ0Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselJ0::new().build(x, scope)`. -pub fn bessel_j0>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_j0>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselJ0::new().build(x, scope) } + /// Builder for the `BesselJ1` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselJ1 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselJ1' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselJ1Inst { + /// An instance of a fully built BesselJ1 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselJ1 { /// Creates a new `BesselJ1`. @@ -10183,45 +12848,71 @@ impl BesselJ1 { } /// Builds the `BesselJ1` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselJ1", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselJ1` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselJ1", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselJ1Inst{op}) + } +} +impl BesselJ1Inst { + /// Returns the 'y' output of this 'BesselJ1' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselJ1Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselJ1::new().build(x, scope)`. -pub fn bessel_j1>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_j1>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselJ1::new().build(x, scope) } + /// Builder for the `BesselK0` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselK0 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselK0' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselK0Inst { + /// An instance of a fully built BesselK0 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselK0 { /// Creates a new `BesselK0`. @@ -10242,45 +12933,71 @@ impl BesselK0 { } /// Builds the `BesselK0` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselK0", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselK0` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselK0", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselK0Inst{op}) + } +} +impl BesselK0Inst { + /// Returns the 'y' output of this 'BesselK0' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselK0Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselK0::new().build(x, scope)`. -pub fn bessel_k0>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_k0>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselK0::new().build(x, scope) } + /// Builder for the `BesselK0e` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselK0e { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselK0e' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselK0eInst { + /// An instance of a fully built BesselK0e Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselK0e { /// Creates a new `BesselK0e`. @@ -10301,45 +13018,71 @@ impl BesselK0e { } /// Builds the `BesselK0e` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselK0e", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselK0e` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselK0e", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselK0eInst{op}) + } +} +impl BesselK0eInst { + /// Returns the 'y' output of this 'BesselK0e' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselK0eInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselK0e::new().build(x, scope)`. -pub fn bessel_k0e>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_k0e>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselK0e::new().build(x, scope) } + /// Builder for the `BesselK1` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselK1 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselK1' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselK1Inst { + /// An instance of a fully built BesselK1 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselK1 { /// Creates a new `BesselK1`. @@ -10360,45 +13103,71 @@ impl BesselK1 { } /// Builds the `BesselK1` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselK1", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselK1` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselK1", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselK1Inst{op}) + } +} +impl BesselK1Inst { + /// Returns the 'y' output of this 'BesselK1' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselK1Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselK1::new().build(x, scope)`. -pub fn bessel_k1>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_k1>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselK1::new().build(x, scope) } + /// Builder for the `BesselK1e` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselK1e { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselK1e' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselK1eInst { + /// An instance of a fully built BesselK1e Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselK1e { /// Creates a new `BesselK1e`. @@ -10419,45 +13188,71 @@ impl BesselK1e { } /// Builds the `BesselK1e` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselK1e", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselK1e` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselK1e", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselK1eInst{op}) + } +} +impl BesselK1eInst { + /// Returns the 'y' output of this 'BesselK1e' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselK1eInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselK1e::new().build(x, scope)`. -pub fn bessel_k1e>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_k1e>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselK1e::new().build(x, scope) } + /// Builder for the `BesselY0` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselY0 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselY0' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselY0Inst { + /// An instance of a fully built BesselY0 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselY0 { /// Creates a new `BesselY0`. @@ -10478,45 +13273,71 @@ impl BesselY0 { } /// Builds the `BesselY0` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselY0", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselY0` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselY0", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselY0Inst{op}) + } +} +impl BesselY0Inst { + /// Returns the 'y' output of this 'BesselY0' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselY0Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselY0::new().build(x, scope)`. -pub fn bessel_y0>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_y0>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselY0::new().build(x, scope) } + /// Builder for the `BesselY1` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BesselY1 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BesselY1' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BesselY1Inst { + /// An instance of a fully built BesselY1 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BesselY1 { /// Creates a new `BesselY1`. @@ -10537,45 +13358,71 @@ impl BesselY1 { } /// Builds the `BesselY1` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BesselY1", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BesselY1` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BesselY1", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BesselY1Inst{op}) + } +} +impl BesselY1Inst { + /// Returns the 'y' output of this 'BesselY1' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BesselY1Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BesselY1::new().build(x, scope)`. -pub fn bessel_y1>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bessel_y1>(x: O0, scope: &mut crate::Scope) -> crate::Result { BesselY1::new().build(x, scope) } + /// Builder for the `Betainc` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Betainc { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Betainc' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BetaincInst { + /// An instance of a fully built Betainc Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Betainc { /// Creates a new `Betainc`. @@ -10596,27 +13443,10 @@ impl Betainc { } /// Builds the `Betainc` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - x: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, a: O0, b: O1, x: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), b.into(), x.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, b: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Betainc", |nd| { nd.add_input(a); nd.add_input(b); @@ -10624,27 +13454,52 @@ impl Betainc { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Betainc` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, a: O0, b: O1, x: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), x.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Betainc", |nd| { + nd.add_input(a); + nd.add_input(b); + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BetaincInst{op}) + } +} +impl BetaincInst { + /// Returns the 'z' output of this 'Betainc' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BetaincInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Betainc::new().build(a, b, x, scope)`. -pub fn betainc< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - a: O0, - b: O1, - x: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn betainc, O1: ::std::convert::Into, O2: ::std::convert::Into>(a: O0, b: O1, x: O2, scope: &mut crate::Scope) -> crate::Result { Betainc::new().build(a, b, x, scope) } + /// Builder for the `BiasAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BiasAdd { @@ -10652,6 +13507,12 @@ pub struct BiasAdd { data_format: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'BiasAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BiasAddInst { + /// An instance of a fully built BiasAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BiasAdd { /// Creates a new `BiasAdd`. @@ -10666,10 +13527,7 @@ impl BiasAdd { } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -10681,52 +13539,67 @@ impl BiasAdd { } /// Builds the `BiasAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - value: O0, - bias: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, value: O0, bias: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), bias.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - bias: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, bias: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BiasAdd", |nd| { nd.add_input(value); nd.add_input(bias); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BiasAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, value: O0, bias: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), bias.into(), scope) + } + fn build_instance_impl(&self, value: crate::Output, bias: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BiasAdd", |nd| { + nd.add_input(value); + nd.add_input(bias); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BiasAddInst{op}) + } +} +impl BiasAddInst { + /// Returns the 'output' output of this 'BiasAdd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BiasAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BiasAdd::new().build(value, bias, scope)`. -pub fn bias_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - value: O0, - bias: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bias_add, O1: ::std::convert::Into>(value: O0, bias: O1, scope: &mut crate::Scope) -> crate::Result { BiasAdd::new().build(value, bias, scope) } + /// Builder for the `BiasAddGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BiasAddGrad { @@ -10734,6 +13607,12 @@ pub struct BiasAddGrad { data_format: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'BiasAddGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BiasAddGradInst { + /// An instance of a fully built BiasAddGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BiasAddGrad { /// Creates a new `BiasAddGrad`. @@ -10748,10 +13627,7 @@ impl BiasAddGrad { } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -10763,48 +13639,77 @@ impl BiasAddGrad { } /// Builds the `BiasAddGrad` operation. - pub fn build>( - &self, - out_backprop: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, out_backprop: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(out_backprop.into(), scope) } - - fn build_impl( - &self, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BiasAddGrad", |nd| { nd.add_input(out_backprop); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BiasAddGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, out_backprop: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(out_backprop.into(), scope) + } + fn build_instance_impl(&self, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BiasAddGrad", |nd| { + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BiasAddGradInst{op}) + } +} +impl BiasAddGradInst { + /// Returns the 'output' output of this 'BiasAddGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BiasAddGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BiasAddGrad::new().build(out_backprop, scope)`. -pub fn bias_add_grad>( - out_backprop: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bias_add_grad>(out_backprop: O0, scope: &mut crate::Scope) -> crate::Result { BiasAddGrad::new().build(out_backprop, scope) } + /// Builder for the `BiasAddV1` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BiasAddV1 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BiasAddV1' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BiasAddV1Inst { + /// An instance of a fully built BiasAddV1 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BiasAddV1 { /// Creates a new `BiasAddV1`. @@ -10825,55 +13730,73 @@ impl BiasAddV1 { } /// Builds the `BiasAddV1` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - value: O0, - bias: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, value: O0, bias: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), bias.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - bias: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, bias: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BiasAddV1", |nd| { nd.add_input(value); nd.add_input(bias); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BiasAddV1` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, value: O0, bias: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), bias.into(), scope) + } + fn build_instance_impl(&self, value: crate::Output, bias: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BiasAddV1", |nd| { + nd.add_input(value); + nd.add_input(bias); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BiasAddV1Inst{op}) + } +} +impl BiasAddV1Inst { + /// Returns the 'output' output of this 'BiasAddV1' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BiasAddV1Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BiasAddV1::new().build(value, bias, scope)`. -pub fn bias_add_v1< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - value: O0, - bias: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bias_add_v1, O1: ::std::convert::Into>(value: O0, bias: O1, scope: &mut crate::Scope) -> crate::Result { BiasAddV1::new().build(value, bias, scope) } + /// Builder for the `Bincount` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Bincount { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Bincount' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BincountInst { + /// An instance of a fully built Bincount Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Bincount { /// Creates a new `Bincount`. @@ -10894,27 +13817,10 @@ impl Bincount { } /// Builds the `Bincount` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - arr: O0, - size: O1, - weights: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, arr: O0, size: O1, weights: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(arr.into(), size.into(), weights.into(), scope) } - - fn build_impl( - &self, - arr: crate::Output, - size: crate::Output, - weights: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, arr: crate::Output, size: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Bincount", |nd| { nd.add_input(arr); nd.add_input(size); @@ -10922,27 +13828,52 @@ impl Bincount { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Bincount` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, arr: O0, size: O1, weights: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(arr.into(), size.into(), weights.into(), scope) + } + fn build_instance_impl(&self, arr: crate::Output, size: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Bincount", |nd| { + nd.add_input(arr); + nd.add_input(size); + nd.add_input(weights); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BincountInst{op}) + } +} +impl BincountInst { + /// Returns the 'bins' output of this 'Bincount' operation. + pub fn bins(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BincountInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Bincount::new().build(arr, size, weights, scope)`. -pub fn bincount< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - arr: O0, - size: O1, - weights: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bincount, O1: ::std::convert::Into, O2: ::std::convert::Into>(arr: O0, size: O1, weights: O2, scope: &mut crate::Scope) -> crate::Result { Bincount::new().build(arr, size, weights, scope) } + /// Builder for the `Bitcast` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Bitcast { @@ -10950,6 +13881,12 @@ pub struct Bitcast { type_: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Bitcast' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BitcastInst { + /// An instance of a fully built Bitcast Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Bitcast { /// Creates a new `Bitcast`. @@ -10976,48 +13913,77 @@ impl Bitcast { } /// Builds the `Bitcast` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Bitcast", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.type_ { - nd.set_attr_type("type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Bitcast` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Bitcast", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BitcastInst{op}) + } +} +impl BitcastInst { + /// Returns the 'output' output of this 'Bitcast' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BitcastInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Bitcast::new().build(input, scope)`. -pub fn bitcast>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bitcast>(input: O0, scope: &mut crate::Scope) -> crate::Result { Bitcast::new().build(input, scope) } + /// Builder for the `BitwiseAnd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BitwiseAnd { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BitwiseAnd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BitwiseAndInst { + /// An instance of a fully built BitwiseAnd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BitwiseAnd { /// Creates a new `BitwiseAnd`. @@ -11038,55 +14004,73 @@ impl BitwiseAnd { } /// Builds the `BitwiseAnd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BitwiseAnd", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BitwiseAnd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BitwiseAnd", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BitwiseAndInst{op}) + } +} +impl BitwiseAndInst { + /// Returns the 'z' output of this 'BitwiseAnd' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BitwiseAndInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BitwiseAnd::new().build(x, y, scope)`. -pub fn bitwise_and< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bitwise_and, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { BitwiseAnd::new().build(x, y, scope) } + /// Builder for the `BitwiseOr` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BitwiseOr { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BitwiseOr' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BitwiseOrInst { + /// An instance of a fully built BitwiseOr Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BitwiseOr { /// Creates a new `BitwiseOr`. @@ -11107,55 +14091,73 @@ impl BitwiseOr { } /// Builds the `BitwiseOr` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BitwiseOr", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BitwiseOr` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BitwiseOr", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BitwiseOrInst{op}) + } +} +impl BitwiseOrInst { + /// Returns the 'z' output of this 'BitwiseOr' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BitwiseOrInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BitwiseOr::new().build(x, y, scope)`. -pub fn bitwise_or< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bitwise_or, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { BitwiseOr::new().build(x, y, scope) } + /// Builder for the `BitwiseXor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BitwiseXor { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BitwiseXor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BitwiseXorInst { + /// An instance of a fully built BitwiseXor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BitwiseXor { /// Creates a new `BitwiseXor`. @@ -11176,49 +14178,61 @@ impl BitwiseXor { } /// Builds the `BitwiseXor` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BitwiseXor", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BitwiseXor` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BitwiseXor", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BitwiseXorInst{op}) + } +} +impl BitwiseXorInst { + /// Returns the 'z' output of this 'BitwiseXor' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BitwiseXorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BitwiseXor::new().build(x, y, scope)`. -pub fn bitwise_xor< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bitwise_xor, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { BitwiseXor::new().build(x, y, scope) } + /// Builder for the `BlockLSTM` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BlockLSTM { @@ -11228,6 +14242,12 @@ pub struct BlockLSTM { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BlockLSTM' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BlockLSTMInst { + /// An instance of a fully built BlockLSTM Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BlockLSTM { /// Creates a new `BlockLSTM`. @@ -11266,56 +14286,10 @@ impl BlockLSTM { } /// Builds the `BlockLSTM` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - seq_len_max: O0, - x: O1, - cs_prev: O2, - h_prev: O3, - w: O4, - wci: O5, - wcf: O6, - wco: O7, - b: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - seq_len_max.into(), - x.into(), - cs_prev.into(), - h_prev.into(), - w.into(), - wci.into(), - wcf.into(), - wco.into(), - b.into(), - scope, - ) - } - - fn build_impl( - &self, - seq_len_max: crate::Output, - x: crate::Output, - cs_prev: crate::Output, - h_prev: crate::Output, - w: crate::Output, - wci: crate::Output, - wcf: crate::Output, - wco: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(seq_len_max.into(), x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), scope) + } + fn build_impl(&self, seq_len_max: crate::Output, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BlockLSTM", |nd| { nd.add_input(seq_len_max); nd.add_input(x); @@ -11329,48 +14303,118 @@ impl BlockLSTM { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.forget_bias { - nd.set_attr_float("forget_bias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.cell_clip { - nd.set_attr_float("cell_clip", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_peephole { - nd.set_attr_bool("use_peephole", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.forget_bias { + nd.set_attr_float("forget_bias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.cell_clip { + nd.set_attr_float("cell_clip", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BlockLSTM` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(seq_len_max.into(), x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), scope) + } + fn build_instance_impl(&self, seq_len_max: crate::Output, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BlockLSTM", |nd| { + nd.add_input(seq_len_max); + nd.add_input(x); + nd.add_input(cs_prev); + nd.add_input(h_prev); + nd.add_input(w); + nd.add_input(wci); + nd.add_input(wcf); + nd.add_input(wco); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.forget_bias { + nd.set_attr_float("forget_bias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.cell_clip { + nd.set_attr_float("cell_clip", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BlockLSTMInst{op}) + } +} +impl BlockLSTMInst { + /// Returns the 'i' output of this 'BlockLSTM' operation. + pub fn i(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'cs' output of this 'BlockLSTM' operation. + pub fn cs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'f' output of this 'BlockLSTM' operation. + pub fn f(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'o' output of this 'BlockLSTM' operation. + pub fn o(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'ci' output of this 'BlockLSTM' operation. + pub fn ci(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } + /// Returns the 'co' output of this 'BlockLSTM' operation. + pub fn co(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 5 + } + } + /// Returns the 'h' output of this 'BlockLSTM' operation. + pub fn h(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 6 + } + } +} +impl Into for BlockLSTMInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BlockLSTM::new().build(seq_len_max, x, cs_prev, h_prev, w, wci, wcf, wco, b, scope)`. -pub fn block_lstm< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - seq_len_max: O0, - x: O1, - cs_prev: O2, - h_prev: O3, - w: O4, - wci: O5, - wcf: O6, - wco: O7, - b: O8, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn block_lstm, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, scope: &mut crate::Scope) -> crate::Result { BlockLSTM::new().build(seq_len_max, x, cs_prev, h_prev, w, wci, wcf, wco, b, scope) } + /// Builder for the `BlockLSTMGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BlockLSTMGrad { @@ -11378,6 +14422,12 @@ pub struct BlockLSTMGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BlockLSTMGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BlockLSTMGradInst { + /// An instance of a fully built BlockLSTMGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BlockLSTMGrad { /// Creates a new `BlockLSTMGrad`. @@ -11404,92 +14454,10 @@ impl BlockLSTMGrad { } /// Builds the `BlockLSTMGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - O12: ::std::convert::Into, - O13: ::std::convert::Into, - O14: ::std::convert::Into, - O15: ::std::convert::Into, - O16: ::std::convert::Into, - O17: ::std::convert::Into, - >( - &self, - seq_len_max: O0, - x: O1, - cs_prev: O2, - h_prev: O3, - w: O4, - wci: O5, - wcf: O6, - wco: O7, - b: O8, - i: O9, - cs: O10, - f: O11, - o: O12, - ci: O13, - co: O14, - h: O15, - cs_grad: O16, - h_grad: O17, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - seq_len_max.into(), - x.into(), - cs_prev.into(), - h_prev.into(), - w.into(), - wci.into(), - wcf.into(), - wco.into(), - b.into(), - i.into(), - cs.into(), - f.into(), - o.into(), - ci.into(), - co.into(), - h.into(), - cs_grad.into(), - h_grad.into(), - scope, - ) - } - - fn build_impl( - &self, - seq_len_max: crate::Output, - x: crate::Output, - cs_prev: crate::Output, - h_prev: crate::Output, - w: crate::Output, - wci: crate::Output, - wcf: crate::Output, - wco: crate::Output, - b: crate::Output, - i: crate::Output, - cs: crate::Output, - f: crate::Output, - o: crate::Output, - ci: crate::Output, - co: crate::Output, - h: crate::Output, - cs_grad: crate::Output, - h_grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into, O15: ::std::convert::Into, O16: ::std::convert::Into, O17: ::std::convert::Into>(&self, seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, i: O9, cs: O10, f: O11, o: O12, ci: O13, co: O14, h: O15, cs_grad: O16, h_grad: O17, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(seq_len_max.into(), x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), i.into(), cs.into(), f.into(), o.into(), ci.into(), co.into(), h.into(), cs_grad.into(), h_grad.into(), scope) + } + fn build_impl(&self, seq_len_max: crate::Output, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, i: crate::Output, cs: crate::Output, f: crate::Output, o: crate::Output, ci: crate::Output, co: crate::Output, h: crate::Output, cs_grad: crate::Output, h_grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BlockLSTMGrad", |nd| { nd.add_input(seq_len_max); nd.add_input(x); @@ -11512,80 +14480,122 @@ impl BlockLSTMGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.use_peephole { - nd.set_attr_bool("use_peephole", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BlockLSTMGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into, O15: ::std::convert::Into, O16: ::std::convert::Into, O17: ::std::convert::Into>(&self, seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, i: O9, cs: O10, f: O11, o: O12, ci: O13, co: O14, h: O15, cs_grad: O16, h_grad: O17, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(seq_len_max.into(), x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), i.into(), cs.into(), f.into(), o.into(), ci.into(), co.into(), h.into(), cs_grad.into(), h_grad.into(), scope) + } + fn build_instance_impl(&self, seq_len_max: crate::Output, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, i: crate::Output, cs: crate::Output, f: crate::Output, o: crate::Output, ci: crate::Output, co: crate::Output, h: crate::Output, cs_grad: crate::Output, h_grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BlockLSTMGrad", |nd| { + nd.add_input(seq_len_max); + nd.add_input(x); + nd.add_input(cs_prev); + nd.add_input(h_prev); + nd.add_input(w); + nd.add_input(wci); + nd.add_input(wcf); + nd.add_input(wco); + nd.add_input(b); + nd.add_input(i); + nd.add_input(cs); + nd.add_input(f); + nd.add_input(o); + nd.add_input(ci); + nd.add_input(co); + nd.add_input(h); + nd.add_input(cs_grad); + nd.add_input(h_grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BlockLSTMGradInst{op}) + } +} +impl BlockLSTMGradInst { + /// Returns the 'x_grad' output of this 'BlockLSTMGrad' operation. + pub fn x_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'cs_prev_grad' output of this 'BlockLSTMGrad' operation. + pub fn cs_prev_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'h_prev_grad' output of this 'BlockLSTMGrad' operation. + pub fn h_prev_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'w_grad' output of this 'BlockLSTMGrad' operation. + pub fn w_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'wci_grad' output of this 'BlockLSTMGrad' operation. + pub fn wci_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } + /// Returns the 'wcf_grad' output of this 'BlockLSTMGrad' operation. + pub fn wcf_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 5 + } + } + /// Returns the 'wco_grad' output of this 'BlockLSTMGrad' operation. + pub fn wco_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 6 + } + } + /// Returns the 'b_grad' output of this 'BlockLSTMGrad' operation. + pub fn b_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 7 + } + } +} +impl Into for BlockLSTMGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BlockLSTMGrad::new().build(seq_len_max, x, cs_prev, h_prev, w, wci, wcf, wco, b, i, cs, f, o, ci, co, h, cs_grad, h_grad, scope)`. -pub fn block_lstmgrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - O12: ::std::convert::Into, - O13: ::std::convert::Into, - O14: ::std::convert::Into, - O15: ::std::convert::Into, - O16: ::std::convert::Into, - O17: ::std::convert::Into, ->( - seq_len_max: O0, - x: O1, - cs_prev: O2, - h_prev: O3, - w: O4, - wci: O5, - wcf: O6, - wco: O7, - b: O8, - i: O9, - cs: O10, - f: O11, - o: O12, - ci: O13, - co: O14, - h: O15, - cs_grad: O16, - h_grad: O17, - scope: &mut crate::Scope, -) -> crate::Result { - BlockLSTMGrad::new().build( - seq_len_max, - x, - cs_prev, - h_prev, - w, - wci, - wcf, - wco, - b, - i, - cs, - f, - o, - ci, - co, - h, - cs_grad, - h_grad, - scope, - ) +pub fn block_lstmgrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into, O15: ::std::convert::Into, O16: ::std::convert::Into, O17: ::std::convert::Into>(seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, i: O9, cs: O10, f: O11, o: O12, ci: O13, co: O14, h: O15, cs_grad: O16, h_grad: O17, scope: &mut crate::Scope) -> crate::Result { + BlockLSTMGrad::new().build(seq_len_max, x, cs_prev, h_prev, w, wci, wcf, wco, b, i, cs, f, o, ci, co, h, cs_grad, h_grad, scope) } + /// Builder for the `BlockLSTMGradV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BlockLSTMGradV2 { @@ -11593,6 +14603,12 @@ pub struct BlockLSTMGradV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BlockLSTMGradV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BlockLSTMGradV2Inst { + /// An instance of a fully built BlockLSTMGradV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BlockLSTMGradV2 { /// Creates a new `BlockLSTMGradV2`. @@ -11619,92 +14635,10 @@ impl BlockLSTMGradV2 { } /// Builds the `BlockLSTMGradV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - O12: ::std::convert::Into, - O13: ::std::convert::Into, - O14: ::std::convert::Into, - O15: ::std::convert::Into, - O16: ::std::convert::Into, - O17: ::std::convert::Into, - >( - &self, - seq_len_max: O0, - x: O1, - cs_prev: O2, - h_prev: O3, - w: O4, - wci: O5, - wcf: O6, - wco: O7, - b: O8, - i: O9, - cs: O10, - f: O11, - o: O12, - ci: O13, - co: O14, - h: O15, - cs_grad: O16, - h_grad: O17, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - seq_len_max.into(), - x.into(), - cs_prev.into(), - h_prev.into(), - w.into(), - wci.into(), - wcf.into(), - wco.into(), - b.into(), - i.into(), - cs.into(), - f.into(), - o.into(), - ci.into(), - co.into(), - h.into(), - cs_grad.into(), - h_grad.into(), - scope, - ) - } - - fn build_impl( - &self, - seq_len_max: crate::Output, - x: crate::Output, - cs_prev: crate::Output, - h_prev: crate::Output, - w: crate::Output, - wci: crate::Output, - wcf: crate::Output, - wco: crate::Output, - b: crate::Output, - i: crate::Output, - cs: crate::Output, - f: crate::Output, - o: crate::Output, - ci: crate::Output, - co: crate::Output, - h: crate::Output, - cs_grad: crate::Output, - h_grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into, O15: ::std::convert::Into, O16: ::std::convert::Into, O17: ::std::convert::Into>(&self, seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, i: O9, cs: O10, f: O11, o: O12, ci: O13, co: O14, h: O15, cs_grad: O16, h_grad: O17, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(seq_len_max.into(), x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), i.into(), cs.into(), f.into(), o.into(), ci.into(), co.into(), h.into(), cs_grad.into(), h_grad.into(), scope) + } + fn build_impl(&self, seq_len_max: crate::Output, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, i: crate::Output, cs: crate::Output, f: crate::Output, o: crate::Output, ci: crate::Output, co: crate::Output, h: crate::Output, cs_grad: crate::Output, h_grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BlockLSTMGradV2", |nd| { nd.add_input(seq_len_max); nd.add_input(x); @@ -11727,80 +14661,122 @@ impl BlockLSTMGradV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.use_peephole { - nd.set_attr_bool("use_peephole", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BlockLSTMGradV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into, O15: ::std::convert::Into, O16: ::std::convert::Into, O17: ::std::convert::Into>(&self, seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, i: O9, cs: O10, f: O11, o: O12, ci: O13, co: O14, h: O15, cs_grad: O16, h_grad: O17, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(seq_len_max.into(), x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), i.into(), cs.into(), f.into(), o.into(), ci.into(), co.into(), h.into(), cs_grad.into(), h_grad.into(), scope) + } + fn build_instance_impl(&self, seq_len_max: crate::Output, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, i: crate::Output, cs: crate::Output, f: crate::Output, o: crate::Output, ci: crate::Output, co: crate::Output, h: crate::Output, cs_grad: crate::Output, h_grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BlockLSTMGradV2", |nd| { + nd.add_input(seq_len_max); + nd.add_input(x); + nd.add_input(cs_prev); + nd.add_input(h_prev); + nd.add_input(w); + nd.add_input(wci); + nd.add_input(wcf); + nd.add_input(wco); + nd.add_input(b); + nd.add_input(i); + nd.add_input(cs); + nd.add_input(f); + nd.add_input(o); + nd.add_input(ci); + nd.add_input(co); + nd.add_input(h); + nd.add_input(cs_grad); + nd.add_input(h_grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BlockLSTMGradV2Inst{op}) + } +} +impl BlockLSTMGradV2Inst { + /// Returns the 'x_grad' output of this 'BlockLSTMGradV2' operation. + pub fn x_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'cs_prev_grad' output of this 'BlockLSTMGradV2' operation. + pub fn cs_prev_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'h_prev_grad' output of this 'BlockLSTMGradV2' operation. + pub fn h_prev_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'w_grad' output of this 'BlockLSTMGradV2' operation. + pub fn w_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'wci_grad' output of this 'BlockLSTMGradV2' operation. + pub fn wci_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } + /// Returns the 'wcf_grad' output of this 'BlockLSTMGradV2' operation. + pub fn wcf_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 5 + } + } + /// Returns the 'wco_grad' output of this 'BlockLSTMGradV2' operation. + pub fn wco_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 6 + } + } + /// Returns the 'b_grad' output of this 'BlockLSTMGradV2' operation. + pub fn b_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 7 + } + } +} +impl Into for BlockLSTMGradV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BlockLSTMGradV2::new().build(seq_len_max, x, cs_prev, h_prev, w, wci, wcf, wco, b, i, cs, f, o, ci, co, h, cs_grad, h_grad, scope)`. -pub fn block_lstmgrad_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - O12: ::std::convert::Into, - O13: ::std::convert::Into, - O14: ::std::convert::Into, - O15: ::std::convert::Into, - O16: ::std::convert::Into, - O17: ::std::convert::Into, ->( - seq_len_max: O0, - x: O1, - cs_prev: O2, - h_prev: O3, - w: O4, - wci: O5, - wcf: O6, - wco: O7, - b: O8, - i: O9, - cs: O10, - f: O11, - o: O12, - ci: O13, - co: O14, - h: O15, - cs_grad: O16, - h_grad: O17, - scope: &mut crate::Scope, -) -> crate::Result { - BlockLSTMGradV2::new().build( - seq_len_max, - x, - cs_prev, - h_prev, - w, - wci, - wcf, - wco, - b, - i, - cs, - f, - o, - ci, - co, - h, - cs_grad, - h_grad, - scope, - ) +pub fn block_lstmgrad_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into, O15: ::std::convert::Into, O16: ::std::convert::Into, O17: ::std::convert::Into>(seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, i: O9, cs: O10, f: O11, o: O12, ci: O13, co: O14, h: O15, cs_grad: O16, h_grad: O17, scope: &mut crate::Scope) -> crate::Result { + BlockLSTMGradV2::new().build(seq_len_max, x, cs_prev, h_prev, w, wci, wcf, wco, b, i, cs, f, o, ci, co, h, cs_grad, h_grad, scope) } + /// Builder for the `BlockLSTMV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BlockLSTMV2 { @@ -11809,6 +14785,12 @@ pub struct BlockLSTMV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BlockLSTMV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BlockLSTMV2Inst { + /// An instance of a fully built BlockLSTMV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BlockLSTMV2 { /// Creates a new `BlockLSTMV2`. @@ -11841,56 +14823,10 @@ impl BlockLSTMV2 { } /// Builds the `BlockLSTMV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - seq_len_max: O0, - x: O1, - cs_prev: O2, - h_prev: O3, - w: O4, - wci: O5, - wcf: O6, - wco: O7, - b: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - seq_len_max.into(), - x.into(), - cs_prev.into(), - h_prev.into(), - w.into(), - wci.into(), - wcf.into(), - wco.into(), - b.into(), - scope, - ) - } - - fn build_impl( - &self, - seq_len_max: crate::Output, - x: crate::Output, - cs_prev: crate::Output, - h_prev: crate::Output, - w: crate::Output, - wci: crate::Output, - wcf: crate::Output, - wco: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(seq_len_max.into(), x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), scope) + } + fn build_impl(&self, seq_len_max: crate::Output, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BlockLSTMV2", |nd| { nd.add_input(seq_len_max); nd.add_input(x); @@ -11904,45 +14840,112 @@ impl BlockLSTMV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.cell_clip { - nd.set_attr_float("cell_clip", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_peephole { - nd.set_attr_bool("use_peephole", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.cell_clip { + nd.set_attr_float("cell_clip", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BlockLSTMV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(seq_len_max.into(), x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), scope) + } + fn build_instance_impl(&self, seq_len_max: crate::Output, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BlockLSTMV2", |nd| { + nd.add_input(seq_len_max); + nd.add_input(x); + nd.add_input(cs_prev); + nd.add_input(h_prev); + nd.add_input(w); + nd.add_input(wci); + nd.add_input(wcf); + nd.add_input(wco); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.cell_clip { + nd.set_attr_float("cell_clip", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BlockLSTMV2Inst{op}) + } +} +impl BlockLSTMV2Inst { + /// Returns the 'i' output of this 'BlockLSTMV2' operation. + pub fn i(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'cs' output of this 'BlockLSTMV2' operation. + pub fn cs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'f' output of this 'BlockLSTMV2' operation. + pub fn f(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'o' output of this 'BlockLSTMV2' operation. + pub fn o(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'ci' output of this 'BlockLSTMV2' operation. + pub fn ci(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } + /// Returns the 'co' output of this 'BlockLSTMV2' operation. + pub fn co(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 5 + } + } + /// Returns the 'h' output of this 'BlockLSTMV2' operation. + pub fn h(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 6 + } + } +} +impl Into for BlockLSTMV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BlockLSTMV2::new().build(seq_len_max, x, cs_prev, h_prev, w, wci, wcf, wco, b, scope)`. -pub fn block_lstmv2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - seq_len_max: O0, - x: O1, - cs_prev: O2, - h_prev: O3, - w: O4, - wci: O5, - wcf: O6, - wco: O7, - b: O8, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn block_lstmv2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(seq_len_max: O0, x: O1, cs_prev: O2, h_prev: O3, w: O4, wci: O5, wcf: O6, wco: O7, b: O8, scope: &mut crate::Scope) -> crate::Result { BlockLSTMV2::new().build(seq_len_max, x, cs_prev, h_prev, w, wci, wcf, wco, b, scope) } + /// Builder for the `BoostedTreesAggregateStats` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesAggregateStats { @@ -11950,6 +14953,12 @@ pub struct BoostedTreesAggregateStats { num_buckets: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesAggregateStats' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesAggregateStatsInst { + /// An instance of a fully built BoostedTreesAggregateStats Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesAggregateStats { /// Creates a new `BoostedTreesAggregateStats`. @@ -11976,36 +14985,10 @@ impl BoostedTreesAggregateStats { } /// Builds the `BoostedTreesAggregateStats` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - node_ids: O0, - gradients: O1, - hessians: O2, - feature: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - node_ids.into(), - gradients.into(), - hessians.into(), - feature.into(), - scope, - ) - } - - fn build_impl( - &self, - node_ids: crate::Output, - gradients: crate::Output, - hessians: crate::Output, - feature: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, node_ids: O0, gradients: O1, hessians: O2, feature: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(node_ids.into(), gradients.into(), hessians.into(), feature.into(), scope) + } + fn build_impl(&self, node_ids: crate::Output, gradients: crate::Output, hessians: crate::Output, feature: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesAggregateStats", |nd| { nd.add_input(node_ids); nd.add_input(gradients); @@ -12014,38 +14997,71 @@ impl BoostedTreesAggregateStats { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.max_splits { - nd.set_attr_int("max_splits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_buckets { - nd.set_attr_int("num_buckets", *value)?; - } + if let ::std::option::Option::Some(value) = &self.max_splits { + nd.set_attr_int("max_splits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesAggregateStats` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, node_ids: O0, gradients: O1, hessians: O2, feature: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(node_ids.into(), gradients.into(), hessians.into(), feature.into(), scope) + } + fn build_instance_impl(&self, node_ids: crate::Output, gradients: crate::Output, hessians: crate::Output, feature: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesAggregateStats", |nd| { + nd.add_input(node_ids); + nd.add_input(gradients); + nd.add_input(hessians); + nd.add_input(feature); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.max_splits { + nd.set_attr_int("max_splits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesAggregateStatsInst{op}) + } +} +impl BoostedTreesAggregateStatsInst { + /// Returns the 'stats_summary' output of this 'BoostedTreesAggregateStats' operation. + pub fn stats_summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BoostedTreesAggregateStatsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesAggregateStats::new().build(node_ids, gradients, hessians, feature, scope)`. -pub fn boosted_trees_aggregate_stats< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - node_ids: O0, - gradients: O1, - hessians: O2, - feature: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn boosted_trees_aggregate_stats, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(node_ids: O0, gradients: O1, hessians: O2, feature: O3, scope: &mut crate::Scope) -> crate::Result { BoostedTreesAggregateStats::new().build(node_ids, gradients, hessians, feature, scope) } + /// Builder for the `BoostedTreesBucketize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesBucketize { num_features: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesBucketize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesBucketizeInst { + /// An instance of a fully built BoostedTreesBucketize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesBucketize { /// Creates a new `BoostedTreesBucketize`. @@ -12066,49 +15082,66 @@ impl BoostedTreesBucketize { } /// Builds the `BoostedTreesBucketize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - float_values: O0, - bucket_boundaries: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, float_values: O0, bucket_boundaries: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(float_values.into(), bucket_boundaries.into(), scope) } - - fn build_impl( - &self, - float_values: crate::Output, - bucket_boundaries: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, float_values: crate::Output, bucket_boundaries: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesBucketize", |nd| { nd.add_input(float_values); nd.add_input(bucket_boundaries); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesBucketize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, float_values: O0, bucket_boundaries: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(float_values.into(), bucket_boundaries.into(), scope) + } + fn build_instance_impl(&self, float_values: crate::Output, bucket_boundaries: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesBucketize", |nd| { + nd.add_input(float_values); + nd.add_input(bucket_boundaries); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesBucketizeInst{op}) + } +} +impl BoostedTreesBucketizeInst { + /// Returns a Vector of Outputs for 'buckets' output of this BoostedTreesBucketize operation. + pub fn buckets(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for BoostedTreesBucketizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesBucketize::new().build(float_values, bucket_boundaries, scope)`. -pub fn boosted_trees_bucketize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - float_values: O0, - bucket_boundaries: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn boosted_trees_bucketize, O1: ::std::convert::Into>(float_values: O0, bucket_boundaries: O1, scope: &mut crate::Scope) -> crate::Result { BoostedTreesBucketize::new().build(float_values, bucket_boundaries, scope) } + /// Builder for the `BoostedTreesCalculateBestFeatureSplit` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesCalculateBestFeatureSplit { @@ -12116,6 +15149,12 @@ pub struct BoostedTreesCalculateBestFeatureSplit { split_type: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesCalculateBestFeatureSplit' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesCalculateBestFeatureSplitInst { + /// An instance of a fully built BoostedTreesCalculateBestFeatureSplit Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesCalculateBestFeatureSplit { /// Creates a new `BoostedTreesCalculateBestFeatureSplit`. @@ -12130,10 +15169,7 @@ impl BoostedTreesCalculateBestFeatureSplit { } /// Sets the `split_type` attribute. - pub fn split_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn split_type>(mut self, value: ArgType) -> Self { self.split_type = ::std::option::Option::Some(value.into()); self } @@ -12145,44 +15181,10 @@ impl BoostedTreesCalculateBestFeatureSplit { } /// Builds the `BoostedTreesCalculateBestFeatureSplit` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - node_id_range: O0, - stats_summary: O1, - l1: O2, - l2: O3, - tree_complexity: O4, - min_node_weight: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - node_id_range.into(), - stats_summary.into(), - l1.into(), - l2.into(), - tree_complexity.into(), - min_node_weight.into(), - scope, - ) - } - - fn build_impl( - &self, - node_id_range: crate::Output, - stats_summary: crate::Output, - l1: crate::Output, - l2: crate::Output, - tree_complexity: crate::Output, - min_node_weight: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, node_id_range: O0, stats_summary: O1, l1: O2, l2: O3, tree_complexity: O4, min_node_weight: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(node_id_range.into(), stats_summary.into(), l1.into(), l2.into(), tree_complexity.into(), min_node_weight.into(), scope) + } + fn build_impl(&self, node_id_range: crate::Output, stats_summary: crate::Output, l1: crate::Output, l2: crate::Output, tree_complexity: crate::Output, min_node_weight: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesCalculateBestFeatureSplit", |nd| { nd.add_input(node_id_range); nd.add_input(stats_summary); @@ -12193,44 +15195,103 @@ impl BoostedTreesCalculateBestFeatureSplit { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.logits_dimension { - nd.set_attr_int("logits_dimension", *value)?; - } - if let ::std::option::Option::Some(value) = &self.split_type { - nd.set_attr_string("split_type", value)?; - } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.split_type { + nd.set_attr_string("split_type", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesCalculateBestFeatureSplit` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, node_id_range: O0, stats_summary: O1, l1: O2, l2: O3, tree_complexity: O4, min_node_weight: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(node_id_range.into(), stats_summary.into(), l1.into(), l2.into(), tree_complexity.into(), min_node_weight.into(), scope) + } + fn build_instance_impl(&self, node_id_range: crate::Output, stats_summary: crate::Output, l1: crate::Output, l2: crate::Output, tree_complexity: crate::Output, min_node_weight: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesCalculateBestFeatureSplit", |nd| { + nd.add_input(node_id_range); + nd.add_input(stats_summary); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(tree_complexity); + nd.add_input(min_node_weight); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.split_type { + nd.set_attr_string("split_type", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesCalculateBestFeatureSplitInst{op}) + } +} +impl BoostedTreesCalculateBestFeatureSplitInst { + /// Returns the 'node_ids' output of this 'BoostedTreesCalculateBestFeatureSplit' operation. + pub fn node_ids(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'gains' output of this 'BoostedTreesCalculateBestFeatureSplit' operation. + pub fn gains(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'feature_dimensions' output of this 'BoostedTreesCalculateBestFeatureSplit' operation. + pub fn feature_dimensions(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'thresholds' output of this 'BoostedTreesCalculateBestFeatureSplit' operation. + pub fn thresholds(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'left_node_contribs' output of this 'BoostedTreesCalculateBestFeatureSplit' operation. + pub fn left_node_contribs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } + /// Returns the 'right_node_contribs' output of this 'BoostedTreesCalculateBestFeatureSplit' operation. + pub fn right_node_contribs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 5 + } + } + /// Returns the 'split_with_default_directions' output of this 'BoostedTreesCalculateBestFeatureSplit' operation. + pub fn split_with_default_directions(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 6 + } + } +} +impl Into for BoostedTreesCalculateBestFeatureSplitInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesCalculateBestFeatureSplit::new().build(node_id_range, stats_summary, l1, l2, tree_complexity, min_node_weight, scope)`. -pub fn boosted_trees_calculate_best_feature_split< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - node_id_range: O0, - stats_summary: O1, - l1: O2, - l2: O3, - tree_complexity: O4, - min_node_weight: O5, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesCalculateBestFeatureSplit::new().build( - node_id_range, - stats_summary, - l1, - l2, - tree_complexity, - min_node_weight, - scope, - ) +pub fn boosted_trees_calculate_best_feature_split, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(node_id_range: O0, stats_summary: O1, l1: O2, l2: O3, tree_complexity: O4, min_node_weight: O5, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesCalculateBestFeatureSplit::new().build(node_id_range, stats_summary, l1, l2, tree_complexity, min_node_weight, scope) } + /// Builder for the `BoostedTreesCalculateBestFeatureSplitV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesCalculateBestFeatureSplitV2 { @@ -12238,6 +15299,12 @@ pub struct BoostedTreesCalculateBestFeatureSplitV2 { logits_dimension: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesCalculateBestFeatureSplitV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesCalculateBestFeatureSplitV2Inst { + /// An instance of a fully built BoostedTreesCalculateBestFeatureSplitV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesCalculateBestFeatureSplitV2 { /// Creates a new `BoostedTreesCalculateBestFeatureSplitV2`. @@ -12264,52 +15331,10 @@ impl BoostedTreesCalculateBestFeatureSplitV2 { } /// Builds the `BoostedTreesCalculateBestFeatureSplitV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - node_id_range: O0, - stats_summaries_list: O1, - split_types: O2, - candidate_feature_ids: O3, - l1: O4, - l2: O5, - tree_complexity: O6, - min_node_weight: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - node_id_range.into(), - stats_summaries_list.into(), - split_types.into(), - candidate_feature_ids.into(), - l1.into(), - l2.into(), - tree_complexity.into(), - min_node_weight.into(), - scope, - ) - } - - fn build_impl( - &self, - node_id_range: crate::Output, - stats_summaries_list: crate::Output, - split_types: crate::Output, - candidate_feature_ids: crate::Output, - l1: crate::Output, - l2: crate::Output, - tree_complexity: crate::Output, - min_node_weight: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, node_id_range: O0, stats_summaries_list: O1, split_types: O2, candidate_feature_ids: O3, l1: O4, l2: O5, tree_complexity: O6, min_node_weight: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(node_id_range.into(), stats_summaries_list.into(), split_types.into(), candidate_feature_ids.into(), l1.into(), l2.into(), tree_complexity.into(), min_node_weight.into(), scope) + } + fn build_impl(&self, node_id_range: crate::Output, stats_summaries_list: crate::Output, split_types: crate::Output, candidate_feature_ids: crate::Output, l1: crate::Output, l2: crate::Output, tree_complexity: crate::Output, min_node_weight: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesCalculateBestFeatureSplitV2", |nd| { nd.add_input(node_id_range); nd.add_input(stats_summaries_list); @@ -12322,50 +15347,112 @@ impl BoostedTreesCalculateBestFeatureSplitV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } - if let ::std::option::Option::Some(value) = &self.logits_dimension { - nd.set_attr_int("logits_dimension", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesCalculateBestFeatureSplitV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, node_id_range: O0, stats_summaries_list: O1, split_types: O2, candidate_feature_ids: O3, l1: O4, l2: O5, tree_complexity: O6, min_node_weight: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(node_id_range.into(), stats_summaries_list.into(), split_types.into(), candidate_feature_ids.into(), l1.into(), l2.into(), tree_complexity.into(), min_node_weight.into(), scope) + } + fn build_instance_impl(&self, node_id_range: crate::Output, stats_summaries_list: crate::Output, split_types: crate::Output, candidate_feature_ids: crate::Output, l1: crate::Output, l2: crate::Output, tree_complexity: crate::Output, min_node_weight: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesCalculateBestFeatureSplitV2", |nd| { + nd.add_input(node_id_range); + nd.add_input(stats_summaries_list); + nd.add_input(split_types); + nd.add_input(candidate_feature_ids); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(tree_complexity); + nd.add_input(min_node_weight); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesCalculateBestFeatureSplitV2Inst{op}) + } +} +impl BoostedTreesCalculateBestFeatureSplitV2Inst { + /// Returns the 'node_ids' output of this 'BoostedTreesCalculateBestFeatureSplitV2' operation. + pub fn node_ids(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'gains' output of this 'BoostedTreesCalculateBestFeatureSplitV2' operation. + pub fn gains(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'feature_ids' output of this 'BoostedTreesCalculateBestFeatureSplitV2' operation. + pub fn feature_ids(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'feature_dimensions' output of this 'BoostedTreesCalculateBestFeatureSplitV2' operation. + pub fn feature_dimensions(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'thresholds' output of this 'BoostedTreesCalculateBestFeatureSplitV2' operation. + pub fn thresholds(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } + /// Returns the 'left_node_contribs' output of this 'BoostedTreesCalculateBestFeatureSplitV2' operation. + pub fn left_node_contribs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 5 + } + } + /// Returns the 'right_node_contribs' output of this 'BoostedTreesCalculateBestFeatureSplitV2' operation. + pub fn right_node_contribs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 6 + } + } + /// Returns the 'split_with_default_directions' output of this 'BoostedTreesCalculateBestFeatureSplitV2' operation. + pub fn split_with_default_directions(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 7 + } + } +} +impl Into for BoostedTreesCalculateBestFeatureSplitV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesCalculateBestFeatureSplitV2::new().build(node_id_range, stats_summaries_list, split_types, candidate_feature_ids, l1, l2, tree_complexity, min_node_weight, scope)`. -pub fn boosted_trees_calculate_best_feature_split_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - node_id_range: O0, - stats_summaries_list: O1, - split_types: O2, - candidate_feature_ids: O3, - l1: O4, - l2: O5, - tree_complexity: O6, - min_node_weight: O7, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesCalculateBestFeatureSplitV2::new().build( - node_id_range, - stats_summaries_list, - split_types, - candidate_feature_ids, - l1, - l2, - tree_complexity, - min_node_weight, - scope, - ) +pub fn boosted_trees_calculate_best_feature_split_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(node_id_range: O0, stats_summaries_list: O1, split_types: O2, candidate_feature_ids: O3, l1: O4, l2: O5, tree_complexity: O6, min_node_weight: O7, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesCalculateBestFeatureSplitV2::new().build(node_id_range, stats_summaries_list, split_types, candidate_feature_ids, l1, l2, tree_complexity, min_node_weight, scope) } + /// Builder for the `BoostedTreesCalculateBestGainsPerFeature` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesCalculateBestGainsPerFeature { @@ -12373,6 +15460,12 @@ pub struct BoostedTreesCalculateBestGainsPerFeature { num_features: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesCalculateBestGainsPerFeature' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesCalculateBestGainsPerFeatureInst { + /// An instance of a fully built BoostedTreesCalculateBestGainsPerFeature Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesCalculateBestGainsPerFeature { /// Creates a new `BoostedTreesCalculateBestGainsPerFeature`. @@ -12399,44 +15492,10 @@ impl BoostedTreesCalculateBestGainsPerFeature { } /// Builds the `BoostedTreesCalculateBestGainsPerFeature` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - node_id_range: O0, - stats_summary_list: O1, - l1: O2, - l2: O3, - tree_complexity: O4, - min_node_weight: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - node_id_range.into(), - stats_summary_list.into(), - l1.into(), - l2.into(), - tree_complexity.into(), - min_node_weight.into(), - scope, - ) - } - - fn build_impl( - &self, - node_id_range: crate::Output, - stats_summary_list: crate::Output, - l1: crate::Output, - l2: crate::Output, - tree_complexity: crate::Output, - min_node_weight: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, node_id_range: O0, stats_summary_list: O1, l1: O2, l2: O3, tree_complexity: O4, min_node_weight: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(node_id_range.into(), stats_summary_list.into(), l1.into(), l2.into(), tree_complexity.into(), min_node_weight.into(), scope) + } + fn build_impl(&self, node_id_range: crate::Output, stats_summary_list: crate::Output, l1: crate::Output, l2: crate::Output, tree_complexity: crate::Output, min_node_weight: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesCalculateBestGainsPerFeature", |nd| { nd.add_input(node_id_range); nd.add_input(stats_summary_list); @@ -12447,49 +15506,125 @@ impl BoostedTreesCalculateBestGainsPerFeature { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.max_splits { - nd.set_attr_int("max_splits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } + if let ::std::option::Option::Some(value) = &self.max_splits { + nd.set_attr_int("max_splits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesCalculateBestGainsPerFeature` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, node_id_range: O0, stats_summary_list: O1, l1: O2, l2: O3, tree_complexity: O4, min_node_weight: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(node_id_range.into(), stats_summary_list.into(), l1.into(), l2.into(), tree_complexity.into(), min_node_weight.into(), scope) + } + fn build_instance_impl(&self, node_id_range: crate::Output, stats_summary_list: crate::Output, l1: crate::Output, l2: crate::Output, tree_complexity: crate::Output, min_node_weight: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesCalculateBestGainsPerFeature", |nd| { + nd.add_input(node_id_range); + nd.add_input(stats_summary_list); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(tree_complexity); + nd.add_input(min_node_weight); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.max_splits { + nd.set_attr_int("max_splits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesCalculateBestGainsPerFeatureInst{op}) + } +} +impl BoostedTreesCalculateBestGainsPerFeatureInst { + /// Returns a Vector of Outputs for 'node_ids_list' output of this BoostedTreesCalculateBestGainsPerFeature operation. + pub fn node_ids_list(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'gains_list' output of this BoostedTreesCalculateBestGainsPerFeature operation. + pub fn gains_list(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("num_features")?+1) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'thresholds_list' output of this BoostedTreesCalculateBestGainsPerFeature operation. + pub fn thresholds_list(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("num_features")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'left_node_contribs_list' output of this BoostedTreesCalculateBestGainsPerFeature operation. + pub fn left_node_contribs_list(&self) -> crate::Result>{ + let dynamic_offset = (3*self.op.get_attr_int("num_features")?+3) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'right_node_contribs_list' output of this BoostedTreesCalculateBestGainsPerFeature operation. + pub fn right_node_contribs_list(&self) -> crate::Result>{ + let dynamic_offset = (4*self.op.get_attr_int("num_features")?+4) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for BoostedTreesCalculateBestGainsPerFeatureInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesCalculateBestGainsPerFeature::new().build(node_id_range, stats_summary_list, l1, l2, tree_complexity, min_node_weight, scope)`. -pub fn boosted_trees_calculate_best_gains_per_feature< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - node_id_range: O0, - stats_summary_list: O1, - l1: O2, - l2: O3, - tree_complexity: O4, - min_node_weight: O5, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesCalculateBestGainsPerFeature::new().build( - node_id_range, - stats_summary_list, - l1, - l2, - tree_complexity, - min_node_weight, - scope, - ) +pub fn boosted_trees_calculate_best_gains_per_feature, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(node_id_range: O0, stats_summary_list: O1, l1: O2, l2: O3, tree_complexity: O4, min_node_weight: O5, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesCalculateBestGainsPerFeature::new().build(node_id_range, stats_summary_list, l1, l2, tree_complexity, min_node_weight, scope) } + /// Builder for the `BoostedTreesCenterBias` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesCenterBias { control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesCenterBias' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesCenterBiasInst { + /// An instance of a fully built BoostedTreesCenterBias Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesCenterBias { /// Creates a new `BoostedTreesCenterBias`. @@ -12504,40 +15639,10 @@ impl BoostedTreesCenterBias { } /// Builds the `BoostedTreesCenterBias` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - tree_ensemble_handle: O0, - mean_gradients: O1, - mean_hessians: O2, - l1: O3, - l2: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tree_ensemble_handle.into(), - mean_gradients.into(), - mean_hessians.into(), - l1.into(), - l2.into(), - scope, - ) - } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - mean_gradients: crate::Output, - mean_hessians: crate::Output, - l1: crate::Output, - l2: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, tree_ensemble_handle: O0, mean_gradients: O1, mean_hessians: O2, l1: O3, l2: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tree_ensemble_handle.into(), mean_gradients.into(), mean_hessians.into(), l1.into(), l2.into(), scope) + } + fn build_impl(&self, tree_ensemble_handle: crate::Output, mean_gradients: crate::Output, mean_hessians: crate::Output, l1: crate::Output, l2: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesCenterBias", |nd| { nd.add_input(tree_ensemble_handle); nd.add_input(mean_gradients); @@ -12550,37 +15655,56 @@ impl BoostedTreesCenterBias { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesCenterBias` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, tree_ensemble_handle: O0, mean_gradients: O1, mean_hessians: O2, l1: O3, l2: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), mean_gradients.into(), mean_hessians.into(), l1.into(), l2.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, mean_gradients: crate::Output, mean_hessians: crate::Output, l1: crate::Output, l2: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesCenterBias", |nd| { + nd.add_input(tree_ensemble_handle); + nd.add_input(mean_gradients); + nd.add_input(mean_hessians); + nd.add_input(l1); + nd.add_input(l2); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesCenterBiasInst{op}) + } +} +impl BoostedTreesCenterBiasInst { + /// Returns the 'continue_centering' output of this 'BoostedTreesCenterBias' operation. + pub fn continue_centering(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BoostedTreesCenterBiasInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesCenterBias::new().build(tree_ensemble_handle, mean_gradients, mean_hessians, l1, l2, scope)`. -pub fn boosted_trees_center_bias< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - tree_ensemble_handle: O0, - mean_gradients: O1, - mean_hessians: O2, - l1: O3, - l2: O4, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesCenterBias::new().build( - tree_ensemble_handle, - mean_gradients, - mean_hessians, - l1, - l2, - scope, - ) +pub fn boosted_trees_center_bias, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(tree_ensemble_handle: O0, mean_gradients: O1, mean_hessians: O2, l1: O3, l2: O4, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesCenterBias::new().build(tree_ensemble_handle, mean_gradients, mean_hessians, l1, l2, scope) } + /// Builder for the `BoostedTreesCreateEnsemble` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesCreateEnsemble { control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesCreateEnsemble' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesCreateEnsembleInst { + /// An instance of a fully built BoostedTreesCreateEnsemble Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesCreateEnsemble { /// Creates a new `BoostedTreesCreateEnsemble`. @@ -12595,32 +15719,10 @@ impl BoostedTreesCreateEnsemble { } /// Builds the `BoostedTreesCreateEnsemble` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tree_ensemble_handle: O0, - stamp_token: O1, - tree_ensemble_serialized: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tree_ensemble_handle.into(), - stamp_token.into(), - tree_ensemble_serialized.into(), - scope, - ) - } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - stamp_token: crate::Output, - tree_ensemble_serialized: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tree_ensemble_handle: O0, stamp_token: O1, tree_ensemble_serialized: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tree_ensemble_handle.into(), stamp_token.into(), tree_ensemble_serialized.into(), scope) + } + fn build_impl(&self, tree_ensemble_handle: crate::Output, stamp_token: crate::Output, tree_ensemble_serialized: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesCreateEnsemble", |nd| { nd.add_input(tree_ensemble_handle); nd.add_input(stamp_token); @@ -12631,32 +15733,48 @@ impl BoostedTreesCreateEnsemble { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesCreateEnsemble` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tree_ensemble_handle: O0, stamp_token: O1, tree_ensemble_serialized: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), stamp_token.into(), tree_ensemble_serialized.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, stamp_token: crate::Output, tree_ensemble_serialized: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesCreateEnsemble", |nd| { + nd.add_input(tree_ensemble_handle); + nd.add_input(stamp_token); + nd.add_input(tree_ensemble_serialized); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesCreateEnsembleInst{op}) + } +} +impl BoostedTreesCreateEnsembleInst { +} +impl Into for BoostedTreesCreateEnsembleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesCreateEnsemble::new().build(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, scope)`. -pub fn boosted_trees_create_ensemble< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tree_ensemble_handle: O0, - stamp_token: O1, - tree_ensemble_serialized: O2, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesCreateEnsemble::new().build( - tree_ensemble_handle, - stamp_token, - tree_ensemble_serialized, - scope, - ) +pub fn boosted_trees_create_ensemble, O1: ::std::convert::Into, O2: ::std::convert::Into>(tree_ensemble_handle: O0, stamp_token: O1, tree_ensemble_serialized: O2, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesCreateEnsemble::new().build(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, scope) } + /// Builder for the `BoostedTreesCreateQuantileStreamResource` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesCreateQuantileStreamResource { max_elements: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesCreateQuantileStreamResource' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesCreateQuantileStreamResourceInst { + /// An instance of a fully built BoostedTreesCreateQuantileStreamResource Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesCreateQuantileStreamResource { /// Creates a new `BoostedTreesCreateQuantileStreamResource`. @@ -12677,32 +15795,10 @@ impl BoostedTreesCreateQuantileStreamResource { } /// Builds the `BoostedTreesCreateQuantileStreamResource` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - quantile_stream_resource_handle: O0, - epsilon: O1, - num_streams: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - quantile_stream_resource_handle.into(), - epsilon.into(), - num_streams.into(), - scope, - ) - } - - fn build_impl( - &self, - quantile_stream_resource_handle: crate::Output, - epsilon: crate::Output, - num_streams: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, quantile_stream_resource_handle: O0, epsilon: O1, num_streams: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(quantile_stream_resource_handle.into(), epsilon.into(), num_streams.into(), scope) + } + fn build_impl(&self, quantile_stream_resource_handle: crate::Output, epsilon: crate::Output, num_streams: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesCreateQuantileStreamResource", |nd| { nd.add_input(quantile_stream_resource_handle); nd.add_input(epsilon); @@ -12710,37 +15806,56 @@ impl BoostedTreesCreateQuantileStreamResource { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.max_elements { - nd.set_attr_int("max_elements", *value)?; - } + if let ::std::option::Option::Some(value) = &self.max_elements { + nd.set_attr_int("max_elements", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesCreateQuantileStreamResource` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, quantile_stream_resource_handle: O0, epsilon: O1, num_streams: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(quantile_stream_resource_handle.into(), epsilon.into(), num_streams.into(), scope) + } + fn build_instance_impl(&self, quantile_stream_resource_handle: crate::Output, epsilon: crate::Output, num_streams: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesCreateQuantileStreamResource", |nd| { + nd.add_input(quantile_stream_resource_handle); + nd.add_input(epsilon); + nd.add_input(num_streams); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.max_elements { + nd.set_attr_int("max_elements", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesCreateQuantileStreamResourceInst{op}) + } +} +impl BoostedTreesCreateQuantileStreamResourceInst { +} +impl Into for BoostedTreesCreateQuantileStreamResourceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesCreateQuantileStreamResource::new().build(quantile_stream_resource_handle, epsilon, num_streams, scope)`. -pub fn boosted_trees_create_quantile_stream_resource< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - quantile_stream_resource_handle: O0, - epsilon: O1, - num_streams: O2, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesCreateQuantileStreamResource::new().build( - quantile_stream_resource_handle, - epsilon, - num_streams, - scope, - ) +pub fn boosted_trees_create_quantile_stream_resource, O1: ::std::convert::Into, O2: ::std::convert::Into>(quantile_stream_resource_handle: O0, epsilon: O1, num_streams: O2, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesCreateQuantileStreamResource::new().build(quantile_stream_resource_handle, epsilon, num_streams, scope) } + /// Builder for the `BoostedTreesDeserializeEnsemble` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesDeserializeEnsemble { control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesDeserializeEnsemble' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesDeserializeEnsembleInst { + /// An instance of a fully built BoostedTreesDeserializeEnsemble Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesDeserializeEnsemble { /// Creates a new `BoostedTreesDeserializeEnsemble`. @@ -12755,32 +15870,10 @@ impl BoostedTreesDeserializeEnsemble { } /// Builds the `BoostedTreesDeserializeEnsemble` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tree_ensemble_handle: O0, - stamp_token: O1, - tree_ensemble_serialized: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tree_ensemble_handle.into(), - stamp_token.into(), - tree_ensemble_serialized.into(), - scope, - ) - } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - stamp_token: crate::Output, - tree_ensemble_serialized: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tree_ensemble_handle: O0, stamp_token: O1, tree_ensemble_serialized: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tree_ensemble_handle.into(), stamp_token.into(), tree_ensemble_serialized.into(), scope) + } + fn build_impl(&self, tree_ensemble_handle: crate::Output, stamp_token: crate::Output, tree_ensemble_serialized: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesDeserializeEnsemble", |nd| { nd.add_input(tree_ensemble_handle); nd.add_input(stamp_token); @@ -12791,26 +15884,36 @@ impl BoostedTreesDeserializeEnsemble { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesDeserializeEnsemble` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tree_ensemble_handle: O0, stamp_token: O1, tree_ensemble_serialized: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), stamp_token.into(), tree_ensemble_serialized.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, stamp_token: crate::Output, tree_ensemble_serialized: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesDeserializeEnsemble", |nd| { + nd.add_input(tree_ensemble_handle); + nd.add_input(stamp_token); + nd.add_input(tree_ensemble_serialized); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesDeserializeEnsembleInst{op}) + } +} +impl BoostedTreesDeserializeEnsembleInst { +} +impl Into for BoostedTreesDeserializeEnsembleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesDeserializeEnsemble::new().build(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, scope)`. -pub fn boosted_trees_deserialize_ensemble< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tree_ensemble_handle: O0, - stamp_token: O1, - tree_ensemble_serialized: O2, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesDeserializeEnsemble::new().build( - tree_ensemble_handle, - stamp_token, - tree_ensemble_serialized, - scope, - ) +pub fn boosted_trees_deserialize_ensemble, O1: ::std::convert::Into, O2: ::std::convert::Into>(tree_ensemble_handle: O0, stamp_token: O1, tree_ensemble_serialized: O2, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesDeserializeEnsemble::new().build(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, scope) } + /// Builder for the `BoostedTreesEnsembleResourceHandleOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesEnsembleResourceHandleOp { @@ -12818,6 +15921,12 @@ pub struct BoostedTreesEnsembleResourceHandleOp { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesEnsembleResourceHandleOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesEnsembleResourceHandleOpInst { + /// An instance of a fully built BoostedTreesEnsembleResourceHandleOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesEnsembleResourceHandleOp { /// Creates a new `BoostedTreesEnsembleResourceHandleOp`. @@ -12826,19 +15935,13 @@ impl BoostedTreesEnsembleResourceHandleOp { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -12850,32 +15953,63 @@ impl BoostedTreesEnsembleResourceHandleOp { } /// Builds the `BoostedTreesEnsembleResourceHandleOp` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesEnsembleResourceHandleOp", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesEnsembleResourceHandleOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesEnsembleResourceHandleOp", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesEnsembleResourceHandleOpInst{op}) + } +} +impl BoostedTreesEnsembleResourceHandleOpInst { + /// Returns the 'resource' output of this 'BoostedTreesEnsembleResourceHandleOp' operation. + pub fn resource(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BoostedTreesEnsembleResourceHandleOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesEnsembleResourceHandleOp::new().build(scope)`. -pub fn boosted_trees_ensemble_resource_handle_op( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn boosted_trees_ensemble_resource_handle_op<>(scope: &mut crate::Scope) -> crate::Result { BoostedTreesEnsembleResourceHandleOp::new().build(scope) } + /// Builder for the `BoostedTreesExampleDebugOutputs` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesExampleDebugOutputs { @@ -12883,6 +16017,12 @@ pub struct BoostedTreesExampleDebugOutputs { logits_dimension: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesExampleDebugOutputs' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesExampleDebugOutputsInst { + /// An instance of a fully built BoostedTreesExampleDebugOutputs Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesExampleDebugOutputs { /// Creates a new `BoostedTreesExampleDebugOutputs`. @@ -12891,10 +16031,7 @@ impl BoostedTreesExampleDebugOutputs { } /// Sets the `num_bucketized_features` attribute. - pub fn num_bucketized_features>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_bucketized_features>(mut self, value: ArgType) -> Self { self.num_bucketized_features = ::std::option::Option::Some(value.into()); self } @@ -12912,62 +16049,79 @@ impl BoostedTreesExampleDebugOutputs { } /// Builds the `BoostedTreesExampleDebugOutputs` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tree_ensemble_handle: O0, - bucketized_features: O1, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tree_ensemble_handle.into(), - bucketized_features.into(), - scope, - ) - } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - bucketized_features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tree_ensemble_handle: O0, bucketized_features: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tree_ensemble_handle.into(), bucketized_features.into(), scope) + } + fn build_impl(&self, tree_ensemble_handle: crate::Output, bucketized_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesExampleDebugOutputs", |nd| { nd.add_input(tree_ensemble_handle); nd.add_input(bucketized_features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_bucketized_features { - nd.set_attr_int("num_bucketized_features", *value)?; - } - if let ::std::option::Option::Some(value) = &self.logits_dimension { - nd.set_attr_int("logits_dimension", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_bucketized_features { + nd.set_attr_int("num_bucketized_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesExampleDebugOutputs` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tree_ensemble_handle: O0, bucketized_features: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), bucketized_features.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, bucketized_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesExampleDebugOutputs", |nd| { + nd.add_input(tree_ensemble_handle); + nd.add_input(bucketized_features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_bucketized_features { + nd.set_attr_int("num_bucketized_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesExampleDebugOutputsInst{op}) + } +} +impl BoostedTreesExampleDebugOutputsInst { + /// Returns the 'examples_debug_outputs_serialized' output of this 'BoostedTreesExampleDebugOutputs' operation. + pub fn examples_debug_outputs_serialized(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BoostedTreesExampleDebugOutputsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesExampleDebugOutputs::new().build(tree_ensemble_handle, bucketized_features, scope)`. -pub fn boosted_trees_example_debug_outputs< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tree_ensemble_handle: O0, - bucketized_features: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn boosted_trees_example_debug_outputs, O1: ::std::convert::Into>(tree_ensemble_handle: O0, bucketized_features: O1, scope: &mut crate::Scope) -> crate::Result { BoostedTreesExampleDebugOutputs::new().build(tree_ensemble_handle, bucketized_features, scope) } + /// Builder for the `BoostedTreesFlushQuantileSummaries` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesFlushQuantileSummaries { num_features: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesFlushQuantileSummaries' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesFlushQuantileSummariesInst { + /// An instance of a fully built BoostedTreesFlushQuantileSummaries Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesFlushQuantileSummaries { /// Creates a new `BoostedTreesFlushQuantileSummaries`. @@ -12988,44 +16142,75 @@ impl BoostedTreesFlushQuantileSummaries { } /// Builds the `BoostedTreesFlushQuantileSummaries` operation. - pub fn build>( - &self, - quantile_stream_resource_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, quantile_stream_resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(quantile_stream_resource_handle.into(), scope) } - - fn build_impl( - &self, - quantile_stream_resource_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, quantile_stream_resource_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesFlushQuantileSummaries", |nd| { nd.add_input(quantile_stream_resource_handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesFlushQuantileSummaries` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, quantile_stream_resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(quantile_stream_resource_handle.into(), scope) + } + fn build_instance_impl(&self, quantile_stream_resource_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesFlushQuantileSummaries", |nd| { + nd.add_input(quantile_stream_resource_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesFlushQuantileSummariesInst{op}) + } +} +impl BoostedTreesFlushQuantileSummariesInst { + /// Returns a Vector of Outputs for 'summaries' output of this BoostedTreesFlushQuantileSummaries operation. + pub fn summaries(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for BoostedTreesFlushQuantileSummariesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesFlushQuantileSummaries::new().build(quantile_stream_resource_handle, scope)`. -pub fn boosted_trees_flush_quantile_summaries>( - quantile_stream_resource_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn boosted_trees_flush_quantile_summaries>(quantile_stream_resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { BoostedTreesFlushQuantileSummaries::new().build(quantile_stream_resource_handle, scope) } + /// Builder for the `BoostedTreesGetEnsembleStates` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesGetEnsembleStates { control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesGetEnsembleStates' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesGetEnsembleStatesInst { + /// An instance of a fully built BoostedTreesGetEnsembleStates Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesGetEnsembleStates { /// Creates a new `BoostedTreesGetEnsembleStates`. @@ -13040,19 +16225,10 @@ impl BoostedTreesGetEnsembleStates { } /// Builds the `BoostedTreesGetEnsembleStates` operation. - pub fn build>( - &self, - tree_ensemble_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, tree_ensemble_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tree_ensemble_handle.into(), scope) } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tree_ensemble_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesGetEnsembleStates", |nd| { nd.add_input(tree_ensemble_handle); for op in &self.control_inputs { @@ -13061,21 +16237,81 @@ impl BoostedTreesGetEnsembleStates { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesGetEnsembleStates` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, tree_ensemble_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesGetEnsembleStates", |nd| { + nd.add_input(tree_ensemble_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesGetEnsembleStatesInst{op}) + } +} +impl BoostedTreesGetEnsembleStatesInst { + /// Returns the 'stamp_token' output of this 'BoostedTreesGetEnsembleStates' operation. + pub fn stamp_token(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'num_trees' output of this 'BoostedTreesGetEnsembleStates' operation. + pub fn num_trees(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'num_finalized_trees' output of this 'BoostedTreesGetEnsembleStates' operation. + pub fn num_finalized_trees(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'num_attempted_layers' output of this 'BoostedTreesGetEnsembleStates' operation. + pub fn num_attempted_layers(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'last_layer_nodes_range' output of this 'BoostedTreesGetEnsembleStates' operation. + pub fn last_layer_nodes_range(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } +} +impl Into for BoostedTreesGetEnsembleStatesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesGetEnsembleStates::new().build(tree_ensemble_handle, scope)`. -pub fn boosted_trees_get_ensemble_states>( - tree_ensemble_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn boosted_trees_get_ensemble_states>(tree_ensemble_handle: O0, scope: &mut crate::Scope) -> crate::Result { BoostedTreesGetEnsembleStates::new().build(tree_ensemble_handle, scope) } + /// Builder for the `BoostedTreesMakeQuantileSummaries` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesMakeQuantileSummaries { num_features: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesMakeQuantileSummaries' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesMakeQuantileSummariesInst { + /// An instance of a fully built BoostedTreesMakeQuantileSummaries Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesMakeQuantileSummaries { /// Creates a new `BoostedTreesMakeQuantileSummaries`. @@ -13096,32 +16332,10 @@ impl BoostedTreesMakeQuantileSummaries { } /// Builds the `BoostedTreesMakeQuantileSummaries` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - float_values: O0, - example_weights: O1, - epsilon: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - float_values.into(), - example_weights.into(), - epsilon.into(), - scope, - ) - } - - fn build_impl( - &self, - float_values: crate::Output, - example_weights: crate::Output, - epsilon: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, float_values: O0, example_weights: O1, epsilon: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(float_values.into(), example_weights.into(), epsilon.into(), scope) + } + fn build_impl(&self, float_values: crate::Output, example_weights: crate::Output, epsilon: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesMakeQuantileSummaries", |nd| { nd.add_input(float_values); nd.add_input(example_weights); @@ -13129,27 +16343,57 @@ impl BoostedTreesMakeQuantileSummaries { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesMakeQuantileSummaries` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, float_values: O0, example_weights: O1, epsilon: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(float_values.into(), example_weights.into(), epsilon.into(), scope) + } + fn build_instance_impl(&self, float_values: crate::Output, example_weights: crate::Output, epsilon: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesMakeQuantileSummaries", |nd| { + nd.add_input(float_values); + nd.add_input(example_weights); + nd.add_input(epsilon); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesMakeQuantileSummariesInst{op}) + } +} +impl BoostedTreesMakeQuantileSummariesInst { + /// Returns a Vector of Outputs for 'summaries' output of this BoostedTreesMakeQuantileSummaries operation. + pub fn summaries(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for BoostedTreesMakeQuantileSummariesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesMakeQuantileSummaries::new().build(float_values, example_weights, epsilon, scope)`. -pub fn boosted_trees_make_quantile_summaries< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - float_values: O0, - example_weights: O1, - epsilon: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn boosted_trees_make_quantile_summaries, O1: ::std::convert::Into, O2: ::std::convert::Into>(float_values: O0, example_weights: O1, epsilon: O2, scope: &mut crate::Scope) -> crate::Result { BoostedTreesMakeQuantileSummaries::new().build(float_values, example_weights, epsilon, scope) } + /// Builder for the `BoostedTreesMakeStatsSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesMakeStatsSummary { @@ -13158,6 +16402,12 @@ pub struct BoostedTreesMakeStatsSummary { num_features: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesMakeStatsSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesMakeStatsSummaryInst { + /// An instance of a fully built BoostedTreesMakeStatsSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesMakeStatsSummary { /// Creates a new `BoostedTreesMakeStatsSummary`. @@ -13190,36 +16440,10 @@ impl BoostedTreesMakeStatsSummary { } /// Builds the `BoostedTreesMakeStatsSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - node_ids: O0, - gradients: O1, - hessians: O2, - bucketized_features_list: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - node_ids.into(), - gradients.into(), - hessians.into(), - bucketized_features_list.into(), - scope, - ) - } - - fn build_impl( - &self, - node_ids: crate::Output, - gradients: crate::Output, - hessians: crate::Output, - bucketized_features_list: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, node_ids: O0, gradients: O1, hessians: O2, bucketized_features_list: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(node_ids.into(), gradients.into(), hessians.into(), bucketized_features_list.into(), scope) + } + fn build_impl(&self, node_ids: crate::Output, gradients: crate::Output, hessians: crate::Output, bucketized_features_list: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesMakeStatsSummary", |nd| { nd.add_input(node_ids); nd.add_input(gradients); @@ -13228,41 +16452,65 @@ impl BoostedTreesMakeStatsSummary { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.max_splits { - nd.set_attr_int("max_splits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_buckets { - nd.set_attr_int("num_buckets", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } + if let ::std::option::Option::Some(value) = &self.max_splits { + nd.set_attr_int("max_splits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesMakeStatsSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, node_ids: O0, gradients: O1, hessians: O2, bucketized_features_list: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(node_ids.into(), gradients.into(), hessians.into(), bucketized_features_list.into(), scope) + } + fn build_instance_impl(&self, node_ids: crate::Output, gradients: crate::Output, hessians: crate::Output, bucketized_features_list: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesMakeStatsSummary", |nd| { + nd.add_input(node_ids); + nd.add_input(gradients); + nd.add_input(hessians); + nd.add_input(bucketized_features_list); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.max_splits { + nd.set_attr_int("max_splits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesMakeStatsSummaryInst{op}) + } +} +impl BoostedTreesMakeStatsSummaryInst { + /// Returns the 'stats_summary' output of this 'BoostedTreesMakeStatsSummary' operation. + pub fn stats_summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BoostedTreesMakeStatsSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesMakeStatsSummary::new().build(node_ids, gradients, hessians, bucketized_features_list, scope)`. -pub fn boosted_trees_make_stats_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - node_ids: O0, - gradients: O1, - hessians: O2, - bucketized_features_list: O3, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesMakeStatsSummary::new().build( - node_ids, - gradients, - hessians, - bucketized_features_list, - scope, - ) +pub fn boosted_trees_make_stats_summary, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(node_ids: O0, gradients: O1, hessians: O2, bucketized_features_list: O3, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesMakeStatsSummary::new().build(node_ids, gradients, hessians, bucketized_features_list, scope) } + /// Builder for the `BoostedTreesPredict` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesPredict { @@ -13270,6 +16518,12 @@ pub struct BoostedTreesPredict { logits_dimension: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesPredict' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesPredictInst { + /// An instance of a fully built BoostedTreesPredict Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesPredict { /// Creates a new `BoostedTreesPredict`. @@ -13278,10 +16532,7 @@ impl BoostedTreesPredict { } /// Sets the `num_bucketized_features` attribute. - pub fn num_bucketized_features>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_bucketized_features>(mut self, value: ArgType) -> Self { self.num_bucketized_features = ::std::option::Option::Some(value.into()); self } @@ -13299,62 +16550,79 @@ impl BoostedTreesPredict { } /// Builds the `BoostedTreesPredict` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tree_ensemble_handle: O0, - bucketized_features: O1, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tree_ensemble_handle.into(), - bucketized_features.into(), - scope, - ) - } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - bucketized_features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tree_ensemble_handle: O0, bucketized_features: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tree_ensemble_handle.into(), bucketized_features.into(), scope) + } + fn build_impl(&self, tree_ensemble_handle: crate::Output, bucketized_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesPredict", |nd| { nd.add_input(tree_ensemble_handle); nd.add_input(bucketized_features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_bucketized_features { - nd.set_attr_int("num_bucketized_features", *value)?; - } - if let ::std::option::Option::Some(value) = &self.logits_dimension { - nd.set_attr_int("logits_dimension", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_bucketized_features { + nd.set_attr_int("num_bucketized_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesPredict` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tree_ensemble_handle: O0, bucketized_features: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), bucketized_features.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, bucketized_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesPredict", |nd| { + nd.add_input(tree_ensemble_handle); + nd.add_input(bucketized_features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_bucketized_features { + nd.set_attr_int("num_bucketized_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesPredictInst{op}) + } +} +impl BoostedTreesPredictInst { + /// Returns the 'logits' output of this 'BoostedTreesPredict' operation. + pub fn logits(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BoostedTreesPredictInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesPredict::new().build(tree_ensemble_handle, bucketized_features, scope)`. -pub fn boosted_trees_predict< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tree_ensemble_handle: O0, - bucketized_features: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn boosted_trees_predict, O1: ::std::convert::Into>(tree_ensemble_handle: O0, bucketized_features: O1, scope: &mut crate::Scope) -> crate::Result { BoostedTreesPredict::new().build(tree_ensemble_handle, bucketized_features, scope) } + /// Builder for the `BoostedTreesQuantileStreamResourceAddSummaries` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesQuantileStreamResourceAddSummaries { num_features: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesQuantileStreamResourceAddSummaries' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesQuantileStreamResourceAddSummariesInst { + /// An instance of a fully built BoostedTreesQuantileStreamResourceAddSummaries Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesQuantileStreamResourceAddSummaries { /// Creates a new `BoostedTreesQuantileStreamResourceAddSummaries`. @@ -13375,63 +16643,66 @@ impl BoostedTreesQuantileStreamResourceAddSummaries { } /// Builds the `BoostedTreesQuantileStreamResourceAddSummaries` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - quantile_stream_resource_handle: O0, - summaries: O1, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - quantile_stream_resource_handle.into(), - summaries.into(), - scope, - ) - } - - fn build_impl( - &self, - quantile_stream_resource_handle: crate::Output, - summaries: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, quantile_stream_resource_handle: O0, summaries: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(quantile_stream_resource_handle.into(), summaries.into(), scope) + } + fn build_impl(&self, quantile_stream_resource_handle: crate::Output, summaries: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesQuantileStreamResourceAddSummaries", |nd| { nd.add_input(quantile_stream_resource_handle); nd.add_input(summaries); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesQuantileStreamResourceAddSummaries` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, quantile_stream_resource_handle: O0, summaries: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(quantile_stream_resource_handle.into(), summaries.into(), scope) + } + fn build_instance_impl(&self, quantile_stream_resource_handle: crate::Output, summaries: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesQuantileStreamResourceAddSummaries", |nd| { + nd.add_input(quantile_stream_resource_handle); + nd.add_input(summaries); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesQuantileStreamResourceAddSummariesInst{op}) + } +} +impl BoostedTreesQuantileStreamResourceAddSummariesInst { +} +impl Into for BoostedTreesQuantileStreamResourceAddSummariesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesQuantileStreamResourceAddSummaries::new().build(quantile_stream_resource_handle, summaries, scope)`. -pub fn boosted_trees_quantile_stream_resource_add_summaries< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - quantile_stream_resource_handle: O0, - summaries: O1, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesQuantileStreamResourceAddSummaries::new().build( - quantile_stream_resource_handle, - summaries, - scope, - ) +pub fn boosted_trees_quantile_stream_resource_add_summaries, O1: ::std::convert::Into>(quantile_stream_resource_handle: O0, summaries: O1, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesQuantileStreamResourceAddSummaries::new().build(quantile_stream_resource_handle, summaries, scope) } + /// Builder for the `BoostedTreesQuantileStreamResourceDeserialize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesQuantileStreamResourceDeserialize { num_streams: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesQuantileStreamResourceDeserialize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesQuantileStreamResourceDeserializeInst { + /// An instance of a fully built BoostedTreesQuantileStreamResourceDeserialize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesQuantileStreamResourceDeserialize { /// Creates a new `BoostedTreesQuantileStreamResourceDeserialize`. @@ -13452,63 +16723,66 @@ impl BoostedTreesQuantileStreamResourceDeserialize { } /// Builds the `BoostedTreesQuantileStreamResourceDeserialize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - quantile_stream_resource_handle: O0, - bucket_boundaries: O1, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - quantile_stream_resource_handle.into(), - bucket_boundaries.into(), - scope, - ) - } - - fn build_impl( - &self, - quantile_stream_resource_handle: crate::Output, - bucket_boundaries: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, quantile_stream_resource_handle: O0, bucket_boundaries: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(quantile_stream_resource_handle.into(), bucket_boundaries.into(), scope) + } + fn build_impl(&self, quantile_stream_resource_handle: crate::Output, bucket_boundaries: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesQuantileStreamResourceDeserialize", |nd| { nd.add_input(quantile_stream_resource_handle); nd.add_input(bucket_boundaries); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_streams { - nd.set_attr_int("num_streams", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_streams { + nd.set_attr_int("num_streams", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesQuantileStreamResourceDeserialize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, quantile_stream_resource_handle: O0, bucket_boundaries: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(quantile_stream_resource_handle.into(), bucket_boundaries.into(), scope) + } + fn build_instance_impl(&self, quantile_stream_resource_handle: crate::Output, bucket_boundaries: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesQuantileStreamResourceDeserialize", |nd| { + nd.add_input(quantile_stream_resource_handle); + nd.add_input(bucket_boundaries); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_streams { + nd.set_attr_int("num_streams", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesQuantileStreamResourceDeserializeInst{op}) + } +} +impl BoostedTreesQuantileStreamResourceDeserializeInst { +} +impl Into for BoostedTreesQuantileStreamResourceDeserializeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesQuantileStreamResourceDeserialize::new().build(quantile_stream_resource_handle, bucket_boundaries, scope)`. -pub fn boosted_trees_quantile_stream_resource_deserialize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - quantile_stream_resource_handle: O0, - bucket_boundaries: O1, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesQuantileStreamResourceDeserialize::new().build( - quantile_stream_resource_handle, - bucket_boundaries, - scope, - ) +pub fn boosted_trees_quantile_stream_resource_deserialize, O1: ::std::convert::Into>(quantile_stream_resource_handle: O0, bucket_boundaries: O1, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesQuantileStreamResourceDeserialize::new().build(quantile_stream_resource_handle, bucket_boundaries, scope) } + /// Builder for the `BoostedTreesQuantileStreamResourceFlush` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesQuantileStreamResourceFlush { generate_quantiles: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesQuantileStreamResourceFlush' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesQuantileStreamResourceFlushInst { + /// An instance of a fully built BoostedTreesQuantileStreamResourceFlush Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesQuantileStreamResourceFlush { /// Creates a new `BoostedTreesQuantileStreamResourceFlush`. @@ -13517,10 +16791,7 @@ impl BoostedTreesQuantileStreamResourceFlush { } /// Sets the `generate_quantiles` attribute. - pub fn generate_quantiles>( - mut self, - value: ArgType, - ) -> Self { + pub fn generate_quantiles>(mut self, value: ArgType) -> Self { self.generate_quantiles = ::std::option::Option::Some(value.into()); self } @@ -13532,63 +16803,66 @@ impl BoostedTreesQuantileStreamResourceFlush { } /// Builds the `BoostedTreesQuantileStreamResourceFlush` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - quantile_stream_resource_handle: O0, - num_buckets: O1, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - quantile_stream_resource_handle.into(), - num_buckets.into(), - scope, - ) - } - - fn build_impl( - &self, - quantile_stream_resource_handle: crate::Output, - num_buckets: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, quantile_stream_resource_handle: O0, num_buckets: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(quantile_stream_resource_handle.into(), num_buckets.into(), scope) + } + fn build_impl(&self, quantile_stream_resource_handle: crate::Output, num_buckets: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesQuantileStreamResourceFlush", |nd| { nd.add_input(quantile_stream_resource_handle); nd.add_input(num_buckets); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.generate_quantiles { - nd.set_attr_bool("generate_quantiles", *value)?; - } + if let ::std::option::Option::Some(value) = &self.generate_quantiles { + nd.set_attr_bool("generate_quantiles", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesQuantileStreamResourceFlush` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, quantile_stream_resource_handle: O0, num_buckets: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(quantile_stream_resource_handle.into(), num_buckets.into(), scope) + } + fn build_instance_impl(&self, quantile_stream_resource_handle: crate::Output, num_buckets: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesQuantileStreamResourceFlush", |nd| { + nd.add_input(quantile_stream_resource_handle); + nd.add_input(num_buckets); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.generate_quantiles { + nd.set_attr_bool("generate_quantiles", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesQuantileStreamResourceFlushInst{op}) + } +} +impl BoostedTreesQuantileStreamResourceFlushInst { +} +impl Into for BoostedTreesQuantileStreamResourceFlushInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesQuantileStreamResourceFlush::new().build(quantile_stream_resource_handle, num_buckets, scope)`. -pub fn boosted_trees_quantile_stream_resource_flush< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - quantile_stream_resource_handle: O0, - num_buckets: O1, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesQuantileStreamResourceFlush::new().build( - quantile_stream_resource_handle, - num_buckets, - scope, - ) +pub fn boosted_trees_quantile_stream_resource_flush, O1: ::std::convert::Into>(quantile_stream_resource_handle: O0, num_buckets: O1, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesQuantileStreamResourceFlush::new().build(quantile_stream_resource_handle, num_buckets, scope) } + /// Builder for the `BoostedTreesQuantileStreamResourceGetBucketBoundaries` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesQuantileStreamResourceGetBucketBoundaries { num_features: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesQuantileStreamResourceGetBucketBoundaries' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesQuantileStreamResourceGetBucketBoundariesInst { + /// An instance of a fully built BoostedTreesQuantileStreamResourceGetBucketBoundaries Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesQuantileStreamResourceGetBucketBoundaries { /// Creates a new `BoostedTreesQuantileStreamResourceGetBucketBoundaries`. @@ -13609,45 +16883,64 @@ impl BoostedTreesQuantileStreamResourceGetBucketBoundaries { } /// Builds the `BoostedTreesQuantileStreamResourceGetBucketBoundaries` operation. - pub fn build>( - &self, - quantile_stream_resource_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, quantile_stream_resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(quantile_stream_resource_handle.into(), scope) } + fn build_impl(&self, quantile_stream_resource_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("BoostedTreesQuantileStreamResourceGetBucketBoundaries", |nd| { + nd.add_input(quantile_stream_resource_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + ::std::result::Result::Ok(()) + }) + } - fn build_impl( - &self, - quantile_stream_resource_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation( - "BoostedTreesQuantileStreamResourceGetBucketBoundaries", - |nd| { - nd.add_input(quantile_stream_resource_handle); - for op in &self.control_inputs { - nd.add_control_input(op); - } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } - ::std::result::Result::Ok(()) - }, - ) + /// Builds the `BoostedTreesQuantileStreamResourceGetBucketBoundaries` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, quantile_stream_resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(quantile_stream_resource_handle.into(), scope) + } + fn build_instance_impl(&self, quantile_stream_resource_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesQuantileStreamResourceGetBucketBoundaries", |nd| { + nd.add_input(quantile_stream_resource_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesQuantileStreamResourceGetBucketBoundariesInst{op}) + } +} +impl BoostedTreesQuantileStreamResourceGetBucketBoundariesInst { + /// Returns a Vector of Outputs for 'bucket_boundaries' output of this BoostedTreesQuantileStreamResourceGetBucketBoundaries operation. + pub fn bucket_boundaries(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for BoostedTreesQuantileStreamResourceGetBucketBoundariesInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `BoostedTreesQuantileStreamResourceGetBucketBoundaries::new().build(quantile_stream_resource_handle, scope)`. -pub fn boosted_trees_quantile_stream_resource_get_bucket_boundaries< - O0: ::std::convert::Into, ->( - quantile_stream_resource_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesQuantileStreamResourceGetBucketBoundaries::new() - .build(quantile_stream_resource_handle, scope) +pub fn boosted_trees_quantile_stream_resource_get_bucket_boundaries>(quantile_stream_resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesQuantileStreamResourceGetBucketBoundaries::new().build(quantile_stream_resource_handle, scope) } + /// Builder for the `BoostedTreesQuantileStreamResourceHandleOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesQuantileStreamResourceHandleOp { @@ -13655,6 +16948,12 @@ pub struct BoostedTreesQuantileStreamResourceHandleOp { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesQuantileStreamResourceHandleOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesQuantileStreamResourceHandleOpInst { + /// An instance of a fully built BoostedTreesQuantileStreamResourceHandleOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesQuantileStreamResourceHandleOp { /// Creates a new `BoostedTreesQuantileStreamResourceHandleOp`. @@ -13663,19 +16962,13 @@ impl BoostedTreesQuantileStreamResourceHandleOp { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -13687,37 +16980,74 @@ impl BoostedTreesQuantileStreamResourceHandleOp { } /// Builds the `BoostedTreesQuantileStreamResourceHandleOp` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesQuantileStreamResourceHandleOp", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesQuantileStreamResourceHandleOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesQuantileStreamResourceHandleOp", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesQuantileStreamResourceHandleOpInst{op}) + } +} +impl BoostedTreesQuantileStreamResourceHandleOpInst { + /// Returns the 'resource' output of this 'BoostedTreesQuantileStreamResourceHandleOp' operation. + pub fn resource(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BoostedTreesQuantileStreamResourceHandleOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesQuantileStreamResourceHandleOp::new().build(scope)`. -pub fn boosted_trees_quantile_stream_resource_handle_op( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn boosted_trees_quantile_stream_resource_handle_op<>(scope: &mut crate::Scope) -> crate::Result { BoostedTreesQuantileStreamResourceHandleOp::new().build(scope) } + /// Builder for the `BoostedTreesSerializeEnsemble` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesSerializeEnsemble { control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesSerializeEnsemble' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesSerializeEnsembleInst { + /// An instance of a fully built BoostedTreesSerializeEnsemble Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesSerializeEnsemble { /// Creates a new `BoostedTreesSerializeEnsemble`. @@ -13732,19 +17062,10 @@ impl BoostedTreesSerializeEnsemble { } /// Builds the `BoostedTreesSerializeEnsemble` operation. - pub fn build>( - &self, - tree_ensemble_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, tree_ensemble_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tree_ensemble_handle.into(), scope) } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tree_ensemble_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesSerializeEnsemble", |nd| { nd.add_input(tree_ensemble_handle); for op in &self.control_inputs { @@ -13753,15 +17074,48 @@ impl BoostedTreesSerializeEnsemble { ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesSerializeEnsemble` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, tree_ensemble_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesSerializeEnsemble", |nd| { + nd.add_input(tree_ensemble_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesSerializeEnsembleInst{op}) + } +} +impl BoostedTreesSerializeEnsembleInst { + /// Returns the 'stamp_token' output of this 'BoostedTreesSerializeEnsemble' operation. + pub fn stamp_token(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'tree_ensemble_serialized' output of this 'BoostedTreesSerializeEnsemble' operation. + pub fn tree_ensemble_serialized(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for BoostedTreesSerializeEnsembleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesSerializeEnsemble::new().build(tree_ensemble_handle, scope)`. -pub fn boosted_trees_serialize_ensemble>( - tree_ensemble_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn boosted_trees_serialize_ensemble>(tree_ensemble_handle: O0, scope: &mut crate::Scope) -> crate::Result { BoostedTreesSerializeEnsemble::new().build(tree_ensemble_handle, scope) } + /// Builder for the `BoostedTreesSparseAggregateStats` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesSparseAggregateStats { @@ -13769,6 +17123,12 @@ pub struct BoostedTreesSparseAggregateStats { num_buckets: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesSparseAggregateStats' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesSparseAggregateStatsInst { + /// An instance of a fully built BoostedTreesSparseAggregateStats Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesSparseAggregateStats { /// Creates a new `BoostedTreesSparseAggregateStats`. @@ -13795,44 +17155,10 @@ impl BoostedTreesSparseAggregateStats { } /// Builds the `BoostedTreesSparseAggregateStats` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - node_ids: O0, - gradients: O1, - hessians: O2, - feature_indices: O3, - feature_values: O4, - feature_shape: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - node_ids.into(), - gradients.into(), - hessians.into(), - feature_indices.into(), - feature_values.into(), - feature_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - node_ids: crate::Output, - gradients: crate::Output, - hessians: crate::Output, - feature_indices: crate::Output, - feature_values: crate::Output, - feature_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, node_ids: O0, gradients: O1, hessians: O2, feature_indices: O3, feature_values: O4, feature_shape: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(node_ids.into(), gradients.into(), hessians.into(), feature_indices.into(), feature_values.into(), feature_shape.into(), scope) + } + fn build_impl(&self, node_ids: crate::Output, gradients: crate::Output, hessians: crate::Output, feature_indices: crate::Output, feature_values: crate::Output, feature_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesSparseAggregateStats", |nd| { nd.add_input(node_ids); nd.add_input(gradients); @@ -13843,44 +17169,75 @@ impl BoostedTreesSparseAggregateStats { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.max_splits { - nd.set_attr_int("max_splits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_buckets { - nd.set_attr_int("num_buckets", *value)?; - } + if let ::std::option::Option::Some(value) = &self.max_splits { + nd.set_attr_int("max_splits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesSparseAggregateStats` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, node_ids: O0, gradients: O1, hessians: O2, feature_indices: O3, feature_values: O4, feature_shape: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(node_ids.into(), gradients.into(), hessians.into(), feature_indices.into(), feature_values.into(), feature_shape.into(), scope) + } + fn build_instance_impl(&self, node_ids: crate::Output, gradients: crate::Output, hessians: crate::Output, feature_indices: crate::Output, feature_values: crate::Output, feature_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesSparseAggregateStats", |nd| { + nd.add_input(node_ids); + nd.add_input(gradients); + nd.add_input(hessians); + nd.add_input(feature_indices); + nd.add_input(feature_values); + nd.add_input(feature_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.max_splits { + nd.set_attr_int("max_splits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesSparseAggregateStatsInst{op}) + } +} +impl BoostedTreesSparseAggregateStatsInst { + /// Returns the 'stats_summary_indices' output of this 'BoostedTreesSparseAggregateStats' operation. + pub fn stats_summary_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'stats_summary_values' output of this 'BoostedTreesSparseAggregateStats' operation. + pub fn stats_summary_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'stats_summary_shape' output of this 'BoostedTreesSparseAggregateStats' operation. + pub fn stats_summary_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for BoostedTreesSparseAggregateStatsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesSparseAggregateStats::new().build(node_ids, gradients, hessians, feature_indices, feature_values, feature_shape, scope)`. -pub fn boosted_trees_sparse_aggregate_stats< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - node_ids: O0, - gradients: O1, - hessians: O2, - feature_indices: O3, - feature_values: O4, - feature_shape: O5, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesSparseAggregateStats::new().build( - node_ids, - gradients, - hessians, - feature_indices, - feature_values, - feature_shape, - scope, - ) +pub fn boosted_trees_sparse_aggregate_stats, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(node_ids: O0, gradients: O1, hessians: O2, feature_indices: O3, feature_values: O4, feature_shape: O5, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesSparseAggregateStats::new().build(node_ids, gradients, hessians, feature_indices, feature_values, feature_shape, scope) } + /// Builder for the `BoostedTreesSparseCalculateBestFeatureSplit` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesSparseCalculateBestFeatureSplit { @@ -13888,6 +17245,12 @@ pub struct BoostedTreesSparseCalculateBestFeatureSplit { split_type: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesSparseCalculateBestFeatureSplit' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesSparseCalculateBestFeatureSplitInst { + /// An instance of a fully built BoostedTreesSparseCalculateBestFeatureSplit Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesSparseCalculateBestFeatureSplit { /// Creates a new `BoostedTreesSparseCalculateBestFeatureSplit`. @@ -13902,10 +17265,7 @@ impl BoostedTreesSparseCalculateBestFeatureSplit { } /// Sets the `split_type` attribute. - pub fn split_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn split_type>(mut self, value: ArgType) -> Self { self.split_type = ::std::option::Option::Some(value.into()); self } @@ -13917,52 +17277,10 @@ impl BoostedTreesSparseCalculateBestFeatureSplit { } /// Builds the `BoostedTreesSparseCalculateBestFeatureSplit` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - node_id_range: O0, - stats_summary_indices: O1, - stats_summary_values: O2, - stats_summary_shape: O3, - l1: O4, - l2: O5, - tree_complexity: O6, - min_node_weight: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - node_id_range.into(), - stats_summary_indices.into(), - stats_summary_values.into(), - stats_summary_shape.into(), - l1.into(), - l2.into(), - tree_complexity.into(), - min_node_weight.into(), - scope, - ) - } - - fn build_impl( - &self, - node_id_range: crate::Output, - stats_summary_indices: crate::Output, - stats_summary_values: crate::Output, - stats_summary_shape: crate::Output, - l1: crate::Output, - l2: crate::Output, - tree_complexity: crate::Output, - min_node_weight: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, node_id_range: O0, stats_summary_indices: O1, stats_summary_values: O2, stats_summary_shape: O3, l1: O4, l2: O5, tree_complexity: O6, min_node_weight: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(node_id_range.into(), stats_summary_indices.into(), stats_summary_values.into(), stats_summary_shape.into(), l1.into(), l2.into(), tree_complexity.into(), min_node_weight.into(), scope) + } + fn build_impl(&self, node_id_range: crate::Output, stats_summary_indices: crate::Output, stats_summary_values: crate::Output, stats_summary_shape: crate::Output, l1: crate::Output, l2: crate::Output, tree_complexity: crate::Output, min_node_weight: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesSparseCalculateBestFeatureSplit", |nd| { nd.add_input(node_id_range); nd.add_input(stats_summary_indices); @@ -13975,50 +17293,105 @@ impl BoostedTreesSparseCalculateBestFeatureSplit { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.logits_dimension { - nd.set_attr_int("logits_dimension", *value)?; - } - if let ::std::option::Option::Some(value) = &self.split_type { - nd.set_attr_string("split_type", value)?; - } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.split_type { + nd.set_attr_string("split_type", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesSparseCalculateBestFeatureSplit` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, node_id_range: O0, stats_summary_indices: O1, stats_summary_values: O2, stats_summary_shape: O3, l1: O4, l2: O5, tree_complexity: O6, min_node_weight: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(node_id_range.into(), stats_summary_indices.into(), stats_summary_values.into(), stats_summary_shape.into(), l1.into(), l2.into(), tree_complexity.into(), min_node_weight.into(), scope) + } + fn build_instance_impl(&self, node_id_range: crate::Output, stats_summary_indices: crate::Output, stats_summary_values: crate::Output, stats_summary_shape: crate::Output, l1: crate::Output, l2: crate::Output, tree_complexity: crate::Output, min_node_weight: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesSparseCalculateBestFeatureSplit", |nd| { + nd.add_input(node_id_range); + nd.add_input(stats_summary_indices); + nd.add_input(stats_summary_values); + nd.add_input(stats_summary_shape); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(tree_complexity); + nd.add_input(min_node_weight); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.split_type { + nd.set_attr_string("split_type", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesSparseCalculateBestFeatureSplitInst{op}) + } +} +impl BoostedTreesSparseCalculateBestFeatureSplitInst { + /// Returns the 'node_ids' output of this 'BoostedTreesSparseCalculateBestFeatureSplit' operation. + pub fn node_ids(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'gains' output of this 'BoostedTreesSparseCalculateBestFeatureSplit' operation. + pub fn gains(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'feature_dimensions' output of this 'BoostedTreesSparseCalculateBestFeatureSplit' operation. + pub fn feature_dimensions(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'thresholds' output of this 'BoostedTreesSparseCalculateBestFeatureSplit' operation. + pub fn thresholds(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'left_node_contribs' output of this 'BoostedTreesSparseCalculateBestFeatureSplit' operation. + pub fn left_node_contribs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } + /// Returns the 'right_node_contribs' output of this 'BoostedTreesSparseCalculateBestFeatureSplit' operation. + pub fn right_node_contribs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 5 + } + } + /// Returns the 'split_with_default_directions' output of this 'BoostedTreesSparseCalculateBestFeatureSplit' operation. + pub fn split_with_default_directions(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 6 + } + } +} +impl Into for BoostedTreesSparseCalculateBestFeatureSplitInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesSparseCalculateBestFeatureSplit::new().build(node_id_range, stats_summary_indices, stats_summary_values, stats_summary_shape, l1, l2, tree_complexity, min_node_weight, scope)`. -pub fn boosted_trees_sparse_calculate_best_feature_split< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - node_id_range: O0, - stats_summary_indices: O1, - stats_summary_values: O2, - stats_summary_shape: O3, - l1: O4, - l2: O5, - tree_complexity: O6, - min_node_weight: O7, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesSparseCalculateBestFeatureSplit::new().build( - node_id_range, - stats_summary_indices, - stats_summary_values, - stats_summary_shape, - l1, - l2, - tree_complexity, - min_node_weight, - scope, - ) +pub fn boosted_trees_sparse_calculate_best_feature_split, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(node_id_range: O0, stats_summary_indices: O1, stats_summary_values: O2, stats_summary_shape: O3, l1: O4, l2: O5, tree_complexity: O6, min_node_weight: O7, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesSparseCalculateBestFeatureSplit::new().build(node_id_range, stats_summary_indices, stats_summary_values, stats_summary_shape, l1, l2, tree_complexity, min_node_weight, scope) } + /// Builder for the `BoostedTreesTrainingPredict` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesTrainingPredict { @@ -14026,6 +17399,12 @@ pub struct BoostedTreesTrainingPredict { logits_dimension: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesTrainingPredict' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesTrainingPredictInst { + /// An instance of a fully built BoostedTreesTrainingPredict Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesTrainingPredict { /// Creates a new `BoostedTreesTrainingPredict`. @@ -14034,10 +17413,7 @@ impl BoostedTreesTrainingPredict { } /// Sets the `num_bucketized_features` attribute. - pub fn num_bucketized_features>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_bucketized_features>(mut self, value: ArgType) -> Self { self.num_bucketized_features = ::std::option::Option::Some(value.into()); self } @@ -14055,36 +17431,10 @@ impl BoostedTreesTrainingPredict { } /// Builds the `BoostedTreesTrainingPredict` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - tree_ensemble_handle: O0, - cached_tree_ids: O1, - cached_node_ids: O2, - bucketized_features: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tree_ensemble_handle.into(), - cached_tree_ids.into(), - cached_node_ids.into(), - bucketized_features.into(), - scope, - ) - } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - cached_tree_ids: crate::Output, - cached_node_ids: crate::Output, - bucketized_features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, tree_ensemble_handle: O0, cached_tree_ids: O1, cached_node_ids: O2, bucketized_features: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tree_ensemble_handle.into(), cached_tree_ids.into(), cached_node_ids.into(), bucketized_features.into(), scope) + } + fn build_impl(&self, tree_ensemble_handle: crate::Output, cached_tree_ids: crate::Output, cached_node_ids: crate::Output, bucketized_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesTrainingPredict", |nd| { nd.add_input(tree_ensemble_handle); nd.add_input(cached_tree_ids); @@ -14093,38 +17443,73 @@ impl BoostedTreesTrainingPredict { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_bucketized_features { - nd.set_attr_int("num_bucketized_features", *value)?; - } - if let ::std::option::Option::Some(value) = &self.logits_dimension { - nd.set_attr_int("logits_dimension", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_bucketized_features { + nd.set_attr_int("num_bucketized_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesTrainingPredict` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, tree_ensemble_handle: O0, cached_tree_ids: O1, cached_node_ids: O2, bucketized_features: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), cached_tree_ids.into(), cached_node_ids.into(), bucketized_features.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, cached_tree_ids: crate::Output, cached_node_ids: crate::Output, bucketized_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesTrainingPredict", |nd| { + nd.add_input(tree_ensemble_handle); + nd.add_input(cached_tree_ids); + nd.add_input(cached_node_ids); + nd.add_input(bucketized_features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_bucketized_features { + nd.set_attr_int("num_bucketized_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesTrainingPredictInst{op}) + } +} +impl BoostedTreesTrainingPredictInst { + /// Returns the 'partial_logits' output of this 'BoostedTreesTrainingPredict' operation. + pub fn partial_logits(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'tree_ids' output of this 'BoostedTreesTrainingPredict' operation. + pub fn tree_ids(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'node_ids' output of this 'BoostedTreesTrainingPredict' operation. + pub fn node_ids(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for BoostedTreesTrainingPredictInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesTrainingPredict::new().build(tree_ensemble_handle, cached_tree_ids, cached_node_ids, bucketized_features, scope)`. -pub fn boosted_trees_training_predict< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - tree_ensemble_handle: O0, - cached_tree_ids: O1, - cached_node_ids: O2, - bucketized_features: O3, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesTrainingPredict::new().build( - tree_ensemble_handle, - cached_tree_ids, - cached_node_ids, - bucketized_features, - scope, - ) +pub fn boosted_trees_training_predict, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(tree_ensemble_handle: O0, cached_tree_ids: O1, cached_node_ids: O2, bucketized_features: O3, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesTrainingPredict::new().build(tree_ensemble_handle, cached_tree_ids, cached_node_ids, bucketized_features, scope) } + /// Builder for the `BoostedTreesUpdateEnsemble` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesUpdateEnsemble { @@ -14132,6 +17517,12 @@ pub struct BoostedTreesUpdateEnsemble { num_features: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesUpdateEnsemble' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesUpdateEnsembleInst { + /// An instance of a fully built BoostedTreesUpdateEnsemble Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesUpdateEnsemble { /// Creates a new `BoostedTreesUpdateEnsemble`. @@ -14158,56 +17549,10 @@ impl BoostedTreesUpdateEnsemble { } /// Builds the `BoostedTreesUpdateEnsemble` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - tree_ensemble_handle: O0, - feature_ids: O1, - node_ids: O2, - gains: O3, - thresholds: O4, - left_node_contribs: O5, - right_node_contribs: O6, - max_depth: O7, - learning_rate: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tree_ensemble_handle.into(), - feature_ids.into(), - node_ids.into(), - gains.into(), - thresholds.into(), - left_node_contribs.into(), - right_node_contribs.into(), - max_depth.into(), - learning_rate.into(), - scope, - ) - } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - feature_ids: crate::Output, - node_ids: crate::Output, - gains: crate::Output, - thresholds: crate::Output, - left_node_contribs: crate::Output, - right_node_contribs: crate::Output, - max_depth: crate::Output, - learning_rate: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, tree_ensemble_handle: O0, feature_ids: O1, node_ids: O2, gains: O3, thresholds: O4, left_node_contribs: O5, right_node_contribs: O6, max_depth: O7, learning_rate: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tree_ensemble_handle.into(), feature_ids.into(), node_ids.into(), gains.into(), thresholds.into(), left_node_contribs.into(), right_node_contribs.into(), max_depth.into(), learning_rate.into(), scope) + } + fn build_impl(&self, tree_ensemble_handle: crate::Output, feature_ids: crate::Output, node_ids: crate::Output, gains: crate::Output, thresholds: crate::Output, left_node_contribs: crate::Output, right_node_contribs: crate::Output, max_depth: crate::Output, learning_rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesUpdateEnsemble", |nd| { nd.add_input(tree_ensemble_handle); nd.add_input(feature_ids); @@ -14221,53 +17566,57 @@ impl BoostedTreesUpdateEnsemble { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.pruning_mode { - nd.set_attr_int("pruning_mode", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } + if let ::std::option::Option::Some(value) = &self.pruning_mode { + nd.set_attr_int("pruning_mode", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesUpdateEnsemble` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, tree_ensemble_handle: O0, feature_ids: O1, node_ids: O2, gains: O3, thresholds: O4, left_node_contribs: O5, right_node_contribs: O6, max_depth: O7, learning_rate: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), feature_ids.into(), node_ids.into(), gains.into(), thresholds.into(), left_node_contribs.into(), right_node_contribs.into(), max_depth.into(), learning_rate.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, feature_ids: crate::Output, node_ids: crate::Output, gains: crate::Output, thresholds: crate::Output, left_node_contribs: crate::Output, right_node_contribs: crate::Output, max_depth: crate::Output, learning_rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesUpdateEnsemble", |nd| { + nd.add_input(tree_ensemble_handle); + nd.add_input(feature_ids); + nd.add_input(node_ids); + nd.add_input(gains); + nd.add_input(thresholds); + nd.add_input(left_node_contribs); + nd.add_input(right_node_contribs); + nd.add_input(max_depth); + nd.add_input(learning_rate); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.pruning_mode { + nd.set_attr_int("pruning_mode", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesUpdateEnsembleInst{op}) + } +} +impl BoostedTreesUpdateEnsembleInst { +} +impl Into for BoostedTreesUpdateEnsembleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesUpdateEnsemble::new().build(tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, scope)`. -pub fn boosted_trees_update_ensemble< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - tree_ensemble_handle: O0, - feature_ids: O1, - node_ids: O2, - gains: O3, - thresholds: O4, - left_node_contribs: O5, - right_node_contribs: O6, - max_depth: O7, - learning_rate: O8, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesUpdateEnsemble::new().build( - tree_ensemble_handle, - feature_ids, - node_ids, - gains, - thresholds, - left_node_contribs, - right_node_contribs, - max_depth, - learning_rate, - scope, - ) +pub fn boosted_trees_update_ensemble, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(tree_ensemble_handle: O0, feature_ids: O1, node_ids: O2, gains: O3, thresholds: O4, left_node_contribs: O5, right_node_contribs: O6, max_depth: O7, learning_rate: O8, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesUpdateEnsemble::new().build(tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, scope) } + /// Builder for the `BoostedTreesUpdateEnsembleV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BoostedTreesUpdateEnsembleV2 { @@ -14276,6 +17625,12 @@ pub struct BoostedTreesUpdateEnsembleV2 { num_groups: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BoostedTreesUpdateEnsembleV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BoostedTreesUpdateEnsembleV2Inst { + /// An instance of a fully built BoostedTreesUpdateEnsembleV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BoostedTreesUpdateEnsembleV2 { /// Creates a new `BoostedTreesUpdateEnsembleV2`. @@ -14308,68 +17663,10 @@ impl BoostedTreesUpdateEnsembleV2 { } /// Builds the `BoostedTreesUpdateEnsembleV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - >( - &self, - tree_ensemble_handle: O0, - feature_ids: O1, - dimension_ids: O2, - node_ids: O3, - gains: O4, - thresholds: O5, - left_node_contribs: O6, - right_node_contribs: O7, - split_types: O8, - max_depth: O9, - learning_rate: O10, - pruning_mode: O11, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tree_ensemble_handle.into(), - feature_ids.into(), - dimension_ids.into(), - node_ids.into(), - gains.into(), - thresholds.into(), - left_node_contribs.into(), - right_node_contribs.into(), - split_types.into(), - max_depth.into(), - learning_rate.into(), - pruning_mode.into(), - scope, - ) - } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - feature_ids: crate::Output, - dimension_ids: crate::Output, - node_ids: crate::Output, - gains: crate::Output, - thresholds: crate::Output, - left_node_contribs: crate::Output, - right_node_contribs: crate::Output, - split_types: crate::Output, - max_depth: crate::Output, - learning_rate: crate::Output, - pruning_mode: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(&self, tree_ensemble_handle: O0, feature_ids: O1, dimension_ids: O2, node_ids: O3, gains: O4, thresholds: O5, left_node_contribs: O6, right_node_contribs: O7, split_types: O8, max_depth: O9, learning_rate: O10, pruning_mode: O11, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tree_ensemble_handle.into(), feature_ids.into(), dimension_ids.into(), node_ids.into(), gains.into(), thresholds.into(), left_node_contribs.into(), right_node_contribs.into(), split_types.into(), max_depth.into(), learning_rate.into(), pruning_mode.into(), scope) + } + fn build_impl(&self, tree_ensemble_handle: crate::Output, feature_ids: crate::Output, dimension_ids: crate::Output, node_ids: crate::Output, gains: crate::Output, thresholds: crate::Output, left_node_contribs: crate::Output, right_node_contribs: crate::Output, split_types: crate::Output, max_depth: crate::Output, learning_rate: crate::Output, pruning_mode: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BoostedTreesUpdateEnsembleV2", |nd| { nd.add_input(tree_ensemble_handle); nd.add_input(feature_ids); @@ -14386,71 +17683,78 @@ impl BoostedTreesUpdateEnsembleV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } - if let ::std::option::Option::Some(value) = &self.logits_dimension { - nd.set_attr_int("logits_dimension", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_groups { - nd.set_attr_int("num_groups", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_groups { + nd.set_attr_int("num_groups", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BoostedTreesUpdateEnsembleV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(&self, tree_ensemble_handle: O0, feature_ids: O1, dimension_ids: O2, node_ids: O3, gains: O4, thresholds: O5, left_node_contribs: O6, right_node_contribs: O7, split_types: O8, max_depth: O9, learning_rate: O10, pruning_mode: O11, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), feature_ids.into(), dimension_ids.into(), node_ids.into(), gains.into(), thresholds.into(), left_node_contribs.into(), right_node_contribs.into(), split_types.into(), max_depth.into(), learning_rate.into(), pruning_mode.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, feature_ids: crate::Output, dimension_ids: crate::Output, node_ids: crate::Output, gains: crate::Output, thresholds: crate::Output, left_node_contribs: crate::Output, right_node_contribs: crate::Output, split_types: crate::Output, max_depth: crate::Output, learning_rate: crate::Output, pruning_mode: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BoostedTreesUpdateEnsembleV2", |nd| { + nd.add_input(tree_ensemble_handle); + nd.add_input(feature_ids); + nd.add_input(dimension_ids); + nd.add_input(node_ids); + nd.add_input(gains); + nd.add_input(thresholds); + nd.add_input(left_node_contribs); + nd.add_input(right_node_contribs); + nd.add_input(split_types); + nd.add_input(max_depth); + nd.add_input(learning_rate); + nd.add_input(pruning_mode); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.logits_dimension { + nd.set_attr_int("logits_dimension", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_groups { + nd.set_attr_int("num_groups", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BoostedTreesUpdateEnsembleV2Inst{op}) + } +} +impl BoostedTreesUpdateEnsembleV2Inst { +} +impl Into for BoostedTreesUpdateEnsembleV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BoostedTreesUpdateEnsembleV2::new().build(tree_ensemble_handle, feature_ids, dimension_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, split_types, max_depth, learning_rate, pruning_mode, scope)`. -pub fn boosted_trees_update_ensemble_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, ->( - tree_ensemble_handle: O0, - feature_ids: O1, - dimension_ids: O2, - node_ids: O3, - gains: O4, - thresholds: O5, - left_node_contribs: O6, - right_node_contribs: O7, - split_types: O8, - max_depth: O9, - learning_rate: O10, - pruning_mode: O11, - scope: &mut crate::Scope, -) -> crate::Result { - BoostedTreesUpdateEnsembleV2::new().build( - tree_ensemble_handle, - feature_ids, - dimension_ids, - node_ids, - gains, - thresholds, - left_node_contribs, - right_node_contribs, - split_types, - max_depth, - learning_rate, - pruning_mode, - scope, - ) +pub fn boosted_trees_update_ensemble_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(tree_ensemble_handle: O0, feature_ids: O1, dimension_ids: O2, node_ids: O3, gains: O4, thresholds: O5, left_node_contribs: O6, right_node_contribs: O7, split_types: O8, max_depth: O9, learning_rate: O10, pruning_mode: O11, scope: &mut crate::Scope) -> crate::Result { + BoostedTreesUpdateEnsembleV2::new().build(tree_ensemble_handle, feature_ids, dimension_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, split_types, max_depth, learning_rate, pruning_mode, scope) } + /// Builder for the `BroadcastArgs` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BroadcastArgs { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BroadcastArgs' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BroadcastArgsInst { + /// An instance of a fully built BroadcastArgs Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BroadcastArgs { /// Creates a new `BroadcastArgs`. @@ -14471,55 +17775,73 @@ impl BroadcastArgs { } /// Builds the `BroadcastArgs` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - s0: O0, - s1: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, s0: O0, s1: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(s0.into(), s1.into(), scope) } - - fn build_impl( - &self, - s0: crate::Output, - s1: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, s0: crate::Output, s1: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BroadcastArgs", |nd| { nd.add_input(s0); nd.add_input(s1); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BroadcastArgs` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, s0: O0, s1: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(s0.into(), s1.into(), scope) + } + fn build_instance_impl(&self, s0: crate::Output, s1: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BroadcastArgs", |nd| { + nd.add_input(s0); + nd.add_input(s1); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BroadcastArgsInst{op}) + } +} +impl BroadcastArgsInst { + /// Returns the 'r0' output of this 'BroadcastArgs' operation. + pub fn r0(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BroadcastArgsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BroadcastArgs::new().build(s0, s1, scope)`. -pub fn broadcast_args< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - s0: O0, - s1: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn broadcast_args, O1: ::std::convert::Into>(s0: O0, s1: O1, scope: &mut crate::Scope) -> crate::Result { BroadcastArgs::new().build(s0, s1, scope) } + /// Builder for the `BroadcastGradientArgs` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BroadcastGradientArgs { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BroadcastGradientArgs' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BroadcastGradientArgsInst { + /// An instance of a fully built BroadcastGradientArgs Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BroadcastGradientArgs { /// Creates a new `BroadcastGradientArgs`. @@ -14540,49 +17862,68 @@ impl BroadcastGradientArgs { } /// Builds the `BroadcastGradientArgs` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - s0: O0, - s1: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, s0: O0, s1: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(s0.into(), s1.into(), scope) } - - fn build_impl( - &self, - s0: crate::Output, - s1: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, s0: crate::Output, s1: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BroadcastGradientArgs", |nd| { nd.add_input(s0); nd.add_input(s1); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BroadcastGradientArgs` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, s0: O0, s1: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(s0.into(), s1.into(), scope) + } + fn build_instance_impl(&self, s0: crate::Output, s1: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BroadcastGradientArgs", |nd| { + nd.add_input(s0); + nd.add_input(s1); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BroadcastGradientArgsInst{op}) + } +} +impl BroadcastGradientArgsInst { + /// Returns the 'r0' output of this 'BroadcastGradientArgs' operation. + pub fn r0(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'r1' output of this 'BroadcastGradientArgs' operation. + pub fn r1(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for BroadcastGradientArgsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BroadcastGradientArgs::new().build(s0, s1, scope)`. -pub fn broadcast_gradient_args< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - s0: O0, - s1: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn broadcast_gradient_args, O1: ::std::convert::Into>(s0: O0, s1: O1, scope: &mut crate::Scope) -> crate::Result { BroadcastGradientArgs::new().build(s0, s1, scope) } + /// Builder for the `BroadcastTo` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BroadcastTo { @@ -14590,6 +17931,12 @@ pub struct BroadcastTo { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'BroadcastTo' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BroadcastToInst { + /// An instance of a fully built BroadcastTo Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BroadcastTo { /// Creates a new `BroadcastTo`. @@ -14616,52 +17963,67 @@ impl BroadcastTo { } /// Builds the `BroadcastTo` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - shape: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), shape.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BroadcastTo", |nd| { nd.add_input(input); nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BroadcastTo` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), shape.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BroadcastTo", |nd| { + nd.add_input(input); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BroadcastToInst{op}) + } +} +impl BroadcastToInst { + /// Returns the 'output' output of this 'BroadcastTo' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BroadcastToInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BroadcastTo::new().build(input, shape, scope)`. -pub fn broadcast_to< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - shape: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn broadcast_to, O1: ::std::convert::Into>(input: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { BroadcastTo::new().build(input, shape, scope) } + /// Builder for the `Bucketize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Bucketize { @@ -14669,6 +18031,12 @@ pub struct Bucketize { boundaries: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Bucketize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BucketizeInst { + /// An instance of a fully built Bucketize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Bucketize { /// Creates a new `Bucketize`. @@ -14683,10 +18051,7 @@ impl Bucketize { } /// Sets the `boundaries` attribute. - pub fn boundaries>>( - mut self, - value: ArgType, - ) -> Self { + pub fn boundaries>>(mut self, value: ArgType) -> Self { self.boundaries = ::std::option::Option::Some(value.into()); self } @@ -14698,42 +18063,65 @@ impl Bucketize { } /// Builds the `Bucketize` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Bucketize", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.boundaries { - nd.set_attr_float_list("boundaries", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.boundaries { + nd.set_attr_float_list("boundaries", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Bucketize` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Bucketize", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.boundaries { + nd.set_attr_float_list("boundaries", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BucketizeInst{op}) + } +} +impl BucketizeInst { + /// Returns the 'output' output of this 'Bucketize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BucketizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Bucketize::new().build(input, scope)`. -pub fn bucketize>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bucketize>(input: O0, scope: &mut crate::Scope) -> crate::Result { Bucketize::new().build(input, scope) } + /// Builder for the `BytesProducedStatsDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct BytesProducedStatsDataset { @@ -14741,6 +18129,12 @@ pub struct BytesProducedStatsDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'BytesProducedStatsDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct BytesProducedStatsDatasetInst { + /// An instance of a fully built BytesProducedStatsDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl BytesProducedStatsDataset { /// Creates a new `BytesProducedStatsDataset`. @@ -14749,19 +18143,13 @@ impl BytesProducedStatsDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -14773,58 +18161,79 @@ impl BytesProducedStatsDataset { } /// Builds the `BytesProducedStatsDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - tag: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), tag.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - tag: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, tag: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("BytesProducedStatsDataset", |nd| { nd.add_input(input_dataset); nd.add_input(tag); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `BytesProducedStatsDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), tag.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, tag: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("BytesProducedStatsDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(tag); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(BytesProducedStatsDatasetInst{op}) + } +} +impl BytesProducedStatsDatasetInst { + /// Returns the 'handle' output of this 'BytesProducedStatsDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for BytesProducedStatsDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `BytesProducedStatsDataset::new().build(input_dataset, tag, scope)`. -pub fn bytes_produced_stats_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - tag: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn bytes_produced_stats_dataset, O1: ::std::convert::Into>(input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { BytesProducedStatsDataset::new().build(input_dataset, tag, scope) } + /// Builder for the `CSRSparseMatrixComponents` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CSRSparseMatrixComponents { type_: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CSRSparseMatrixComponents' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CSRSparseMatrixComponentsInst { + /// An instance of a fully built CSRSparseMatrixComponents Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CSRSparseMatrixComponents { /// Creates a new `CSRSparseMatrixComponents`. @@ -14845,55 +18254,87 @@ impl CSRSparseMatrixComponents { } /// Builds the `CSRSparseMatrixComponents` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - csr_sparse_matrix: O0, - index: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, csr_sparse_matrix: O0, index: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(csr_sparse_matrix.into(), index.into(), scope) } - - fn build_impl( - &self, - csr_sparse_matrix: crate::Output, - index: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, csr_sparse_matrix: crate::Output, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CSRSparseMatrixComponents", |nd| { nd.add_input(csr_sparse_matrix); nd.add_input(index); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.type_ { - nd.set_attr_type("type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CSRSparseMatrixComponents` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, csr_sparse_matrix: O0, index: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(csr_sparse_matrix.into(), index.into(), scope) + } + fn build_instance_impl(&self, csr_sparse_matrix: crate::Output, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CSRSparseMatrixComponents", |nd| { + nd.add_input(csr_sparse_matrix); + nd.add_input(index); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CSRSparseMatrixComponentsInst{op}) + } +} +impl CSRSparseMatrixComponentsInst { + /// Returns the 'row_ptrs' output of this 'CSRSparseMatrixComponents' operation. + pub fn row_ptrs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'col_inds' output of this 'CSRSparseMatrixComponents' operation. + pub fn col_inds(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'values' output of this 'CSRSparseMatrixComponents' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for CSRSparseMatrixComponentsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CSRSparseMatrixComponents::new().build(csr_sparse_matrix, index, scope)`. -pub fn csrsparse_matrix_components< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - csr_sparse_matrix: O0, - index: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn csrsparse_matrix_components, O1: ::std::convert::Into>(csr_sparse_matrix: O0, index: O1, scope: &mut crate::Scope) -> crate::Result { CSRSparseMatrixComponents::new().build(csr_sparse_matrix, index, scope) } + /// Builder for the `CSRSparseMatrixToDense` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CSRSparseMatrixToDense { type_: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CSRSparseMatrixToDense' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CSRSparseMatrixToDenseInst { + /// An instance of a fully built CSRSparseMatrixToDense Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CSRSparseMatrixToDense { /// Creates a new `CSRSparseMatrixToDense`. @@ -14914,45 +18355,71 @@ impl CSRSparseMatrixToDense { } /// Builds the `CSRSparseMatrixToDense` operation. - pub fn build>( - &self, - sparse_input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, sparse_input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(sparse_input.into(), scope) } - - fn build_impl( - &self, - sparse_input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, sparse_input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CSRSparseMatrixToDense", |nd| { nd.add_input(sparse_input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.type_ { - nd.set_attr_type("type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CSRSparseMatrixToDense` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, sparse_input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_input.into(), scope) + } + fn build_instance_impl(&self, sparse_input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CSRSparseMatrixToDense", |nd| { + nd.add_input(sparse_input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CSRSparseMatrixToDenseInst{op}) + } +} +impl CSRSparseMatrixToDenseInst { + /// Returns the 'dense_output' output of this 'CSRSparseMatrixToDense' operation. + pub fn dense_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CSRSparseMatrixToDenseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CSRSparseMatrixToDense::new().build(sparse_input, scope)`. -pub fn csrsparse_matrix_to_dense>( - sparse_input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn csrsparse_matrix_to_dense>(sparse_input: O0, scope: &mut crate::Scope) -> crate::Result { CSRSparseMatrixToDense::new().build(sparse_input, scope) } + /// Builder for the `CSRSparseMatrixToSparseTensor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CSRSparseMatrixToSparseTensor { type_: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CSRSparseMatrixToSparseTensor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CSRSparseMatrixToSparseTensorInst { + /// An instance of a fully built CSRSparseMatrixToSparseTensor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CSRSparseMatrixToSparseTensor { /// Creates a new `CSRSparseMatrixToSparseTensor`. @@ -14973,39 +18440,73 @@ impl CSRSparseMatrixToSparseTensor { } /// Builds the `CSRSparseMatrixToSparseTensor` operation. - pub fn build>( - &self, - sparse_matrix: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, sparse_matrix: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(sparse_matrix.into(), scope) } - - fn build_impl( - &self, - sparse_matrix: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, sparse_matrix: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CSRSparseMatrixToSparseTensor", |nd| { nd.add_input(sparse_matrix); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.type_ { - nd.set_attr_type("type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CSRSparseMatrixToSparseTensor` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, sparse_matrix: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_matrix.into(), scope) + } + fn build_instance_impl(&self, sparse_matrix: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CSRSparseMatrixToSparseTensor", |nd| { + nd.add_input(sparse_matrix); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CSRSparseMatrixToSparseTensorInst{op}) + } +} +impl CSRSparseMatrixToSparseTensorInst { + /// Returns the 'indices' output of this 'CSRSparseMatrixToSparseTensor' operation. + pub fn indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'CSRSparseMatrixToSparseTensor' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'dense_shape' output of this 'CSRSparseMatrixToSparseTensor' operation. + pub fn dense_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for CSRSparseMatrixToSparseTensorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CSRSparseMatrixToSparseTensor::new().build(sparse_matrix, scope)`. -pub fn csrsparse_matrix_to_sparse_tensor>( - sparse_matrix: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn csrsparse_matrix_to_sparse_tensor>(sparse_matrix: O0, scope: &mut crate::Scope) -> crate::Result { CSRSparseMatrixToSparseTensor::new().build(sparse_matrix, scope) } + /// Builder for the `CSVDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CSVDataset { @@ -15013,6 +18514,12 @@ pub struct CSVDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CSVDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CSVDatasetInst { + /// An instance of a fully built CSVDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CSVDataset { /// Creates a new `CSVDataset`. @@ -15021,19 +18528,13 @@ impl CSVDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -15045,56 +18546,10 @@ impl CSVDataset { } /// Builds the `CSVDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - filenames: O0, - compression_type: O1, - buffer_size: O2, - header: O3, - field_delim: O4, - use_quote_delim: O5, - na_value: O6, - select_cols: O7, - record_defaults: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - filenames.into(), - compression_type.into(), - buffer_size.into(), - header.into(), - field_delim.into(), - use_quote_delim.into(), - na_value.into(), - select_cols.into(), - record_defaults.into(), - scope, - ) - } - - fn build_impl( - &self, - filenames: crate::Output, - compression_type: crate::Output, - buffer_size: crate::Output, - header: crate::Output, - field_delim: crate::Output, - use_quote_delim: crate::Output, - na_value: crate::Output, - select_cols: crate::Output, - record_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, filenames: O0, compression_type: O1, buffer_size: O2, header: O3, field_delim: O4, use_quote_delim: O5, na_value: O6, select_cols: O7, record_defaults: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(filenames.into(), compression_type.into(), buffer_size.into(), header.into(), field_delim.into(), use_quote_delim.into(), na_value.into(), select_cols.into(), record_defaults.into(), scope) + } + fn build_impl(&self, filenames: crate::Output, compression_type: crate::Output, buffer_size: crate::Output, header: crate::Output, field_delim: crate::Output, use_quote_delim: crate::Output, na_value: crate::Output, select_cols: crate::Output, record_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CSVDataset", |nd| { nd.add_input(filenames); nd.add_input(compression_type); @@ -15108,53 +18563,64 @@ impl CSVDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CSVDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, filenames: O0, compression_type: O1, buffer_size: O2, header: O3, field_delim: O4, use_quote_delim: O5, na_value: O6, select_cols: O7, record_defaults: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filenames.into(), compression_type.into(), buffer_size.into(), header.into(), field_delim.into(), use_quote_delim.into(), na_value.into(), select_cols.into(), record_defaults.into(), scope) + } + fn build_instance_impl(&self, filenames: crate::Output, compression_type: crate::Output, buffer_size: crate::Output, header: crate::Output, field_delim: crate::Output, use_quote_delim: crate::Output, na_value: crate::Output, select_cols: crate::Output, record_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CSVDataset", |nd| { + nd.add_input(filenames); + nd.add_input(compression_type); + nd.add_input(buffer_size); + nd.add_input(header); + nd.add_input(field_delim); + nd.add_input(use_quote_delim); + nd.add_input(na_value); + nd.add_input(select_cols); + nd.add_input(record_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CSVDatasetInst{op}) + } +} +impl CSVDatasetInst { + /// Returns the 'handle' output of this 'CSVDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CSVDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CSVDataset::new().build(filenames, compression_type, buffer_size, header, field_delim, use_quote_delim, na_value, select_cols, record_defaults, scope)`. -pub fn csvdataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - filenames: O0, - compression_type: O1, - buffer_size: O2, - header: O3, - field_delim: O4, - use_quote_delim: O5, - na_value: O6, - select_cols: O7, - record_defaults: O8, - scope: &mut crate::Scope, -) -> crate::Result { - CSVDataset::new().build( - filenames, - compression_type, - buffer_size, - header, - field_delim, - use_quote_delim, - na_value, - select_cols, - record_defaults, - scope, - ) +pub fn csvdataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(filenames: O0, compression_type: O1, buffer_size: O2, header: O3, field_delim: O4, use_quote_delim: O5, na_value: O6, select_cols: O7, record_defaults: O8, scope: &mut crate::Scope) -> crate::Result { + CSVDataset::new().build(filenames, compression_type, buffer_size, header, field_delim, use_quote_delim, na_value, select_cols, record_defaults, scope) } + /// Builder for the `CSVDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CSVDatasetV2 { @@ -15162,6 +18628,12 @@ pub struct CSVDatasetV2 { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CSVDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CSVDatasetV2Inst { + /// An instance of a fully built CSVDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CSVDatasetV2 { /// Creates a new `CSVDatasetV2`. @@ -15170,19 +18642,13 @@ impl CSVDatasetV2 { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -15194,60 +18660,10 @@ impl CSVDatasetV2 { } /// Builds the `CSVDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - filenames: O0, - compression_type: O1, - buffer_size: O2, - header: O3, - field_delim: O4, - use_quote_delim: O5, - na_value: O6, - select_cols: O7, - record_defaults: O8, - exclude_cols: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - filenames.into(), - compression_type.into(), - buffer_size.into(), - header.into(), - field_delim.into(), - use_quote_delim.into(), - na_value.into(), - select_cols.into(), - record_defaults.into(), - exclude_cols.into(), - scope, - ) - } - - fn build_impl( - &self, - filenames: crate::Output, - compression_type: crate::Output, - buffer_size: crate::Output, - header: crate::Output, - field_delim: crate::Output, - use_quote_delim: crate::Output, - na_value: crate::Output, - select_cols: crate::Output, - record_defaults: crate::Output, - exclude_cols: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, filenames: O0, compression_type: O1, buffer_size: O2, header: O3, field_delim: O4, use_quote_delim: O5, na_value: O6, select_cols: O7, record_defaults: O8, exclude_cols: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(filenames.into(), compression_type.into(), buffer_size.into(), header.into(), field_delim.into(), use_quote_delim.into(), na_value.into(), select_cols.into(), record_defaults.into(), exclude_cols.into(), scope) + } + fn build_impl(&self, filenames: crate::Output, compression_type: crate::Output, buffer_size: crate::Output, header: crate::Output, field_delim: crate::Output, use_quote_delim: crate::Output, na_value: crate::Output, select_cols: crate::Output, record_defaults: crate::Output, exclude_cols: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CSVDatasetV2", |nd| { nd.add_input(filenames); nd.add_input(compression_type); @@ -15262,56 +18678,65 @@ impl CSVDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CSVDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, filenames: O0, compression_type: O1, buffer_size: O2, header: O3, field_delim: O4, use_quote_delim: O5, na_value: O6, select_cols: O7, record_defaults: O8, exclude_cols: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filenames.into(), compression_type.into(), buffer_size.into(), header.into(), field_delim.into(), use_quote_delim.into(), na_value.into(), select_cols.into(), record_defaults.into(), exclude_cols.into(), scope) + } + fn build_instance_impl(&self, filenames: crate::Output, compression_type: crate::Output, buffer_size: crate::Output, header: crate::Output, field_delim: crate::Output, use_quote_delim: crate::Output, na_value: crate::Output, select_cols: crate::Output, record_defaults: crate::Output, exclude_cols: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CSVDatasetV2", |nd| { + nd.add_input(filenames); + nd.add_input(compression_type); + nd.add_input(buffer_size); + nd.add_input(header); + nd.add_input(field_delim); + nd.add_input(use_quote_delim); + nd.add_input(na_value); + nd.add_input(select_cols); + nd.add_input(record_defaults); + nd.add_input(exclude_cols); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CSVDatasetV2Inst{op}) + } +} +impl CSVDatasetV2Inst { + /// Returns the 'handle' output of this 'CSVDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CSVDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CSVDatasetV2::new().build(filenames, compression_type, buffer_size, header, field_delim, use_quote_delim, na_value, select_cols, record_defaults, exclude_cols, scope)`. -pub fn csvdataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - filenames: O0, - compression_type: O1, - buffer_size: O2, - header: O3, - field_delim: O4, - use_quote_delim: O5, - na_value: O6, - select_cols: O7, - record_defaults: O8, - exclude_cols: O9, - scope: &mut crate::Scope, -) -> crate::Result { - CSVDatasetV2::new().build( - filenames, - compression_type, - buffer_size, - header, - field_delim, - use_quote_delim, - na_value, - select_cols, - record_defaults, - exclude_cols, - scope, - ) +pub fn csvdataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(filenames: O0, compression_type: O1, buffer_size: O2, header: O3, field_delim: O4, use_quote_delim: O5, na_value: O6, select_cols: O7, record_defaults: O8, exclude_cols: O9, scope: &mut crate::Scope) -> crate::Result { + CSVDatasetV2::new().build(filenames, compression_type, buffer_size, header, field_delim, use_quote_delim, na_value, select_cols, record_defaults, exclude_cols, scope) } + /// Builder for the `CTCBeamSearchDecoder` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CTCBeamSearchDecoder { @@ -15321,6 +18746,12 @@ pub struct CTCBeamSearchDecoder { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CTCBeamSearchDecoder' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CTCBeamSearchDecoderInst { + /// An instance of a fully built CTCBeamSearchDecoder Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CTCBeamSearchDecoder { /// Creates a new `CTCBeamSearchDecoder`. @@ -15359,58 +18790,116 @@ impl CTCBeamSearchDecoder { } /// Builds the `CTCBeamSearchDecoder` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - inputs: O0, - sequence_length: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, inputs: O0, sequence_length: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), sequence_length.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - sequence_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, sequence_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CTCBeamSearchDecoder", |nd| { nd.add_input(inputs); nd.add_input(sequence_length); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.beam_width { - nd.set_attr_int("beam_width", *value)?; - } - if let ::std::option::Option::Some(value) = &self.top_paths { - nd.set_attr_int("top_paths", *value)?; - } - if let ::std::option::Option::Some(value) = &self.merge_repeated { - nd.set_attr_bool("merge_repeated", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.beam_width { + nd.set_attr_int("beam_width", *value)?; + } + if let ::std::option::Option::Some(value) = &self.top_paths { + nd.set_attr_int("top_paths", *value)?; + } + if let ::std::option::Option::Some(value) = &self.merge_repeated { + nd.set_attr_bool("merge_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CTCBeamSearchDecoder` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, inputs: O0, sequence_length: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), sequence_length.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, sequence_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CTCBeamSearchDecoder", |nd| { + nd.add_input(inputs); + nd.add_input(sequence_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.beam_width { + nd.set_attr_int("beam_width", *value)?; + } + if let ::std::option::Option::Some(value) = &self.top_paths { + nd.set_attr_int("top_paths", *value)?; + } + if let ::std::option::Option::Some(value) = &self.merge_repeated { + nd.set_attr_bool("merge_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CTCBeamSearchDecoderInst{op}) + } +} +impl CTCBeamSearchDecoderInst { + /// Returns a Vector of Outputs for 'decoded_indices' output of this CTCBeamSearchDecoder operation. + pub fn decoded_indices(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("top_paths")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'decoded_values' output of this CTCBeamSearchDecoder operation. + pub fn decoded_values(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("top_paths")?+1) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("top_paths")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'decoded_shape' output of this CTCBeamSearchDecoder operation. + pub fn decoded_shape(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("top_paths")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("top_paths")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'log_probability' output of this 'CTCBeamSearchDecoder' operation. + pub fn log_probability(&self) -> crate::Result { + let dynamic_offset = (3*self.op.get_attr_int("top_paths")?+3) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } +} +impl Into for CTCBeamSearchDecoderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CTCBeamSearchDecoder::new().build(inputs, sequence_length, scope)`. -pub fn ctcbeam_search_decoder< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - inputs: O0, - sequence_length: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ctcbeam_search_decoder, O1: ::std::convert::Into>(inputs: O0, sequence_length: O1, scope: &mut crate::Scope) -> crate::Result { CTCBeamSearchDecoder::new().build(inputs, sequence_length, scope) } + /// Builder for the `CTCGreedyDecoder` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CTCGreedyDecoder { @@ -15419,6 +18908,12 @@ pub struct CTCGreedyDecoder { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CTCGreedyDecoder' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CTCGreedyDecoderInst { + /// An instance of a fully built CTCGreedyDecoder Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CTCGreedyDecoder { /// Creates a new `CTCGreedyDecoder`. @@ -15451,55 +18946,94 @@ impl CTCGreedyDecoder { } /// Builds the `CTCGreedyDecoder` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - inputs: O0, - sequence_length: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, inputs: O0, sequence_length: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), sequence_length.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - sequence_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, sequence_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CTCGreedyDecoder", |nd| { nd.add_input(inputs); nd.add_input(sequence_length); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.merge_repeated { - nd.set_attr_bool("merge_repeated", *value)?; - } - if let ::std::option::Option::Some(value) = &self.blank_index { - nd.set_attr_int("blank_index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.merge_repeated { + nd.set_attr_bool("merge_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.blank_index { + nd.set_attr_int("blank_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CTCGreedyDecoder` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, inputs: O0, sequence_length: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), sequence_length.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, sequence_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CTCGreedyDecoder", |nd| { + nd.add_input(inputs); + nd.add_input(sequence_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.merge_repeated { + nd.set_attr_bool("merge_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.blank_index { + nd.set_attr_int("blank_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CTCGreedyDecoderInst{op}) + } +} +impl CTCGreedyDecoderInst { + /// Returns the 'decoded_indices' output of this 'CTCGreedyDecoder' operation. + pub fn decoded_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'decoded_values' output of this 'CTCGreedyDecoder' operation. + pub fn decoded_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'decoded_shape' output of this 'CTCGreedyDecoder' operation. + pub fn decoded_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'log_probability' output of this 'CTCGreedyDecoder' operation. + pub fn log_probability(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for CTCGreedyDecoderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CTCGreedyDecoder::new().build(inputs, sequence_length, scope)`. -pub fn ctcgreedy_decoder< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - inputs: O0, - sequence_length: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ctcgreedy_decoder, O1: ::std::convert::Into>(inputs: O0, sequence_length: O1, scope: &mut crate::Scope) -> crate::Result { CTCGreedyDecoder::new().build(inputs, sequence_length, scope) } + /// Builder for the `CTCLoss` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CTCLoss { @@ -15509,6 +19043,12 @@ pub struct CTCLoss { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CTCLoss' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CTCLossInst { + /// An instance of a fully built CTCLoss Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CTCLoss { /// Creates a new `CTCLoss`. @@ -15517,28 +19057,19 @@ impl CTCLoss { } /// Sets the `preprocess_collapse_repeated` attribute. - pub fn preprocess_collapse_repeated>( - mut self, - value: ArgType, - ) -> Self { + pub fn preprocess_collapse_repeated>(mut self, value: ArgType) -> Self { self.preprocess_collapse_repeated = ::std::option::Option::Some(value.into()); self } /// Sets the `ctc_merge_repeated` attribute. - pub fn ctc_merge_repeated>( - mut self, - value: ArgType, - ) -> Self { + pub fn ctc_merge_repeated>(mut self, value: ArgType) -> Self { self.ctc_merge_repeated = ::std::option::Option::Some(value.into()); self } /// Sets the `ignore_longer_outputs_than_inputs` attribute. - pub fn ignore_longer_outputs_than_inputs>( - mut self, - value: ArgType, - ) -> Self { + pub fn ignore_longer_outputs_than_inputs>(mut self, value: ArgType) -> Self { self.ignore_longer_outputs_than_inputs = ::std::option::Option::Some(value.into()); self } @@ -15556,36 +19087,10 @@ impl CTCLoss { } /// Builds the `CTCLoss` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - inputs: O0, - labels_indices: O1, - labels_values: O2, - sequence_length: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - inputs.into(), - labels_indices.into(), - labels_values.into(), - sequence_length.into(), - scope, - ) - } - - fn build_impl( - &self, - inputs: crate::Output, - labels_indices: crate::Output, - labels_values: crate::Output, - sequence_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, inputs: O0, labels_indices: O1, labels_values: O2, sequence_length: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(inputs.into(), labels_indices.into(), labels_values.into(), sequence_length.into(), scope) + } + fn build_impl(&self, inputs: crate::Output, labels_indices: crate::Output, labels_values: crate::Output, sequence_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CTCLoss", |nd| { nd.add_input(inputs); nd.add_input(labels_indices); @@ -15594,44 +19099,78 @@ impl CTCLoss { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.preprocess_collapse_repeated { - nd.set_attr_bool("preprocess_collapse_repeated", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ctc_merge_repeated { - nd.set_attr_bool("ctc_merge_repeated", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ignore_longer_outputs_than_inputs { - nd.set_attr_bool("ignore_longer_outputs_than_inputs", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.preprocess_collapse_repeated { + nd.set_attr_bool("preprocess_collapse_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ctc_merge_repeated { + nd.set_attr_bool("ctc_merge_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ignore_longer_outputs_than_inputs { + nd.set_attr_bool("ignore_longer_outputs_than_inputs", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CTCLoss` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, inputs: O0, labels_indices: O1, labels_values: O2, sequence_length: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), labels_indices.into(), labels_values.into(), sequence_length.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, labels_indices: crate::Output, labels_values: crate::Output, sequence_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CTCLoss", |nd| { + nd.add_input(inputs); + nd.add_input(labels_indices); + nd.add_input(labels_values); + nd.add_input(sequence_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.preprocess_collapse_repeated { + nd.set_attr_bool("preprocess_collapse_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ctc_merge_repeated { + nd.set_attr_bool("ctc_merge_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ignore_longer_outputs_than_inputs { + nd.set_attr_bool("ignore_longer_outputs_than_inputs", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CTCLossInst{op}) + } +} +impl CTCLossInst { + /// Returns the 'loss' output of this 'CTCLoss' operation. + pub fn loss(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'gradient' output of this 'CTCLoss' operation. + pub fn gradient(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for CTCLossInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CTCLoss::new().build(inputs, labels_indices, labels_values, sequence_length, scope)`. -pub fn ctcloss< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - inputs: O0, - labels_indices: O1, - labels_values: O2, - sequence_length: O3, - scope: &mut crate::Scope, -) -> crate::Result { - CTCLoss::new().build( - inputs, - labels_indices, - labels_values, - sequence_length, - scope, - ) +pub fn ctcloss, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(inputs: O0, labels_indices: O1, labels_values: O2, sequence_length: O3, scope: &mut crate::Scope) -> crate::Result { + CTCLoss::new().build(inputs, labels_indices, labels_values, sequence_length, scope) } + /// Builder for the `CTCLossV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CTCLossV2 { @@ -15640,6 +19179,12 @@ pub struct CTCLossV2 { ignore_longer_outputs_than_inputs: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CTCLossV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CTCLossV2Inst { + /// An instance of a fully built CTCLossV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CTCLossV2 { /// Creates a new `CTCLossV2`. @@ -15648,28 +19193,19 @@ impl CTCLossV2 { } /// Sets the `preprocess_collapse_repeated` attribute. - pub fn preprocess_collapse_repeated>( - mut self, - value: ArgType, - ) -> Self { + pub fn preprocess_collapse_repeated>(mut self, value: ArgType) -> Self { self.preprocess_collapse_repeated = ::std::option::Option::Some(value.into()); self } /// Sets the `ctc_merge_repeated` attribute. - pub fn ctc_merge_repeated>( - mut self, - value: ArgType, - ) -> Self { + pub fn ctc_merge_repeated>(mut self, value: ArgType) -> Self { self.ctc_merge_repeated = ::std::option::Option::Some(value.into()); self } /// Sets the `ignore_longer_outputs_than_inputs` attribute. - pub fn ignore_longer_outputs_than_inputs>( - mut self, - value: ArgType, - ) -> Self { + pub fn ignore_longer_outputs_than_inputs>(mut self, value: ArgType) -> Self { self.ignore_longer_outputs_than_inputs = ::std::option::Option::Some(value.into()); self } @@ -15681,36 +19217,10 @@ impl CTCLossV2 { } /// Builds the `CTCLossV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - inputs: O0, - labels_indices: O1, - labels_values: O2, - sequence_length: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - inputs.into(), - labels_indices.into(), - labels_values.into(), - sequence_length.into(), - scope, - ) - } - - fn build_impl( - &self, - inputs: crate::Output, - labels_indices: crate::Output, - labels_values: crate::Output, - sequence_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, inputs: O0, labels_indices: O1, labels_values: O2, sequence_length: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(inputs.into(), labels_indices.into(), labels_values.into(), sequence_length.into(), scope) + } + fn build_impl(&self, inputs: crate::Output, labels_indices: crate::Output, labels_values: crate::Output, sequence_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CTCLossV2", |nd| { nd.add_input(inputs); nd.add_input(labels_indices); @@ -15719,41 +19229,72 @@ impl CTCLossV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.preprocess_collapse_repeated { - nd.set_attr_bool("preprocess_collapse_repeated", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ctc_merge_repeated { - nd.set_attr_bool("ctc_merge_repeated", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ignore_longer_outputs_than_inputs { - nd.set_attr_bool("ignore_longer_outputs_than_inputs", *value)?; - } + if let ::std::option::Option::Some(value) = &self.preprocess_collapse_repeated { + nd.set_attr_bool("preprocess_collapse_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ctc_merge_repeated { + nd.set_attr_bool("ctc_merge_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ignore_longer_outputs_than_inputs { + nd.set_attr_bool("ignore_longer_outputs_than_inputs", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CTCLossV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, inputs: O0, labels_indices: O1, labels_values: O2, sequence_length: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), labels_indices.into(), labels_values.into(), sequence_length.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, labels_indices: crate::Output, labels_values: crate::Output, sequence_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CTCLossV2", |nd| { + nd.add_input(inputs); + nd.add_input(labels_indices); + nd.add_input(labels_values); + nd.add_input(sequence_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.preprocess_collapse_repeated { + nd.set_attr_bool("preprocess_collapse_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ctc_merge_repeated { + nd.set_attr_bool("ctc_merge_repeated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ignore_longer_outputs_than_inputs { + nd.set_attr_bool("ignore_longer_outputs_than_inputs", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CTCLossV2Inst{op}) + } +} +impl CTCLossV2Inst { + /// Returns the 'loss' output of this 'CTCLossV2' operation. + pub fn loss(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'gradient' output of this 'CTCLossV2' operation. + pub fn gradient(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for CTCLossV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CTCLossV2::new().build(inputs, labels_indices, labels_values, sequence_length, scope)`. -pub fn ctcloss_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - inputs: O0, - labels_indices: O1, - labels_values: O2, - sequence_length: O3, - scope: &mut crate::Scope, -) -> crate::Result { - CTCLossV2::new().build( - inputs, - labels_indices, - labels_values, - sequence_length, - scope, - ) +pub fn ctcloss_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(inputs: O0, labels_indices: O1, labels_values: O2, sequence_length: O3, scope: &mut crate::Scope) -> crate::Result { + CTCLossV2::new().build(inputs, labels_indices, labels_values, sequence_length, scope) } + /// Builder for the `CacheDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CacheDataset { @@ -15762,6 +19303,12 @@ pub struct CacheDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CacheDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CacheDatasetInst { + /// An instance of a fully built CacheDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CacheDataset { /// Creates a new `CacheDataset`. @@ -15770,28 +19317,19 @@ impl CacheDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -15803,55 +19341,73 @@ impl CacheDataset { } /// Builds the `CacheDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - filename: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, filename: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), filename.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - filename: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, filename: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CacheDataset", |nd| { nd.add_input(input_dataset); nd.add_input(filename); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CacheDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, filename: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), filename.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, filename: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CacheDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(filename); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CacheDatasetInst{op}) + } +} +impl CacheDatasetInst { + /// Returns the 'handle' output of this 'CacheDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CacheDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CacheDataset::new().build(input_dataset, filename, scope)`. -pub fn cache_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - filename: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cache_dataset, O1: ::std::convert::Into>(input_dataset: O0, filename: O1, scope: &mut crate::Scope) -> crate::Result { CacheDataset::new().build(input_dataset, filename, scope) } + /// Builder for the `CacheDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CacheDatasetV2 { @@ -15860,6 +19416,12 @@ pub struct CacheDatasetV2 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CacheDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CacheDatasetV2Inst { + /// An instance of a fully built CacheDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CacheDatasetV2 { /// Creates a new `CacheDatasetV2`. @@ -15868,28 +19430,19 @@ impl CacheDatasetV2 { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -15901,27 +19454,10 @@ impl CacheDatasetV2 { } /// Builds the `CacheDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - filename: O1, - cache: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, filename: O1, cache: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), filename.into(), cache.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - filename: crate::Output, - cache: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, filename: crate::Output, cache: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CacheDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(filename); @@ -15929,33 +19465,64 @@ impl CacheDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CacheDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, filename: O1, cache: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), filename.into(), cache.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, filename: crate::Output, cache: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CacheDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(filename); + nd.add_input(cache); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CacheDatasetV2Inst{op}) + } +} +impl CacheDatasetV2Inst { + /// Returns the 'handle' output of this 'CacheDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CacheDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CacheDatasetV2::new().build(input_dataset, filename, cache, scope)`. -pub fn cache_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - filename: O1, - cache: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cache_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, filename: O1, cache: O2, scope: &mut crate::Scope) -> crate::Result { CacheDatasetV2::new().build(input_dataset, filename, cache, scope) } + /// Builder for the `Case` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Case { @@ -15965,6 +19532,12 @@ pub struct Case { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Case' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CaseInst { + /// An instance of a fully built Case Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Case { /// Creates a new `Case`. @@ -15973,37 +19546,25 @@ impl Case { } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } /// Sets the `branches` attribute. - pub fn branches>>( - mut self, - value: ArgType, - ) -> Self { + pub fn branches>>(mut self, value: ArgType) -> Self { self.branches = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -16015,55 +19576,79 @@ impl Case { } /// Builds the `Case` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - branch_index: O0, - input: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, branch_index: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(branch_index.into(), input.into(), scope) } - - fn build_impl( - &self, - branch_index: crate::Output, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, branch_index: crate::Output, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Case", |nd| { nd.add_input(branch_index); nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } - if let ::std::option::Option::Some(value) = &self.branches { - nd.set_attr_string_list("branches", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.branches { + nd.set_attr_string_list("branches", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Case` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, branch_index: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(branch_index.into(), input.into(), scope) + } + fn build_instance_impl(&self, branch_index: crate::Output, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Case", |nd| { + nd.add_input(branch_index); + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.branches { + nd.set_attr_string_list("branches", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CaseInst{op}) + } +} +impl CaseInst { + /// Returns the 'output' output of this 'Case' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CaseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Case::new().build(branch_index, input, scope)`. -pub fn case, O1: ::std::convert::Into>( - branch_index: O0, - input: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn case, O1: ::std::convert::Into>(branch_index: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { Case::new().build(branch_index, input, scope) } + /// Builder for the `Cast` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Cast { @@ -16072,6 +19657,12 @@ pub struct Cast { Truncate: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Cast' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CastInst { + /// An instance of a fully built Cast Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Cast { /// Creates a new `Cast`. @@ -16104,51 +19695,83 @@ impl Cast { } /// Builds the `Cast` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Cast", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.SrcT { - nd.set_attr_type("SrcT", *value)?; - } - if let ::std::option::Option::Some(value) = &self.DstT { - nd.set_attr_type("DstT", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Truncate { - nd.set_attr_bool("Truncate", *value)?; - } + if let ::std::option::Option::Some(value) = &self.SrcT { + nd.set_attr_type("SrcT", *value)?; + } + if let ::std::option::Option::Some(value) = &self.DstT { + nd.set_attr_type("DstT", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Truncate { + nd.set_attr_bool("Truncate", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Cast` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Cast", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.SrcT { + nd.set_attr_type("SrcT", *value)?; + } + if let ::std::option::Option::Some(value) = &self.DstT { + nd.set_attr_type("DstT", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Truncate { + nd.set_attr_bool("Truncate", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CastInst{op}) + } +} +impl CastInst { + /// Returns the 'y' output of this 'Cast' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CastInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Cast::new().build(x, scope)`. -pub fn cast>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cast>(x: O0, scope: &mut crate::Scope) -> crate::Result { Cast::new().build(x, scope) } + /// Builder for the `Ceil` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Ceil { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Ceil' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CeilInst { + /// An instance of a fully built Ceil Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Ceil { /// Creates a new `Ceil`. @@ -16169,39 +19792,59 @@ impl Ceil { } /// Builds the `Ceil` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Ceil", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Ceil` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Ceil", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CeilInst{op}) + } +} +impl CeilInst { + /// Returns the 'y' output of this 'Ceil' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CeilInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Ceil::new().build(x, scope)`. -pub fn ceil>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ceil>(x: O0, scope: &mut crate::Scope) -> crate::Result { Ceil::new().build(x, scope) } + /// Builder for the `CheckNumerics` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CheckNumerics { @@ -16209,6 +19852,12 @@ pub struct CheckNumerics { message: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CheckNumerics' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CheckNumericsInst { + /// An instance of a fully built CheckNumerics Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CheckNumerics { /// Creates a new `CheckNumerics`. @@ -16223,10 +19872,7 @@ impl CheckNumerics { } /// Sets the `message` attribute. - pub fn message>( - mut self, - value: ArgType, - ) -> Self { + pub fn message>(mut self, value: ArgType) -> Self { self.message = ::std::option::Option::Some(value.into()); self } @@ -16238,42 +19884,65 @@ impl CheckNumerics { } /// Builds the `CheckNumerics` operation. - pub fn build>( - &self, - tensor: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, tensor: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CheckNumerics", |nd| { nd.add_input(tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.message { - nd.set_attr_string("message", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.message { + nd.set_attr_string("message", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CheckNumerics` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, tensor: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CheckNumerics", |nd| { + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.message { + nd.set_attr_string("message", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CheckNumericsInst{op}) + } +} +impl CheckNumericsInst { + /// Returns the 'output' output of this 'CheckNumerics' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CheckNumericsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CheckNumerics::new().build(tensor, scope)`. -pub fn check_numerics>( - tensor: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn check_numerics>(tensor: O0, scope: &mut crate::Scope) -> crate::Result { CheckNumerics::new().build(tensor, scope) } + /// Builder for the `CheckNumericsV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CheckNumericsV2 { @@ -16281,6 +19950,12 @@ pub struct CheckNumericsV2 { message: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CheckNumericsV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CheckNumericsV2Inst { + /// An instance of a fully built CheckNumericsV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CheckNumericsV2 { /// Creates a new `CheckNumericsV2`. @@ -16295,10 +19970,7 @@ impl CheckNumericsV2 { } /// Sets the `message` attribute. - pub fn message>( - mut self, - value: ArgType, - ) -> Self { + pub fn message>(mut self, value: ArgType) -> Self { self.message = ::std::option::Option::Some(value.into()); self } @@ -16310,48 +19982,77 @@ impl CheckNumericsV2 { } /// Builds the `CheckNumericsV2` operation. - pub fn build>( - &self, - tensor: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, tensor: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CheckNumericsV2", |nd| { nd.add_input(tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.message { - nd.set_attr_string("message", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.message { + nd.set_attr_string("message", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CheckNumericsV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, tensor: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CheckNumericsV2", |nd| { + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.message { + nd.set_attr_string("message", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CheckNumericsV2Inst{op}) + } +} +impl CheckNumericsV2Inst { + /// Returns the 'output' output of this 'CheckNumericsV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CheckNumericsV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CheckNumericsV2::new().build(tensor, scope)`. -pub fn check_numerics_v2>( - tensor: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn check_numerics_v2>(tensor: O0, scope: &mut crate::Scope) -> crate::Result { CheckNumericsV2::new().build(tensor, scope) } + /// Builder for the `Cholesky` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Cholesky { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Cholesky' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CholeskyInst { + /// An instance of a fully built Cholesky Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Cholesky { /// Creates a new `Cholesky`. @@ -16372,45 +20073,71 @@ impl Cholesky { } /// Builds the `Cholesky` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Cholesky", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Cholesky` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Cholesky", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CholeskyInst{op}) + } +} +impl CholeskyInst { + /// Returns the 'output' output of this 'Cholesky' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CholeskyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Cholesky::new().build(input, scope)`. -pub fn cholesky>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cholesky>(input: O0, scope: &mut crate::Scope) -> crate::Result { Cholesky::new().build(input, scope) } + /// Builder for the `CholeskyGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CholeskyGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CholeskyGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CholeskyGradInst { + /// An instance of a fully built CholeskyGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CholeskyGrad { /// Creates a new `CholeskyGrad`. @@ -16431,49 +20158,61 @@ impl CholeskyGrad { } /// Builds the `CholeskyGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - l: O0, - grad: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, l: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(l.into(), grad.into(), scope) } - - fn build_impl( - &self, - l: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, l: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CholeskyGrad", |nd| { nd.add_input(l); nd.add_input(grad); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CholeskyGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, l: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(l.into(), grad.into(), scope) + } + fn build_instance_impl(&self, l: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CholeskyGrad", |nd| { + nd.add_input(l); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CholeskyGradInst{op}) + } +} +impl CholeskyGradInst { + /// Returns the 'output' output of this 'CholeskyGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CholeskyGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CholeskyGrad::new().build(l, grad, scope)`. -pub fn cholesky_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - l: O0, - grad: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cholesky_grad, O1: ::std::convert::Into>(l: O0, grad: O1, scope: &mut crate::Scope) -> crate::Result { CholeskyGrad::new().build(l, grad, scope) } + /// Builder for the `ChooseFastestBranchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ChooseFastestBranchDataset { @@ -16485,6 +20224,12 @@ pub struct ChooseFastestBranchDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ChooseFastestBranchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ChooseFastestBranchDatasetInst { + /// An instance of a fully built ChooseFastestBranchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ChooseFastestBranchDataset { /// Creates a new `ChooseFastestBranchDataset`. @@ -16493,55 +20238,37 @@ impl ChooseFastestBranchDataset { } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `num_elements_per_branch` attribute. - pub fn num_elements_per_branch>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_elements_per_branch>(mut self, value: ArgType) -> Self { self.num_elements_per_branch = ::std::option::Option::Some(value.into()); self } /// Sets the `branches` attribute. - pub fn branches>>( - mut self, - value: ArgType, - ) -> Self { + pub fn branches>>(mut self, value: ArgType) -> Self { self.branches = ::std::option::Option::Some(value.into()); self } /// Sets the `other_arguments_lengths` attribute. - pub fn other_arguments_lengths>>( - mut self, - value: ArgType, - ) -> Self { + pub fn other_arguments_lengths>>(mut self, value: ArgType) -> Self { self.other_arguments_lengths = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -16553,36 +20280,10 @@ impl ChooseFastestBranchDataset { } /// Builds the `ChooseFastestBranchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - ratio_numerator: O1, - ratio_denominator: O2, - other_arguments: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - ratio_numerator.into(), - ratio_denominator.into(), - other_arguments.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - ratio_numerator: crate::Output, - ratio_denominator: crate::Output, - other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, ratio_numerator: O1, ratio_denominator: O2, other_arguments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), ratio_numerator.into(), ratio_denominator.into(), other_arguments.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, ratio_numerator: crate::Output, ratio_denominator: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ChooseFastestBranchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(ratio_numerator); @@ -16591,50 +20292,83 @@ impl ChooseFastestBranchDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_elements_per_branch { - nd.set_attr_int("num_elements_per_branch", *value)?; - } - if let ::std::option::Option::Some(value) = &self.branches { - nd.set_attr_string_list("branches", value)?; - } - if let ::std::option::Option::Some(value) = &self.other_arguments_lengths { - nd.set_attr_int_list("other_arguments_lengths", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_elements_per_branch { + nd.set_attr_int("num_elements_per_branch", *value)?; + } + if let ::std::option::Option::Some(value) = &self.branches { + nd.set_attr_string_list("branches", value)?; + } + if let ::std::option::Option::Some(value) = &self.other_arguments_lengths { + nd.set_attr_int_list("other_arguments_lengths", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ChooseFastestBranchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, ratio_numerator: O1, ratio_denominator: O2, other_arguments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), ratio_numerator.into(), ratio_denominator.into(), other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, ratio_numerator: crate::Output, ratio_denominator: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ChooseFastestBranchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(ratio_numerator); + nd.add_input(ratio_denominator); + nd.add_input(other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_elements_per_branch { + nd.set_attr_int("num_elements_per_branch", *value)?; + } + if let ::std::option::Option::Some(value) = &self.branches { + nd.set_attr_string_list("branches", value)?; + } + if let ::std::option::Option::Some(value) = &self.other_arguments_lengths { + nd.set_attr_int_list("other_arguments_lengths", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ChooseFastestBranchDatasetInst{op}) + } +} +impl ChooseFastestBranchDatasetInst { + /// Returns the 'handle' output of this 'ChooseFastestBranchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ChooseFastestBranchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ChooseFastestBranchDataset::new().build(input_dataset, ratio_numerator, ratio_denominator, other_arguments, scope)`. -pub fn choose_fastest_branch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - ratio_numerator: O1, - ratio_denominator: O2, - other_arguments: O3, - scope: &mut crate::Scope, -) -> crate::Result { - ChooseFastestBranchDataset::new().build( - input_dataset, - ratio_numerator, - ratio_denominator, - other_arguments, - scope, - ) +pub fn choose_fastest_branch_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, ratio_numerator: O1, ratio_denominator: O2, other_arguments: O3, scope: &mut crate::Scope) -> crate::Result { + ChooseFastestBranchDataset::new().build(input_dataset, ratio_numerator, ratio_denominator, other_arguments, scope) } + /// Builder for the `ChooseFastestDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ChooseFastestDataset { @@ -16644,6 +20378,12 @@ pub struct ChooseFastestDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ChooseFastestDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ChooseFastestDatasetInst { + /// An instance of a fully built ChooseFastestDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ChooseFastestDataset { /// Creates a new `ChooseFastestDataset`. @@ -16664,19 +20404,13 @@ impl ChooseFastestDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -16688,54 +20422,89 @@ impl ChooseFastestDataset { } /// Builds the `ChooseFastestDataset` operation. - pub fn build>( - &self, - input_datasets: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_datasets: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_datasets.into(), scope) } - - fn build_impl( - &self, - input_datasets: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_datasets: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ChooseFastestDataset", |nd| { nd.add_input(input_datasets); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_experiments { - nd.set_attr_int("num_experiments", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_experiments { + nd.set_attr_int("num_experiments", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ChooseFastestDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_datasets: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_datasets.into(), scope) + } + fn build_instance_impl(&self, input_datasets: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ChooseFastestDataset", |nd| { + nd.add_input(input_datasets); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_experiments { + nd.set_attr_int("num_experiments", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ChooseFastestDatasetInst{op}) + } +} +impl ChooseFastestDatasetInst { + /// Returns the 'handle' output of this 'ChooseFastestDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ChooseFastestDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ChooseFastestDataset::new().build(input_datasets, scope)`. -pub fn choose_fastest_dataset>( - input_datasets: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn choose_fastest_dataset>(input_datasets: O0, scope: &mut crate::Scope) -> crate::Result { ChooseFastestDataset::new().build(input_datasets, scope) } + /// Builder for the `ClipByValue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ClipByValue { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ClipByValue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ClipByValueInst { + /// An instance of a fully built ClipByValue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ClipByValue { /// Creates a new `ClipByValue`. @@ -16756,32 +20525,10 @@ impl ClipByValue { } /// Builds the `ClipByValue` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - t: O0, - clip_value_min: O1, - clip_value_max: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - t.into(), - clip_value_min.into(), - clip_value_max.into(), - scope, - ) - } - - fn build_impl( - &self, - t: crate::Output, - clip_value_min: crate::Output, - clip_value_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, t: O0, clip_value_min: O1, clip_value_max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(t.into(), clip_value_min.into(), clip_value_max.into(), scope) + } + fn build_impl(&self, t: crate::Output, clip_value_min: crate::Output, clip_value_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ClipByValue", |nd| { nd.add_input(t); nd.add_input(clip_value_min); @@ -16789,32 +20536,63 @@ impl ClipByValue { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ClipByValue` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, t: O0, clip_value_min: O1, clip_value_max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(t.into(), clip_value_min.into(), clip_value_max.into(), scope) + } + fn build_instance_impl(&self, t: crate::Output, clip_value_min: crate::Output, clip_value_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ClipByValue", |nd| { + nd.add_input(t); + nd.add_input(clip_value_min); + nd.add_input(clip_value_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ClipByValueInst{op}) + } +} +impl ClipByValueInst { + /// Returns the 'output' output of this 'ClipByValue' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ClipByValueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ClipByValue::new().build(t, clip_value_min, clip_value_max, scope)`. -pub fn clip_by_value< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - t: O0, - clip_value_min: O1, - clip_value_max: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn clip_by_value, O1: ::std::convert::Into, O2: ::std::convert::Into>(t: O0, clip_value_min: O1, clip_value_max: O2, scope: &mut crate::Scope) -> crate::Result { ClipByValue::new().build(t, clip_value_min, clip_value_max, scope) } + /// Builder for the `CloseSummaryWriter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CloseSummaryWriter { control_inputs: ::std::vec::Vec, } +/// An instance of 'CloseSummaryWriter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CloseSummaryWriterInst { + /// An instance of a fully built CloseSummaryWriter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CloseSummaryWriter { /// Creates a new `CloseSummaryWriter`. @@ -16829,19 +20607,10 @@ impl CloseSummaryWriter { } /// Builds the `CloseSummaryWriter` operation. - pub fn build>( - &self, - writer: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, writer: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(writer.into(), scope) } - - fn build_impl( - &self, - writer: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, writer: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CloseSummaryWriter", |nd| { nd.add_input(writer); for op in &self.control_inputs { @@ -16850,15 +20619,34 @@ impl CloseSummaryWriter { ::std::result::Result::Ok(()) }) } -} + /// Builds the `CloseSummaryWriter` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, writer: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CloseSummaryWriter", |nd| { + nd.add_input(writer); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(CloseSummaryWriterInst{op}) + } +} +impl CloseSummaryWriterInst { +} +impl Into for CloseSummaryWriterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CloseSummaryWriter::new().build(writer, scope)`. -pub fn close_summary_writer>( - writer: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn close_summary_writer>(writer: O0, scope: &mut crate::Scope) -> crate::Result { CloseSummaryWriter::new().build(writer, scope) } + /// Builder for the `CollectiveAllToAllV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveAllToAllV3 { @@ -16866,6 +20654,12 @@ pub struct CollectiveAllToAllV3 { timeout_seconds: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveAllToAllV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveAllToAllV3Inst { + /// An instance of a fully built CollectiveAllToAllV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveAllToAllV3 { /// Creates a new `CollectiveAllToAllV3`. @@ -16892,32 +20686,10 @@ impl CollectiveAllToAllV3 { } /// Builds the `CollectiveAllToAllV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - communicator: O1, - group_assignment: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - communicator.into(), - group_assignment.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - communicator: crate::Output, - group_assignment: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, communicator: O1, group_assignment: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), communicator.into(), group_assignment.into(), scope) + } + fn build_impl(&self, input: crate::Output, communicator: crate::Output, group_assignment: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveAllToAllV3", |nd| { nd.add_input(input); nd.add_input(communicator); @@ -16925,30 +20697,141 @@ impl CollectiveAllToAllV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CollectiveAllToAllV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, communicator: O1, group_assignment: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), communicator.into(), group_assignment.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, communicator: crate::Output, group_assignment: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveAllToAllV3", |nd| { + nd.add_input(input); + nd.add_input(communicator); + nd.add_input(group_assignment); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveAllToAllV3Inst{op}) + } +} +impl CollectiveAllToAllV3Inst { + /// Returns the 'data' output of this 'CollectiveAllToAllV3' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveAllToAllV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CollectiveAllToAllV3::new().build(input, communicator, group_assignment, scope)`. -pub fn collective_all_to_all_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - communicator: O1, - group_assignment: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn collective_all_to_all_v3, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, communicator: O1, group_assignment: O2, scope: &mut crate::Scope) -> crate::Result { CollectiveAllToAllV3::new().build(input, communicator, group_assignment, scope) } + +/// Builder for the `CollectiveAssignGroupV2` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct CollectiveAssignGroupV2 { + control_inputs: ::std::vec::Vec, +} +/// An instance of 'CollectiveAssignGroupV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveAssignGroupV2Inst { + /// An instance of a fully built CollectiveAssignGroupV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl CollectiveAssignGroupV2 { + /// Creates a new `CollectiveAssignGroupV2`. + pub fn new() -> Self { + Self::default() + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `CollectiveAssignGroupV2` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, group_assignment: O0, device_index: O1, base_key: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(group_assignment.into(), device_index.into(), base_key.into(), scope) + } + fn build_impl(&self, group_assignment: crate::Output, device_index: crate::Output, base_key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("CollectiveAssignGroupV2", |nd| { + nd.add_input(group_assignment); + nd.add_input(device_index); + nd.add_input(base_key); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CollectiveAssignGroupV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, group_assignment: O0, device_index: O1, base_key: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(group_assignment.into(), device_index.into(), base_key.into(), scope) + } + fn build_instance_impl(&self, group_assignment: crate::Output, device_index: crate::Output, base_key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveAssignGroupV2", |nd| { + nd.add_input(group_assignment); + nd.add_input(device_index); + nd.add_input(base_key); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveAssignGroupV2Inst{op}) + } +} +impl CollectiveAssignGroupV2Inst { + /// Returns the 'group_size' output of this 'CollectiveAssignGroupV2' operation. + pub fn group_size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'group_key' output of this 'CollectiveAssignGroupV2' operation. + pub fn group_key(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for CollectiveAssignGroupV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `CollectiveAssignGroupV2::new().build(group_assignment, device_index, base_key, scope)`. +pub fn collective_assign_group_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(group_assignment: O0, device_index: O1, base_key: O2, scope: &mut crate::Scope) -> crate::Result { + CollectiveAssignGroupV2::new().build(group_assignment, device_index, base_key, scope) +} + /// Builder for the `CollectiveBcastRecv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveBcastRecv { @@ -16961,6 +20844,12 @@ pub struct CollectiveBcastRecv { timeout_seconds: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveBcastRecv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveBcastRecvInst { + /// An instance of a fully built CollectiveBcastRecv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveBcastRecv { /// Creates a new `CollectiveBcastRecv`. @@ -16999,10 +20888,7 @@ impl CollectiveBcastRecv { } /// Sets the `communication_hint` attribute. - pub fn communication_hint>( - mut self, - value: ArgType, - ) -> Self { + pub fn communication_hint>(mut self, value: ArgType) -> Self { self.communication_hint = ::std::option::Option::Some(value.into()); self } @@ -17020,45 +20906,93 @@ impl CollectiveBcastRecv { } /// Builds the `CollectiveBcastRecv` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveBcastRecv", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.group_size { - nd.set_attr_int("group_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.group_key { - nd.set_attr_int("group_key", *value)?; - } - if let ::std::option::Option::Some(value) = &self.instance_key { - nd.set_attr_int("instance_key", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.communication_hint { - nd.set_attr_string("communication_hint", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; - } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_size { + nd.set_attr_int("group_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_key { + nd.set_attr_int("group_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.instance_key { + nd.set_attr_int("instance_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CollectiveBcastRecv` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveBcastRecv", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_size { + nd.set_attr_int("group_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_key { + nd.set_attr_int("group_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.instance_key { + nd.set_attr_int("instance_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveBcastRecvInst{op}) + } +} +impl CollectiveBcastRecvInst { + /// Returns the 'data' output of this 'CollectiveBcastRecv' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveBcastRecvInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CollectiveBcastRecv::new().build(scope)`. -pub fn collective_bcast_recv(scope: &mut crate::Scope) -> crate::Result { +pub fn collective_bcast_recv<>(scope: &mut crate::Scope) -> crate::Result { CollectiveBcastRecv::new().build(scope) } + /// Builder for the `CollectiveBcastRecvV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveBcastRecvV2 { @@ -17068,6 +21002,12 @@ pub struct CollectiveBcastRecvV2 { timeout_seconds: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveBcastRecvV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveBcastRecvV2Inst { + /// An instance of a fully built CollectiveBcastRecvV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveBcastRecvV2 { /// Creates a new `CollectiveBcastRecvV2`. @@ -17082,19 +21022,13 @@ impl CollectiveBcastRecvV2 { } /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshape>(mut self, value: ArgType) -> Self { self.Tshape = ::std::option::Option::Some(value.into()); self } /// Sets the `communication_hint` attribute. - pub fn communication_hint>( - mut self, - value: ArgType, - ) -> Self { + pub fn communication_hint>(mut self, value: ArgType) -> Self { self.communication_hint = ::std::option::Option::Some(value.into()); self } @@ -17112,36 +21046,10 @@ impl CollectiveBcastRecvV2 { } /// Builds the `CollectiveBcastRecvV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - group_size: O0, - group_key: O1, - instance_key: O2, - shape: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - group_size.into(), - group_key.into(), - instance_key.into(), - shape.into(), - scope, - ) - } - - fn build_impl( - &self, - group_size: crate::Output, - group_key: crate::Output, - instance_key: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, group_size: O0, group_key: O1, instance_key: O2, shape: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(group_size.into(), group_key.into(), instance_key.into(), shape.into(), scope) + } + fn build_impl(&self, group_size: crate::Output, group_key: crate::Output, instance_key: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveBcastRecvV2", |nd| { nd.add_input(group_size); nd.add_input(group_key); @@ -17150,38 +21058,71 @@ impl CollectiveBcastRecvV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } - if let ::std::option::Option::Some(value) = &self.communication_hint { - nd.set_attr_string("communication_hint", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CollectiveBcastRecvV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, group_size: O0, group_key: O1, instance_key: O2, shape: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(group_size.into(), group_key.into(), instance_key.into(), shape.into(), scope) + } + fn build_instance_impl(&self, group_size: crate::Output, group_key: crate::Output, instance_key: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveBcastRecvV2", |nd| { + nd.add_input(group_size); + nd.add_input(group_key); + nd.add_input(instance_key); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveBcastRecvV2Inst{op}) + } +} +impl CollectiveBcastRecvV2Inst { + /// Returns the 'data' output of this 'CollectiveBcastRecvV2' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveBcastRecvV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CollectiveBcastRecvV2::new().build(group_size, group_key, instance_key, shape, scope)`. -pub fn collective_bcast_recv_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - group_size: O0, - group_key: O1, - instance_key: O2, - shape: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn collective_bcast_recv_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(group_size: O0, group_key: O1, instance_key: O2, shape: O3, scope: &mut crate::Scope) -> crate::Result { CollectiveBcastRecvV2::new().build(group_size, group_key, instance_key, shape, scope) } + /// Builder for the `CollectiveBcastSend` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveBcastSend { @@ -17194,6 +21135,12 @@ pub struct CollectiveBcastSend { timeout_seconds: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveBcastSend' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveBcastSendInst { + /// An instance of a fully built CollectiveBcastSend Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveBcastSend { /// Creates a new `CollectiveBcastSend`. @@ -17232,10 +21179,7 @@ impl CollectiveBcastSend { } /// Sets the `communication_hint` attribute. - pub fn communication_hint>( - mut self, - value: ArgType, - ) -> Self { + pub fn communication_hint>(mut self, value: ArgType) -> Self { self.communication_hint = ::std::option::Option::Some(value.into()); self } @@ -17253,57 +21197,95 @@ impl CollectiveBcastSend { } /// Builds the `CollectiveBcastSend` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveBcastSend", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.group_size { - nd.set_attr_int("group_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.group_key { - nd.set_attr_int("group_key", *value)?; - } - if let ::std::option::Option::Some(value) = &self.instance_key { - nd.set_attr_int("instance_key", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.communication_hint { - nd.set_attr_string("communication_hint", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_size { + nd.set_attr_int("group_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_key { + nd.set_attr_int("group_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.instance_key { + nd.set_attr_int("instance_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CollectiveBcastSend` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveBcastSend", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_size { + nd.set_attr_int("group_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_key { + nd.set_attr_int("group_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.instance_key { + nd.set_attr_int("instance_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveBcastSendInst{op}) + } +} +impl CollectiveBcastSendInst { + /// Returns the 'data' output of this 'CollectiveBcastSend' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveBcastSendInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CollectiveBcastSend::new().build(input, scope)`. -pub fn collective_bcast_send>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn collective_bcast_send>(input: O0, scope: &mut crate::Scope) -> crate::Result { CollectiveBcastSend::new().build(input, scope) } + /// Builder for the `CollectiveBcastSendV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveBcastSendV2 { @@ -17312,6 +21294,12 @@ pub struct CollectiveBcastSendV2 { timeout_seconds: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveBcastSendV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveBcastSendV2Inst { + /// An instance of a fully built CollectiveBcastSendV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveBcastSendV2 { /// Creates a new `CollectiveBcastSendV2`. @@ -17326,10 +21314,7 @@ impl CollectiveBcastSendV2 { } /// Sets the `communication_hint` attribute. - pub fn communication_hint>( - mut self, - value: ArgType, - ) -> Self { + pub fn communication_hint>(mut self, value: ArgType) -> Self { self.communication_hint = ::std::option::Option::Some(value.into()); self } @@ -17347,36 +21332,10 @@ impl CollectiveBcastSendV2 { } /// Builds the `CollectiveBcastSendV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input: O0, - group_size: O1, - group_key: O2, - instance_key: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - group_size.into(), - group_key.into(), - instance_key.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - group_size: crate::Output, - group_key: crate::Output, - instance_key: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, group_size: O1, group_key: O2, instance_key: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), group_size.into(), group_key.into(), instance_key.into(), scope) + } + fn build_impl(&self, input: crate::Output, group_size: crate::Output, group_key: crate::Output, instance_key: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveBcastSendV2", |nd| { nd.add_input(input); nd.add_input(group_size); @@ -17385,35 +21344,65 @@ impl CollectiveBcastSendV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.communication_hint { - nd.set_attr_string("communication_hint", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CollectiveBcastSendV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, group_size: O1, group_key: O2, instance_key: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), group_size.into(), group_key.into(), instance_key.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, group_size: crate::Output, group_key: crate::Output, instance_key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveBcastSendV2", |nd| { + nd.add_input(input); + nd.add_input(group_size); + nd.add_input(group_key); + nd.add_input(instance_key); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveBcastSendV2Inst{op}) + } +} +impl CollectiveBcastSendV2Inst { + /// Returns the 'data' output of this 'CollectiveBcastSendV2' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveBcastSendV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CollectiveBcastSendV2::new().build(input, group_size, group_key, instance_key, scope)`. -pub fn collective_bcast_send_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input: O0, - group_size: O1, - group_key: O2, - instance_key: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn collective_bcast_send_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input: O0, group_size: O1, group_key: O2, instance_key: O3, scope: &mut crate::Scope) -> crate::Result { CollectiveBcastSendV2::new().build(input, group_size, group_key, instance_key, scope) } + /// Builder for the `CollectiveGather` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveGather { @@ -17426,6 +21415,12 @@ pub struct CollectiveGather { timeout_seconds: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveGather' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveGatherInst { + /// An instance of a fully built CollectiveGather Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveGather { /// Creates a new `CollectiveGather`. @@ -17464,10 +21459,7 @@ impl CollectiveGather { } /// Sets the `communication_hint` attribute. - pub fn communication_hint>( - mut self, - value: ArgType, - ) -> Self { + pub fn communication_hint>(mut self, value: ArgType) -> Self { self.communication_hint = ::std::option::Option::Some(value.into()); self } @@ -17485,57 +21477,95 @@ impl CollectiveGather { } /// Builds the `CollectiveGather` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveGather", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.group_size { - nd.set_attr_int("group_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.group_key { - nd.set_attr_int("group_key", *value)?; - } - if let ::std::option::Option::Some(value) = &self.instance_key { - nd.set_attr_int("instance_key", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.communication_hint { - nd.set_attr_string("communication_hint", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_size { + nd.set_attr_int("group_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_key { + nd.set_attr_int("group_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.instance_key { + nd.set_attr_int("instance_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CollectiveGather` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveGather", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_size { + nd.set_attr_int("group_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_key { + nd.set_attr_int("group_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.instance_key { + nd.set_attr_int("instance_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveGatherInst{op}) + } +} +impl CollectiveGatherInst { + /// Returns the 'data' output of this 'CollectiveGather' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveGatherInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CollectiveGather::new().build(input, scope)`. -pub fn collective_gather>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn collective_gather>(input: O0, scope: &mut crate::Scope) -> crate::Result { CollectiveGather::new().build(input, scope) } + /// Builder for the `CollectiveGatherV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveGatherV2 { @@ -17545,6 +21575,12 @@ pub struct CollectiveGatherV2 { Nordering_token: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveGatherV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveGatherV2Inst { + /// An instance of a fully built CollectiveGatherV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveGatherV2 { /// Creates a new `CollectiveGatherV2`. @@ -17559,10 +21595,7 @@ impl CollectiveGatherV2 { } /// Sets the `communication_hint` attribute. - pub fn communication_hint>( - mut self, - value: ArgType, - ) -> Self { + pub fn communication_hint>(mut self, value: ArgType) -> Self { self.communication_hint = ::std::option::Option::Some(value.into()); self } @@ -17586,40 +21619,10 @@ impl CollectiveGatherV2 { } /// Builds the `CollectiveGatherV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input: O0, - group_size: O1, - group_key: O2, - instance_key: O3, - ordering_token: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - group_size.into(), - group_key.into(), - instance_key.into(), - ordering_token.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - group_size: crate::Output, - group_key: crate::Output, - instance_key: crate::Output, - ordering_token: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, group_size: O1, group_key: O2, instance_key: O3, ordering_token: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), group_size.into(), group_key.into(), instance_key.into(), ordering_token.into(), scope) + } + fn build_impl(&self, input: crate::Output, group_size: crate::Output, group_key: crate::Output, instance_key: crate::Output, ordering_token: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveGatherV2", |nd| { nd.add_input(input); nd.add_input(group_size); @@ -17629,47 +21632,72 @@ impl CollectiveGatherV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.communication_hint { - nd.set_attr_string("communication_hint", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Nordering_token { - nd.set_attr_int("Nordering_token", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nordering_token { + nd.set_attr_int("Nordering_token", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CollectiveGatherV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, group_size: O1, group_key: O2, instance_key: O3, ordering_token: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), group_size.into(), group_key.into(), instance_key.into(), ordering_token.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, group_size: crate::Output, group_key: crate::Output, instance_key: crate::Output, ordering_token: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveGatherV2", |nd| { + nd.add_input(input); + nd.add_input(group_size); + nd.add_input(group_key); + nd.add_input(instance_key); + nd.add_input(ordering_token); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nordering_token { + nd.set_attr_int("Nordering_token", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveGatherV2Inst{op}) + } +} +impl CollectiveGatherV2Inst { + /// Returns the 'data' output of this 'CollectiveGatherV2' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveGatherV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CollectiveGatherV2::new().build(input, group_size, group_key, instance_key, ordering_token, scope)`. -pub fn collective_gather_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input: O0, - group_size: O1, - group_key: O2, - instance_key: O3, - ordering_token: O4, - scope: &mut crate::Scope, -) -> crate::Result { - CollectiveGatherV2::new().build( - input, - group_size, - group_key, - instance_key, - ordering_token, - scope, - ) +pub fn collective_gather_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input: O0, group_size: O1, group_key: O2, instance_key: O3, ordering_token: O4, scope: &mut crate::Scope) -> crate::Result { + CollectiveGatherV2::new().build(input, group_size, group_key, instance_key, ordering_token, scope) } + /// Builder for the `CollectiveInitializeCommunicator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveInitializeCommunicator { @@ -17677,6 +21705,12 @@ pub struct CollectiveInitializeCommunicator { timeout_seconds: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveInitializeCommunicator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveInitializeCommunicatorInst { + /// An instance of a fully built CollectiveInitializeCommunicator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveInitializeCommunicator { /// Creates a new `CollectiveInitializeCommunicator`. @@ -17685,10 +21719,7 @@ impl CollectiveInitializeCommunicator { } /// Sets the `communication_hint` attribute. - pub fn communication_hint>( - mut self, - value: ArgType, - ) -> Self { + pub fn communication_hint>(mut self, value: ArgType) -> Self { self.communication_hint = ::std::option::Option::Some(value.into()); self } @@ -17706,27 +21737,10 @@ impl CollectiveInitializeCommunicator { } /// Builds the `CollectiveInitializeCommunicator` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - group_key: O0, - rank: O1, - group_size: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, group_key: O0, rank: O1, group_size: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(group_key.into(), rank.into(), group_size.into(), scope) } - - fn build_impl( - &self, - group_key: crate::Output, - rank: crate::Output, - group_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, group_key: crate::Output, rank: crate::Output, group_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveInitializeCommunicator", |nd| { nd.add_input(group_key); nd.add_input(rank); @@ -17734,36 +21748,70 @@ impl CollectiveInitializeCommunicator { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.communication_hint { - nd.set_attr_string("communication_hint", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; - } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CollectiveInitializeCommunicator` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, group_key: O0, rank: O1, group_size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(group_key.into(), rank.into(), group_size.into(), scope) + } + fn build_instance_impl(&self, group_key: crate::Output, rank: crate::Output, group_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveInitializeCommunicator", |nd| { + nd.add_input(group_key); + nd.add_input(rank); + nd.add_input(group_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveInitializeCommunicatorInst{op}) + } +} +impl CollectiveInitializeCommunicatorInst { + /// Returns the 'communicator' output of this 'CollectiveInitializeCommunicator' operation. + pub fn communicator(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveInitializeCommunicatorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CollectiveInitializeCommunicator::new().build(group_key, rank, group_size, scope)`. -pub fn collective_initialize_communicator< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - group_key: O0, - rank: O1, - group_size: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn collective_initialize_communicator, O1: ::std::convert::Into, O2: ::std::convert::Into>(group_key: O0, rank: O1, group_size: O2, scope: &mut crate::Scope) -> crate::Result { CollectiveInitializeCommunicator::new().build(group_key, rank, group_size, scope) } + /// Builder for the `CollectivePermute` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectivePermute { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectivePermute' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectivePermuteInst { + /// An instance of a fully built CollectivePermute Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectivePermute { /// Creates a new `CollectivePermute`. @@ -17784,49 +21832,61 @@ impl CollectivePermute { } /// Builds the `CollectivePermute` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - source_target_pairs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, source_target_pairs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), source_target_pairs.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - source_target_pairs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, source_target_pairs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectivePermute", |nd| { nd.add_input(input); nd.add_input(source_target_pairs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CollectivePermute` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, source_target_pairs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), source_target_pairs.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, source_target_pairs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectivePermute", |nd| { + nd.add_input(input); + nd.add_input(source_target_pairs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectivePermuteInst{op}) + } +} +impl CollectivePermuteInst { + /// Returns the 'output' output of this 'CollectivePermute' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectivePermuteInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CollectivePermute::new().build(input, source_target_pairs, scope)`. -pub fn collective_permute< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - source_target_pairs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn collective_permute, O1: ::std::convert::Into>(input: O0, source_target_pairs: O1, scope: &mut crate::Scope) -> crate::Result { CollectivePermute::new().build(input, source_target_pairs, scope) } + /// Builder for the `CollectiveReduce` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveReduce { @@ -17842,6 +21902,12 @@ pub struct CollectiveReduce { timeout_seconds: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveReduce' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveReduceInst { + /// An instance of a fully built CollectiveReduce Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveReduce { /// Creates a new `CollectiveReduce`. @@ -17874,46 +21940,31 @@ impl CollectiveReduce { } /// Sets the `merge_op` attribute. - pub fn merge_op>( - mut self, - value: ArgType, - ) -> Self { + pub fn merge_op>(mut self, value: ArgType) -> Self { self.merge_op = ::std::option::Option::Some(value.into()); self } /// Sets the `final_op` attribute. - pub fn final_op>( - mut self, - value: ArgType, - ) -> Self { + pub fn final_op>(mut self, value: ArgType) -> Self { self.final_op = ::std::option::Option::Some(value.into()); self } /// Sets the `subdiv_offsets` attribute. - pub fn subdiv_offsets>>( - mut self, - value: ArgType, - ) -> Self { + pub fn subdiv_offsets>>(mut self, value: ArgType) -> Self { self.subdiv_offsets = ::std::option::Option::Some(value.into()); self } /// Sets the `wait_for` attribute. - pub fn wait_for>>( - mut self, - value: ArgType, - ) -> Self { + pub fn wait_for>>(mut self, value: ArgType) -> Self { self.wait_for = ::std::option::Option::Some(value.into()); self } /// Sets the `communication_hint` attribute. - pub fn communication_hint>( - mut self, - value: ArgType, - ) -> Self { + pub fn communication_hint>(mut self, value: ArgType) -> Self { self.communication_hint = ::std::option::Option::Some(value.into()); self } @@ -17931,66 +21982,113 @@ impl CollectiveReduce { } /// Builds the `CollectiveReduce` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveReduce", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.group_size { - nd.set_attr_int("group_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.group_key { - nd.set_attr_int("group_key", *value)?; - } - if let ::std::option::Option::Some(value) = &self.instance_key { - nd.set_attr_int("instance_key", *value)?; - } - if let ::std::option::Option::Some(value) = &self.merge_op { - nd.set_attr_string("merge_op", value)?; - } - if let ::std::option::Option::Some(value) = &self.final_op { - nd.set_attr_string("final_op", value)?; - } - if let ::std::option::Option::Some(value) = &self.subdiv_offsets { - nd.set_attr_int_list("subdiv_offsets", value)?; - } - if let ::std::option::Option::Some(value) = &self.wait_for { - nd.set_attr_int_list("wait_for", value)?; - } - if let ::std::option::Option::Some(value) = &self.communication_hint { - nd.set_attr_string("communication_hint", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_size { + nd.set_attr_int("group_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_key { + nd.set_attr_int("group_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.instance_key { + nd.set_attr_int("instance_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.merge_op { + nd.set_attr_string("merge_op", value)?; + } + if let ::std::option::Option::Some(value) = &self.final_op { + nd.set_attr_string("final_op", value)?; + } + if let ::std::option::Option::Some(value) = &self.subdiv_offsets { + nd.set_attr_int_list("subdiv_offsets", value)?; + } + if let ::std::option::Option::Some(value) = &self.wait_for { + nd.set_attr_int_list("wait_for", value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CollectiveReduce` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveReduce", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_size { + nd.set_attr_int("group_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.group_key { + nd.set_attr_int("group_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.instance_key { + nd.set_attr_int("instance_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.merge_op { + nd.set_attr_string("merge_op", value)?; + } + if let ::std::option::Option::Some(value) = &self.final_op { + nd.set_attr_string("final_op", value)?; + } + if let ::std::option::Option::Some(value) = &self.subdiv_offsets { + nd.set_attr_int_list("subdiv_offsets", value)?; + } + if let ::std::option::Option::Some(value) = &self.wait_for { + nd.set_attr_int_list("wait_for", value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveReduceInst{op}) + } +} +impl CollectiveReduceInst { + /// Returns the 'data' output of this 'CollectiveReduce' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveReduceInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CollectiveReduce::new().build(input, scope)`. -pub fn collective_reduce>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn collective_reduce>(input: O0, scope: &mut crate::Scope) -> crate::Result { CollectiveReduce::new().build(input, scope) } + /// Builder for the `CollectiveReduceV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveReduceV2 { @@ -18003,6 +22101,12 @@ pub struct CollectiveReduceV2 { max_subdivs_per_device: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveReduceV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveReduceV2Inst { + /// An instance of a fully built CollectiveReduceV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveReduceV2 { /// Creates a new `CollectiveReduceV2`. @@ -18017,28 +22121,19 @@ impl CollectiveReduceV2 { } /// Sets the `merge_op` attribute. - pub fn merge_op>( - mut self, - value: ArgType, - ) -> Self { + pub fn merge_op>(mut self, value: ArgType) -> Self { self.merge_op = ::std::option::Option::Some(value.into()); self } /// Sets the `final_op` attribute. - pub fn final_op>( - mut self, - value: ArgType, - ) -> Self { + pub fn final_op>(mut self, value: ArgType) -> Self { self.final_op = ::std::option::Option::Some(value.into()); self } /// Sets the `communication_hint` attribute. - pub fn communication_hint>( - mut self, - value: ArgType, - ) -> Self { + pub fn communication_hint>(mut self, value: ArgType) -> Self { self.communication_hint = ::std::option::Option::Some(value.into()); self } @@ -18056,10 +22151,7 @@ impl CollectiveReduceV2 { } /// Sets the `max_subdivs_per_device` attribute. - pub fn max_subdivs_per_device>( - mut self, - value: ArgType, - ) -> Self { + pub fn max_subdivs_per_device>(mut self, value: ArgType) -> Self { self.max_subdivs_per_device = ::std::option::Option::Some(value.into()); self } @@ -18071,40 +22163,10 @@ impl CollectiveReduceV2 { } /// Builds the `CollectiveReduceV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input: O0, - group_size: O1, - group_key: O2, - instance_key: O3, - ordering_token: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - group_size.into(), - group_key.into(), - instance_key.into(), - ordering_token.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - group_size: crate::Output, - group_key: crate::Output, - instance_key: crate::Output, - ordering_token: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, group_size: O1, group_key: O2, instance_key: O3, ordering_token: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), group_size.into(), group_key.into(), instance_key.into(), ordering_token.into(), scope) + } + fn build_impl(&self, input: crate::Output, group_size: crate::Output, group_key: crate::Output, instance_key: crate::Output, ordering_token: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveReduceV2", |nd| { nd.add_input(input); nd.add_input(group_size); @@ -18114,56 +22176,90 @@ impl CollectiveReduceV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.merge_op { - nd.set_attr_string("merge_op", value)?; - } - if let ::std::option::Option::Some(value) = &self.final_op { - nd.set_attr_string("final_op", value)?; - } - if let ::std::option::Option::Some(value) = &self.communication_hint { - nd.set_attr_string("communication_hint", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Nordering_token { - nd.set_attr_int("Nordering_token", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_subdivs_per_device { - nd.set_attr_int("max_subdivs_per_device", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.merge_op { + nd.set_attr_string("merge_op", value)?; + } + if let ::std::option::Option::Some(value) = &self.final_op { + nd.set_attr_string("final_op", value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nordering_token { + nd.set_attr_int("Nordering_token", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_subdivs_per_device { + nd.set_attr_int("max_subdivs_per_device", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CollectiveReduceV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, group_size: O1, group_key: O2, instance_key: O3, ordering_token: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), group_size.into(), group_key.into(), instance_key.into(), ordering_token.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, group_size: crate::Output, group_key: crate::Output, instance_key: crate::Output, ordering_token: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveReduceV2", |nd| { + nd.add_input(input); + nd.add_input(group_size); + nd.add_input(group_key); + nd.add_input(instance_key); + nd.add_input(ordering_token); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.merge_op { + nd.set_attr_string("merge_op", value)?; + } + if let ::std::option::Option::Some(value) = &self.final_op { + nd.set_attr_string("final_op", value)?; + } + if let ::std::option::Option::Some(value) = &self.communication_hint { + nd.set_attr_string("communication_hint", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nordering_token { + nd.set_attr_int("Nordering_token", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_subdivs_per_device { + nd.set_attr_int("max_subdivs_per_device", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveReduceV2Inst{op}) + } +} +impl CollectiveReduceV2Inst { + /// Returns the 'data' output of this 'CollectiveReduceV2' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveReduceV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CollectiveReduceV2::new().build(input, group_size, group_key, instance_key, ordering_token, scope)`. -pub fn collective_reduce_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input: O0, - group_size: O1, - group_key: O2, - instance_key: O3, - ordering_token: O4, - scope: &mut crate::Scope, -) -> crate::Result { - CollectiveReduceV2::new().build( - input, - group_size, - group_key, - instance_key, - ordering_token, - scope, - ) +pub fn collective_reduce_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input: O0, group_size: O1, group_key: O2, instance_key: O3, ordering_token: O4, scope: &mut crate::Scope) -> crate::Result { + CollectiveReduceV2::new().build(input, group_size, group_key, instance_key, ordering_token, scope) } + /// Builder for the `CollectiveReduceV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CollectiveReduceV3 { @@ -18172,6 +22268,12 @@ pub struct CollectiveReduceV3 { timeout_seconds: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CollectiveReduceV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CollectiveReduceV3Inst { + /// An instance of a fully built CollectiveReduceV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CollectiveReduceV3 { /// Creates a new `CollectiveReduceV3`. @@ -18186,10 +22288,7 @@ impl CollectiveReduceV3 { } /// Sets the `reduction` attribute. - pub fn reduction>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduction>(mut self, value: ArgType) -> Self { self.reduction = ::std::option::Option::Some(value.into()); self } @@ -18207,32 +22306,10 @@ impl CollectiveReduceV3 { } /// Builds the `CollectiveReduceV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - communicator: O1, - group_assignment: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - communicator.into(), - group_assignment.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - communicator: crate::Output, - group_assignment: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, communicator: O1, group_assignment: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), communicator.into(), group_assignment.into(), scope) + } + fn build_impl(&self, input: crate::Output, communicator: crate::Output, group_assignment: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CollectiveReduceV3", |nd| { nd.add_input(input); nd.add_input(communicator); @@ -18240,33 +22317,64 @@ impl CollectiveReduceV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.reduction { - nd.set_attr_string("reduction", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_seconds { - nd.set_attr_float("timeout_seconds", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction { + nd.set_attr_string("reduction", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CollectiveReduceV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, communicator: O1, group_assignment: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), communicator.into(), group_assignment.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, communicator: crate::Output, group_assignment: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CollectiveReduceV3", |nd| { + nd.add_input(input); + nd.add_input(communicator); + nd.add_input(group_assignment); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction { + nd.set_attr_string("reduction", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_seconds { + nd.set_attr_float("timeout_seconds", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CollectiveReduceV3Inst{op}) + } +} +impl CollectiveReduceV3Inst { + /// Returns the 'data' output of this 'CollectiveReduceV3' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CollectiveReduceV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CollectiveReduceV3::new().build(input, communicator, group_assignment, scope)`. -pub fn collective_reduce_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - communicator: O1, - group_assignment: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn collective_reduce_v3, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, communicator: O1, group_assignment: O2, scope: &mut crate::Scope) -> crate::Result { CollectiveReduceV3::new().build(input, communicator, group_assignment, scope) } + /// Builder for the `CombinedNonMaxSuppression` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CombinedNonMaxSuppression { @@ -18274,6 +22382,12 @@ pub struct CombinedNonMaxSuppression { clip_boxes: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CombinedNonMaxSuppression' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CombinedNonMaxSuppressionInst { + /// An instance of a fully built CombinedNonMaxSuppression Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CombinedNonMaxSuppression { /// Creates a new `CombinedNonMaxSuppression`. @@ -18300,44 +22414,10 @@ impl CombinedNonMaxSuppression { } /// Builds the `CombinedNonMaxSuppression` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - boxes: O0, - scores: O1, - max_output_size_per_class: O2, - max_total_size: O3, - iou_threshold: O4, - score_threshold: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - boxes.into(), - scores.into(), - max_output_size_per_class.into(), - max_total_size.into(), - iou_threshold.into(), - score_threshold.into(), - scope, - ) - } - - fn build_impl( - &self, - boxes: crate::Output, - scores: crate::Output, - max_output_size_per_class: crate::Output, - max_total_size: crate::Output, - iou_threshold: crate::Output, - score_threshold: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size_per_class: O2, max_total_size: O3, iou_threshold: O4, score_threshold: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(boxes.into(), scores.into(), max_output_size_per_class.into(), max_total_size.into(), iou_threshold.into(), score_threshold.into(), scope) + } + fn build_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size_per_class: crate::Output, max_total_size: crate::Output, iou_threshold: crate::Output, score_threshold: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CombinedNonMaxSuppression", |nd| { nd.add_input(boxes); nd.add_input(scores); @@ -18348,44 +22428,82 @@ impl CombinedNonMaxSuppression { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.pad_per_class { - nd.set_attr_bool("pad_per_class", *value)?; - } - if let ::std::option::Option::Some(value) = &self.clip_boxes { - nd.set_attr_bool("clip_boxes", *value)?; - } + if let ::std::option::Option::Some(value) = &self.pad_per_class { + nd.set_attr_bool("pad_per_class", *value)?; + } + if let ::std::option::Option::Some(value) = &self.clip_boxes { + nd.set_attr_bool("clip_boxes", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CombinedNonMaxSuppression` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size_per_class: O2, max_total_size: O3, iou_threshold: O4, score_threshold: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(boxes.into(), scores.into(), max_output_size_per_class.into(), max_total_size.into(), iou_threshold.into(), score_threshold.into(), scope) + } + fn build_instance_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size_per_class: crate::Output, max_total_size: crate::Output, iou_threshold: crate::Output, score_threshold: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CombinedNonMaxSuppression", |nd| { + nd.add_input(boxes); + nd.add_input(scores); + nd.add_input(max_output_size_per_class); + nd.add_input(max_total_size); + nd.add_input(iou_threshold); + nd.add_input(score_threshold); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.pad_per_class { + nd.set_attr_bool("pad_per_class", *value)?; + } + if let ::std::option::Option::Some(value) = &self.clip_boxes { + nd.set_attr_bool("clip_boxes", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CombinedNonMaxSuppressionInst{op}) + } +} +impl CombinedNonMaxSuppressionInst { + /// Returns the 'nmsed_boxes' output of this 'CombinedNonMaxSuppression' operation. + pub fn nmsed_boxes(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'nmsed_scores' output of this 'CombinedNonMaxSuppression' operation. + pub fn nmsed_scores(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'nmsed_classes' output of this 'CombinedNonMaxSuppression' operation. + pub fn nmsed_classes(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'valid_detections' output of this 'CombinedNonMaxSuppression' operation. + pub fn valid_detections(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for CombinedNonMaxSuppressionInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CombinedNonMaxSuppression::new().build(boxes, scores, max_output_size_per_class, max_total_size, iou_threshold, score_threshold, scope)`. -pub fn combined_non_max_suppression< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - boxes: O0, - scores: O1, - max_output_size_per_class: O2, - max_total_size: O3, - iou_threshold: O4, - score_threshold: O5, - scope: &mut crate::Scope, -) -> crate::Result { - CombinedNonMaxSuppression::new().build( - boxes, - scores, - max_output_size_per_class, - max_total_size, - iou_threshold, - score_threshold, - scope, - ) +pub fn combined_non_max_suppression, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(boxes: O0, scores: O1, max_output_size_per_class: O2, max_total_size: O3, iou_threshold: O4, score_threshold: O5, scope: &mut crate::Scope) -> crate::Result { + CombinedNonMaxSuppression::new().build(boxes, scores, max_output_size_per_class, max_total_size, iou_threshold, score_threshold, scope) } + /// Builder for the `Complex` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Complex { @@ -18393,6 +22511,12 @@ pub struct Complex { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Complex' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ComplexInst { + /// An instance of a fully built Complex Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Complex { /// Creates a new `Complex`. @@ -18419,49 +22543,67 @@ impl Complex { } /// Builds the `Complex` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - real: O0, - imag: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, real: O0, imag: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(real.into(), imag.into(), scope) } - - fn build_impl( - &self, - real: crate::Output, - imag: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, real: crate::Output, imag: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Complex", |nd| { nd.add_input(real); nd.add_input(imag); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Complex` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, real: O0, imag: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(real.into(), imag.into(), scope) + } + fn build_instance_impl(&self, real: crate::Output, imag: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Complex", |nd| { + nd.add_input(real); + nd.add_input(imag); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ComplexInst{op}) + } +} +impl ComplexInst { + /// Returns the 'out' output of this 'Complex' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ComplexInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Complex::new().build(real, imag, scope)`. -pub fn complex, O1: ::std::convert::Into>( - real: O0, - imag: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn complex, O1: ::std::convert::Into>(real: O0, imag: O1, scope: &mut crate::Scope) -> crate::Result { Complex::new().build(real, imag, scope) } + /// Builder for the `ComplexAbs` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ComplexAbs { @@ -18469,6 +22611,12 @@ pub struct ComplexAbs { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ComplexAbs' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ComplexAbsInst { + /// An instance of a fully built ComplexAbs Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ComplexAbs { /// Creates a new `ComplexAbs`. @@ -18495,42 +22643,65 @@ impl ComplexAbs { } /// Builds the `ComplexAbs` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ComplexAbs", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ComplexAbs` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ComplexAbs", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ComplexAbsInst{op}) + } +} +impl ComplexAbsInst { + /// Returns the 'y' output of this 'ComplexAbs' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ComplexAbsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ComplexAbs::new().build(x, scope)`. -pub fn complex_abs>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn complex_abs>(x: O0, scope: &mut crate::Scope) -> crate::Result { ComplexAbs::new().build(x, scope) } + /// Builder for the `CompositeTensorVariantFromComponents` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CompositeTensorVariantFromComponents { @@ -18538,6 +22709,12 @@ pub struct CompositeTensorVariantFromComponents { Tcomponents: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CompositeTensorVariantFromComponents' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CompositeTensorVariantFromComponentsInst { + /// An instance of a fully built CompositeTensorVariantFromComponents Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CompositeTensorVariantFromComponents { /// Creates a new `CompositeTensorVariantFromComponents`. @@ -18546,19 +22723,13 @@ impl CompositeTensorVariantFromComponents { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } /// Sets the `Tcomponents` attribute. - pub fn Tcomponents>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomponents>>(mut self, value: ArgType) -> Self { self.Tcomponents = ::std::option::Option::Some(value.into()); self } @@ -18570,42 +22741,65 @@ impl CompositeTensorVariantFromComponents { } /// Builds the `CompositeTensorVariantFromComponents` operation. - pub fn build>( - &self, - components: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, components: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(components.into(), scope) } - - fn build_impl( - &self, - components: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CompositeTensorVariantFromComponents", |nd| { nd.add_input(components); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcomponents { - nd.set_attr_type_list("Tcomponents", value)?; - } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CompositeTensorVariantFromComponents` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, components: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(components.into(), scope) + } + fn build_instance_impl(&self, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CompositeTensorVariantFromComponents", |nd| { + nd.add_input(components); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CompositeTensorVariantFromComponentsInst{op}) + } +} +impl CompositeTensorVariantFromComponentsInst { + /// Returns the 'encoded' output of this 'CompositeTensorVariantFromComponents' operation. + pub fn encoded(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CompositeTensorVariantFromComponentsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CompositeTensorVariantFromComponents::new().build(components, scope)`. -pub fn composite_tensor_variant_from_components>( - components: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn composite_tensor_variant_from_components>(components: O0, scope: &mut crate::Scope) -> crate::Result { CompositeTensorVariantFromComponents::new().build(components, scope) } + /// Builder for the `CompositeTensorVariantToComponents` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CompositeTensorVariantToComponents { @@ -18613,6 +22807,12 @@ pub struct CompositeTensorVariantToComponents { Tcomponents: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CompositeTensorVariantToComponents' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CompositeTensorVariantToComponentsInst { + /// An instance of a fully built CompositeTensorVariantToComponents Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CompositeTensorVariantToComponents { /// Creates a new `CompositeTensorVariantToComponents`. @@ -18621,19 +22821,13 @@ impl CompositeTensorVariantToComponents { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } /// Sets the `Tcomponents` attribute. - pub fn Tcomponents>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomponents>>(mut self, value: ArgType) -> Self { self.Tcomponents = ::std::option::Option::Some(value.into()); self } @@ -18645,48 +22839,77 @@ impl CompositeTensorVariantToComponents { } /// Builds the `CompositeTensorVariantToComponents` operation. - pub fn build>( - &self, - encoded: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, encoded: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(encoded.into(), scope) } - - fn build_impl( - &self, - encoded: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, encoded: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CompositeTensorVariantToComponents", |nd| { nd.add_input(encoded); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcomponents { - nd.set_attr_type_list("Tcomponents", value)?; - } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CompositeTensorVariantToComponents` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, encoded: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(encoded.into(), scope) + } + fn build_instance_impl(&self, encoded: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CompositeTensorVariantToComponents", |nd| { + nd.add_input(encoded); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CompositeTensorVariantToComponentsInst{op}) + } +} +impl CompositeTensorVariantToComponentsInst { + /// Returns the 'components' output of this 'CompositeTensorVariantToComponents' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CompositeTensorVariantToComponentsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CompositeTensorVariantToComponents::new().build(encoded, scope)`. -pub fn composite_tensor_variant_to_components>( - encoded: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn composite_tensor_variant_to_components>(encoded: O0, scope: &mut crate::Scope) -> crate::Result { CompositeTensorVariantToComponents::new().build(encoded, scope) } + /// Builder for the `CompressElement` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CompressElement { input_types: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CompressElement' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CompressElementInst { + /// An instance of a fully built CompressElement Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CompressElement { /// Creates a new `CompressElement`. @@ -18695,10 +22918,7 @@ impl CompressElement { } /// Sets the `input_types` attribute. - pub fn input_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_types>>(mut self, value: ArgType) -> Self { self.input_types = ::std::option::Option::Some(value.into()); self } @@ -18710,39 +22930,59 @@ impl CompressElement { } /// Builds the `CompressElement` operation. - pub fn build>( - &self, - components: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, components: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(components.into(), scope) } - - fn build_impl( - &self, - components: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CompressElement", |nd| { nd.add_input(components); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.input_types { - nd.set_attr_type_list("input_types", value)?; - } + if let ::std::option::Option::Some(value) = &self.input_types { + nd.set_attr_type_list("input_types", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CompressElement` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, components: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(components.into(), scope) + } + fn build_instance_impl(&self, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CompressElement", |nd| { + nd.add_input(components); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.input_types { + nd.set_attr_type_list("input_types", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CompressElementInst{op}) + } +} +impl CompressElementInst { + /// Returns the 'compressed' output of this 'CompressElement' operation. + pub fn compressed(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CompressElementInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CompressElement::new().build(components, scope)`. -pub fn compress_element>( - components: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn compress_element>(components: O0, scope: &mut crate::Scope) -> crate::Result { CompressElement::new().build(components, scope) } + /// Builder for the `ComputeAccidentalHits` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ComputeAccidentalHits { @@ -18751,6 +22991,12 @@ pub struct ComputeAccidentalHits { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ComputeAccidentalHits' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ComputeAccidentalHitsInst { + /// An instance of a fully built ComputeAccidentalHits Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ComputeAccidentalHits { /// Creates a new `ComputeAccidentalHits`. @@ -18783,60 +23029,98 @@ impl ComputeAccidentalHits { } /// Builds the `ComputeAccidentalHits` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - true_classes: O0, - sampled_candidates: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, true_classes: O0, sampled_candidates: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(true_classes.into(), sampled_candidates.into(), scope) } - - fn build_impl( - &self, - true_classes: crate::Output, - sampled_candidates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, true_classes: crate::Output, sampled_candidates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ComputeAccidentalHits", |nd| { nd.add_input(true_classes); nd.add_input(sampled_candidates); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_true { - nd.set_attr_int("num_true", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ComputeAccidentalHits` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, true_classes: O0, sampled_candidates: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(true_classes.into(), sampled_candidates.into(), scope) + } + fn build_instance_impl(&self, true_classes: crate::Output, sampled_candidates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ComputeAccidentalHits", |nd| { + nd.add_input(true_classes); + nd.add_input(sampled_candidates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ComputeAccidentalHitsInst{op}) + } +} +impl ComputeAccidentalHitsInst { + /// Returns the 'indices' output of this 'ComputeAccidentalHits' operation. + pub fn indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'ids' output of this 'ComputeAccidentalHits' operation. + pub fn ids(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'weights' output of this 'ComputeAccidentalHits' operation. + pub fn weights(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for ComputeAccidentalHitsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ComputeAccidentalHits::new().build(true_classes, sampled_candidates, scope)`. -pub fn compute_accidental_hits< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - true_classes: O0, - sampled_candidates: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn compute_accidental_hits, O1: ::std::convert::Into>(true_classes: O0, sampled_candidates: O1, scope: &mut crate::Scope) -> crate::Result { ComputeAccidentalHits::new().build(true_classes, sampled_candidates, scope) } + /// Builder for the `ComputeBatchSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ComputeBatchSize { control_inputs: ::std::vec::Vec, } +/// An instance of 'ComputeBatchSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ComputeBatchSizeInst { + /// An instance of a fully built ComputeBatchSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ComputeBatchSize { /// Creates a new `ComputeBatchSize`. @@ -18851,19 +23135,10 @@ impl ComputeBatchSize { } /// Builds the `ComputeBatchSize` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ComputeBatchSize", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { @@ -18872,15 +23147,41 @@ impl ComputeBatchSize { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ComputeBatchSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ComputeBatchSize", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ComputeBatchSizeInst{op}) + } +} +impl ComputeBatchSizeInst { + /// Returns the 'batch_size' output of this 'ComputeBatchSize' operation. + pub fn batch_size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ComputeBatchSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ComputeBatchSize::new().build(input_dataset, scope)`. -pub fn compute_batch_size>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn compute_batch_size>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { ComputeBatchSize::new().build(input_dataset, scope) } + /// Builder for the `Concat` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Concat { @@ -18888,6 +23189,12 @@ pub struct Concat { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Concat' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConcatInst { + /// An instance of a fully built Concat Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Concat { /// Creates a new `Concat`. @@ -18914,55 +23221,79 @@ impl Concat { } /// Builds the `Concat` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - concat_dim: O0, - values: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, concat_dim: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(concat_dim.into(), values.into(), scope) } - - fn build_impl( - &self, - concat_dim: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, concat_dim: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Concat", |nd| { nd.add_input(concat_dim); nd.add_input(values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Concat` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, concat_dim: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(concat_dim.into(), values.into(), scope) + } + fn build_instance_impl(&self, concat_dim: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Concat", |nd| { + nd.add_input(concat_dim); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ConcatInst{op}) + } +} +impl ConcatInst { + /// Returns the 'output' output of this 'Concat' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ConcatInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Concat::new().build(concat_dim, values, scope)`. -pub fn concat, O1: ::std::convert::Into>( - concat_dim: O0, - values: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn concat, O1: ::std::convert::Into>(concat_dim: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { Concat::new().build(concat_dim, values, scope) } + /// Builder for the `ConcatOffset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ConcatOffset { N: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ConcatOffset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConcatOffsetInst { + /// An instance of a fully built ConcatOffset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ConcatOffset { /// Creates a new `ConcatOffset`. @@ -18983,49 +23314,66 @@ impl ConcatOffset { } /// Builds the `ConcatOffset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - concat_dim: O0, - shape: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, concat_dim: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(concat_dim.into(), shape.into(), scope) } - - fn build_impl( - &self, - concat_dim: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, concat_dim: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ConcatOffset", |nd| { nd.add_input(concat_dim); nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ConcatOffset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, concat_dim: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(concat_dim.into(), shape.into(), scope) + } + fn build_instance_impl(&self, concat_dim: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ConcatOffset", |nd| { + nd.add_input(concat_dim); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ConcatOffsetInst{op}) + } +} +impl ConcatOffsetInst { + /// Returns a Vector of Outputs for 'offset' output of this ConcatOffset operation. + pub fn offset(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("N")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for ConcatOffsetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ConcatOffset::new().build(concat_dim, shape, scope)`. -pub fn concat_offset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - concat_dim: O0, - shape: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn concat_offset, O1: ::std::convert::Into>(concat_dim: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { ConcatOffset::new().build(concat_dim, shape, scope) } + /// Builder for the `ConcatV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ConcatV2 { @@ -19034,6 +23382,12 @@ pub struct ConcatV2 { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ConcatV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConcatV2Inst { + /// An instance of a fully built ConcatV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ConcatV2 { /// Creates a new `ConcatV2`. @@ -19066,55 +23420,73 @@ impl ConcatV2 { } /// Builds the `ConcatV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - values: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, values: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(values.into(), axis.into(), scope) } - - fn build_impl( - &self, - values: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, values: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ConcatV2", |nd| { nd.add_input(values); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ConcatV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, values: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(values.into(), axis.into(), scope) + } + fn build_instance_impl(&self, values: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ConcatV2", |nd| { + nd.add_input(values); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ConcatV2Inst{op}) + } +} +impl ConcatV2Inst { + /// Returns the 'output' output of this 'ConcatV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ConcatV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ConcatV2::new().build(values, axis, scope)`. -pub fn concat_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - values: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn concat_v2, O1: ::std::convert::Into>(values: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { ConcatV2::new().build(values, axis, scope) } + /// Builder for the `ConcatenateDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ConcatenateDataset { @@ -19123,6 +23495,12 @@ pub struct ConcatenateDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ConcatenateDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConcatenateDatasetInst { + /// An instance of a fully built ConcatenateDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ConcatenateDataset { /// Creates a new `ConcatenateDataset`. @@ -19131,28 +23509,19 @@ impl ConcatenateDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -19164,55 +23533,73 @@ impl ConcatenateDataset { } /// Builds the `ConcatenateDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - another_dataset: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, another_dataset: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), another_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - another_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, another_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ConcatenateDataset", |nd| { nd.add_input(input_dataset); nd.add_input(another_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ConcatenateDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, another_dataset: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), another_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, another_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ConcatenateDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(another_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ConcatenateDatasetInst{op}) + } +} +impl ConcatenateDatasetInst { + /// Returns the 'handle' output of this 'ConcatenateDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ConcatenateDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ConcatenateDataset::new().build(input_dataset, another_dataset, scope)`. -pub fn concatenate_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - another_dataset: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn concatenate_dataset, O1: ::std::convert::Into>(input_dataset: O0, another_dataset: O1, scope: &mut crate::Scope) -> crate::Result { ConcatenateDataset::new().build(input_dataset, another_dataset, scope) } + /// Builder for the `ConditionalAccumulator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ConditionalAccumulator { @@ -19223,6 +23610,12 @@ pub struct ConditionalAccumulator { reduction_type: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ConditionalAccumulator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConditionalAccumulatorInst { + /// An instance of a fully built ConditionalAccumulator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ConditionalAccumulator { /// Creates a new `ConditionalAccumulator`. @@ -19243,28 +23636,19 @@ impl ConditionalAccumulator { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `reduction_type` attribute. - pub fn reduction_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduction_type>(mut self, value: ArgType) -> Self { self.reduction_type = ::std::option::Option::Some(value.into()); self } @@ -19276,39 +23660,81 @@ impl ConditionalAccumulator { } /// Builds the `ConditionalAccumulator` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ConditionalAccumulator", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.reduction_type { - nd.set_attr_string("reduction_type", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction_type { + nd.set_attr_string("reduction_type", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ConditionalAccumulator` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ConditionalAccumulator", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction_type { + nd.set_attr_string("reduction_type", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ConditionalAccumulatorInst{op}) + } +} +impl ConditionalAccumulatorInst { + /// Returns the 'handle' output of this 'ConditionalAccumulator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ConditionalAccumulatorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ConditionalAccumulator::new().build(scope)`. -pub fn conditional_accumulator(scope: &mut crate::Scope) -> crate::Result { +pub fn conditional_accumulator<>(scope: &mut crate::Scope) -> crate::Result { ConditionalAccumulator::new().build(scope) } + /// Builder for the `ConfigureDistributedTPU` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ConfigureDistributedTPU { @@ -19320,6 +23746,12 @@ pub struct ConfigureDistributedTPU { tpu_cancellation_closes_chips: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ConfigureDistributedTPU' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConfigureDistributedTPUInst { + /// An instance of a fully built ConfigureDistributedTPU Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ConfigureDistributedTPU { /// Creates a new `ConfigureDistributedTPU`. @@ -19328,19 +23760,13 @@ impl ConfigureDistributedTPU { } /// Sets the `embedding_config` attribute. - pub fn embedding_config>( - mut self, - value: ArgType, - ) -> Self { + pub fn embedding_config>(mut self, value: ArgType) -> Self { self.embedding_config = ::std::option::Option::Some(value.into()); self } /// Sets the `tpu_embedding_config` attribute. - pub fn tpu_embedding_config>( - mut self, - value: ArgType, - ) -> Self { + pub fn tpu_embedding_config>(mut self, value: ArgType) -> Self { self.tpu_embedding_config = ::std::option::Option::Some(value.into()); self } @@ -19352,28 +23778,19 @@ impl ConfigureDistributedTPU { } /// Sets the `enable_whole_mesh_compilations` attribute. - pub fn enable_whole_mesh_compilations>( - mut self, - value: ArgType, - ) -> Self { + pub fn enable_whole_mesh_compilations>(mut self, value: ArgType) -> Self { self.enable_whole_mesh_compilations = ::std::option::Option::Some(value.into()); self } /// Sets the `compilation_failure_closes_chips` attribute. - pub fn compilation_failure_closes_chips>( - mut self, - value: ArgType, - ) -> Self { + pub fn compilation_failure_closes_chips>(mut self, value: ArgType) -> Self { self.compilation_failure_closes_chips = ::std::option::Option::Some(value.into()); self } /// Sets the `tpu_cancellation_closes_chips` attribute. - pub fn tpu_cancellation_closes_chips>( - mut self, - value: ArgType, - ) -> Self { + pub fn tpu_cancellation_closes_chips>(mut self, value: ArgType) -> Self { self.tpu_cancellation_closes_chips = ::std::option::Option::Some(value.into()); self } @@ -19385,48 +23802,99 @@ impl ConfigureDistributedTPU { } /// Builds the `ConfigureDistributedTPU` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ConfigureDistributedTPU", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.embedding_config { - nd.set_attr_string("embedding_config", value)?; - } - if let ::std::option::Option::Some(value) = &self.tpu_embedding_config { - nd.set_attr_string("tpu_embedding_config", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_global_init { - nd.set_attr_bool("is_global_init", *value)?; - } - if let ::std::option::Option::Some(value) = &self.enable_whole_mesh_compilations { - nd.set_attr_bool("enable_whole_mesh_compilations", *value)?; - } - if let ::std::option::Option::Some(value) = &self.compilation_failure_closes_chips { - nd.set_attr_bool("compilation_failure_closes_chips", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tpu_cancellation_closes_chips { - nd.set_attr_int("tpu_cancellation_closes_chips", *value)?; - } + if let ::std::option::Option::Some(value) = &self.embedding_config { + nd.set_attr_string("embedding_config", value)?; + } + if let ::std::option::Option::Some(value) = &self.tpu_embedding_config { + nd.set_attr_string("tpu_embedding_config", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_global_init { + nd.set_attr_bool("is_global_init", *value)?; + } + if let ::std::option::Option::Some(value) = &self.enable_whole_mesh_compilations { + nd.set_attr_bool("enable_whole_mesh_compilations", *value)?; + } + if let ::std::option::Option::Some(value) = &self.compilation_failure_closes_chips { + nd.set_attr_bool("compilation_failure_closes_chips", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tpu_cancellation_closes_chips { + nd.set_attr_int("tpu_cancellation_closes_chips", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ConfigureDistributedTPU` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ConfigureDistributedTPU", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.embedding_config { + nd.set_attr_string("embedding_config", value)?; + } + if let ::std::option::Option::Some(value) = &self.tpu_embedding_config { + nd.set_attr_string("tpu_embedding_config", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_global_init { + nd.set_attr_bool("is_global_init", *value)?; + } + if let ::std::option::Option::Some(value) = &self.enable_whole_mesh_compilations { + nd.set_attr_bool("enable_whole_mesh_compilations", *value)?; + } + if let ::std::option::Option::Some(value) = &self.compilation_failure_closes_chips { + nd.set_attr_bool("compilation_failure_closes_chips", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tpu_cancellation_closes_chips { + nd.set_attr_int("tpu_cancellation_closes_chips", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ConfigureDistributedTPUInst{op}) + } +} +impl ConfigureDistributedTPUInst { + /// Returns the 'topology' output of this 'ConfigureDistributedTPU' operation. + pub fn topology(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ConfigureDistributedTPUInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ConfigureDistributedTPU::new().build(scope)`. -pub fn configure_distributed_tpu(scope: &mut crate::Scope) -> crate::Result { +pub fn configure_distributed_tpu<>(scope: &mut crate::Scope) -> crate::Result { ConfigureDistributedTPU::new().build(scope) } + /// Builder for the `ConfigureTPUEmbedding` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ConfigureTPUEmbedding { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ConfigureTPUEmbedding' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConfigureTPUEmbeddingInst { + /// An instance of a fully built ConfigureTPUEmbedding Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ConfigureTPUEmbedding { /// Creates a new `ConfigureTPUEmbedding`. @@ -19435,10 +23903,7 @@ impl ConfigureTPUEmbedding { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -19450,33 +23915,62 @@ impl ConfigureTPUEmbedding { } /// Builds the `ConfigureTPUEmbedding` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ConfigureTPUEmbedding", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ConfigureTPUEmbedding` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ConfigureTPUEmbedding", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ConfigureTPUEmbeddingInst{op}) + } +} +impl ConfigureTPUEmbeddingInst { +} +impl Into for ConfigureTPUEmbeddingInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ConfigureTPUEmbedding::new().build(scope)`. -pub fn configure_tpuembedding(scope: &mut crate::Scope) -> crate::Result { +pub fn configure_tpuembedding<>(scope: &mut crate::Scope) -> crate::Result { ConfigureTPUEmbedding::new().build(scope) } + /// Builder for the `Conj` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Conj { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Conj' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConjInst { + /// An instance of a fully built Conj Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Conj { /// Creates a new `Conj`. @@ -19497,39 +23991,59 @@ impl Conj { } /// Builds the `Conj` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Conj", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Conj` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Conj", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ConjInst{op}) + } +} +impl ConjInst { + /// Returns the 'output' output of this 'Conj' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ConjInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Conj::new().build(input, scope)`. -pub fn conj>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn conj>(input: O0, scope: &mut crate::Scope) -> crate::Result { Conj::new().build(input, scope) } + /// Builder for the `ConjugateTranspose` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ConjugateTranspose { @@ -19537,6 +24051,12 @@ pub struct ConjugateTranspose { Tperm: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ConjugateTranspose' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConjugateTransposeInst { + /// An instance of a fully built ConjugateTranspose Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ConjugateTranspose { /// Creates a new `ConjugateTranspose`. @@ -19563,52 +24083,67 @@ impl ConjugateTranspose { } /// Builds the `ConjugateTranspose` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - perm: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, perm: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), perm.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - perm: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, perm: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ConjugateTranspose", |nd| { nd.add_input(x); nd.add_input(perm); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tperm { - nd.set_attr_type("Tperm", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tperm { + nd.set_attr_type("Tperm", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ConjugateTranspose` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, perm: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), perm.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, perm: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ConjugateTranspose", |nd| { + nd.add_input(x); + nd.add_input(perm); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tperm { + nd.set_attr_type("Tperm", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ConjugateTransposeInst{op}) + } +} +impl ConjugateTransposeInst { + /// Returns the 'y' output of this 'ConjugateTranspose' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ConjugateTransposeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ConjugateTranspose::new().build(x, perm, scope)`. -pub fn conjugate_transpose< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - perm: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn conjugate_transpose, O1: ::std::convert::Into>(x: O0, perm: O1, scope: &mut crate::Scope) -> crate::Result { ConjugateTranspose::new().build(x, perm, scope) } + /// Builder for the `Const` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Const { @@ -19616,6 +24151,12 @@ pub struct Const { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Const' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConstInst { + /// An instance of a fully built Const Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Const { /// Creates a new `Const`. @@ -19624,13 +24165,8 @@ impl Const { } /// Sets the `value` attribute. - pub fn value>>( - mut self, - value: ArgType, - ) -> Self { - self.value = ::std::option::Option::Some( - (::std::boxed::Box::new(value.into()) as ::std::boxed::Box), - ); + pub fn value>>(mut self, value: ArgType) -> Self { + self.value = ::std::option::Option::Some((::std::boxed::Box::new(value.into()) as ::std::boxed::Box)); self } @@ -19647,35 +24183,74 @@ impl Const { } /// Builds the `Const` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Const", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.value { - nd.set_attr_any_tensor("value", value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.value { + nd.set_attr_any_tensor("value", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Const` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Const", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.value { + nd.set_attr_any_tensor("value", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ConstInst{op}) + } +} +impl ConstInst { + /// Returns the 'output' output of this 'Const' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ConstInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Const::new().build(scope)`. -pub fn const_(scope: &mut crate::Scope) -> crate::Result { +pub fn const_<>(scope: &mut crate::Scope) -> crate::Result { Const::new().build(scope) } + /// Builder for the `ConsumeMutexLock` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ConsumeMutexLock { control_inputs: ::std::vec::Vec, } +/// An instance of 'ConsumeMutexLock' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ConsumeMutexLockInst { + /// An instance of a fully built ConsumeMutexLock Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ConsumeMutexLock { /// Creates a new `ConsumeMutexLock`. @@ -19690,19 +24265,10 @@ impl ConsumeMutexLock { } /// Builds the `ConsumeMutexLock` operation. - pub fn build>( - &self, - mutex_lock: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, mutex_lock: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(mutex_lock.into(), scope) } - - fn build_impl( - &self, - mutex_lock: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, mutex_lock: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ConsumeMutexLock", |nd| { nd.add_input(mutex_lock); for op in &self.control_inputs { @@ -19711,20 +24277,45 @@ impl ConsumeMutexLock { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ConsumeMutexLock` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, mutex_lock: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(mutex_lock.into(), scope) + } + fn build_instance_impl(&self, mutex_lock: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ConsumeMutexLock", |nd| { + nd.add_input(mutex_lock); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ConsumeMutexLockInst{op}) + } +} +impl ConsumeMutexLockInst { +} +impl Into for ConsumeMutexLockInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ConsumeMutexLock::new().build(mutex_lock, scope)`. -pub fn consume_mutex_lock>( - mutex_lock: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn consume_mutex_lock>(mutex_lock: O0, scope: &mut crate::Scope) -> crate::Result { ConsumeMutexLock::new().build(mutex_lock, scope) } + /// Builder for the `ControlTrigger` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ControlTrigger { control_inputs: ::std::vec::Vec, } +/// An instance of 'ControlTrigger' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ControlTriggerInst { + /// An instance of a fully built ControlTrigger Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ControlTrigger { /// Creates a new `ControlTrigger`. @@ -19739,10 +24330,9 @@ impl ControlTrigger { } /// Builds the `ControlTrigger` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ControlTrigger", |nd| { for op in &self.control_inputs { @@ -19751,12 +24341,33 @@ impl ControlTrigger { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ControlTrigger` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ControlTrigger", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ControlTriggerInst{op}) + } +} +impl ControlTriggerInst { +} +impl Into for ControlTriggerInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ControlTrigger::new().build(scope)`. -pub fn control_trigger(scope: &mut crate::Scope) -> crate::Result { +pub fn control_trigger<>(scope: &mut crate::Scope) -> crate::Result { ControlTrigger::new().build(scope) } + /// Builder for the `Conv2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Conv2D { @@ -19769,6 +24380,12 @@ pub struct Conv2D { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Conv2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Conv2DInst { + /// An instance of a fully built Conv2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Conv2D { /// Creates a new `Conv2D`. @@ -19783,10 +24400,7 @@ impl Conv2D { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } @@ -19798,37 +24412,25 @@ impl Conv2D { } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `explicit_paddings` attribute. - pub fn explicit_paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn explicit_paddings>>(mut self, value: ArgType) -> Self { self.explicit_paddings = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -19840,64 +24442,97 @@ impl Conv2D { } /// Builds the `Conv2D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), filter.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Conv2D", |nd| { nd.add_input(input); nd.add_input(filter); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_cudnn_on_gpu { - nd.set_attr_bool("use_cudnn_on_gpu", *value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.explicit_paddings { - nd.set_attr_int_list("explicit_paddings", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_cudnn_on_gpu { + nd.set_attr_bool("use_cudnn_on_gpu", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Conv2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Conv2D", |nd| { + nd.add_input(input); + nd.add_input(filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_cudnn_on_gpu { + nd.set_attr_bool("use_cudnn_on_gpu", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Conv2DInst{op}) + } +} +impl Conv2DInst { + /// Returns the 'output' output of this 'Conv2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Conv2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Conv2D::new().build(input, filter, scope)`. -pub fn conv2_d, O1: ::std::convert::Into>( - input: O0, - filter: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn conv2_d, O1: ::std::convert::Into>(input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { Conv2D::new().build(input, filter, scope) } + /// Builder for the `Conv2DBackpropFilter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Conv2DBackpropFilter { @@ -19910,6 +24545,12 @@ pub struct Conv2DBackpropFilter { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Conv2DBackpropFilter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Conv2DBackpropFilterInst { + /// An instance of a fully built Conv2DBackpropFilter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Conv2DBackpropFilter { /// Creates a new `Conv2DBackpropFilter`. @@ -19924,10 +24565,7 @@ impl Conv2DBackpropFilter { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } @@ -19939,37 +24577,25 @@ impl Conv2DBackpropFilter { } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `explicit_paddings` attribute. - pub fn explicit_paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn explicit_paddings>>(mut self, value: ArgType) -> Self { self.explicit_paddings = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -19981,32 +24607,10 @@ impl Conv2DBackpropFilter { } /// Builds the `Conv2DBackpropFilter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - filter_sizes: O1, - out_backprop: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter_sizes.into(), - out_backprop.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter_sizes: crate::Output, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter_sizes: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter_sizes.into(), out_backprop.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter_sizes: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Conv2DBackpropFilter", |nd| { nd.add_input(input); nd.add_input(filter_sizes); @@ -20014,45 +24618,88 @@ impl Conv2DBackpropFilter { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_cudnn_on_gpu { - nd.set_attr_bool("use_cudnn_on_gpu", *value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.explicit_paddings { - nd.set_attr_int_list("explicit_paddings", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_cudnn_on_gpu { + nd.set_attr_bool("use_cudnn_on_gpu", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Conv2DBackpropFilter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter_sizes: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter_sizes.into(), out_backprop.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter_sizes: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Conv2DBackpropFilter", |nd| { + nd.add_input(input); + nd.add_input(filter_sizes); + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_cudnn_on_gpu { + nd.set_attr_bool("use_cudnn_on_gpu", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Conv2DBackpropFilterInst{op}) + } +} +impl Conv2DBackpropFilterInst { + /// Returns the 'output' output of this 'Conv2DBackpropFilter' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Conv2DBackpropFilterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Conv2DBackpropFilter::new().build(input, filter_sizes, out_backprop, scope)`. -pub fn conv2_dbackprop_filter< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - filter_sizes: O1, - out_backprop: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn conv2_dbackprop_filter, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, filter_sizes: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { Conv2DBackpropFilter::new().build(input, filter_sizes, out_backprop, scope) } + /// Builder for the `Conv2DBackpropInput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Conv2DBackpropInput { @@ -20065,6 +24712,12 @@ pub struct Conv2DBackpropInput { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Conv2DBackpropInput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Conv2DBackpropInputInst { + /// An instance of a fully built Conv2DBackpropInput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Conv2DBackpropInput { /// Creates a new `Conv2DBackpropInput`. @@ -20079,10 +24732,7 @@ impl Conv2DBackpropInput { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } @@ -20094,37 +24744,25 @@ impl Conv2DBackpropInput { } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `explicit_paddings` attribute. - pub fn explicit_paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn explicit_paddings>>(mut self, value: ArgType) -> Self { self.explicit_paddings = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -20136,32 +24774,10 @@ impl Conv2DBackpropInput { } /// Builds the `Conv2DBackpropInput` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_sizes: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_sizes.into(), - filter.into(), - out_backprop.into(), - scope, - ) - } - - fn build_impl( - &self, - input_sizes: crate::Output, - filter: crate::Output, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_sizes: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_sizes.into(), filter.into(), out_backprop.into(), scope) + } + fn build_impl(&self, input_sizes: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Conv2DBackpropInput", |nd| { nd.add_input(input_sizes); nd.add_input(filter); @@ -20169,45 +24785,88 @@ impl Conv2DBackpropInput { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_cudnn_on_gpu { - nd.set_attr_bool("use_cudnn_on_gpu", *value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.explicit_paddings { - nd.set_attr_int_list("explicit_paddings", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_cudnn_on_gpu { + nd.set_attr_bool("use_cudnn_on_gpu", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Conv2DBackpropInput` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_sizes: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_sizes.into(), filter.into(), out_backprop.into(), scope) + } + fn build_instance_impl(&self, input_sizes: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Conv2DBackpropInput", |nd| { + nd.add_input(input_sizes); + nd.add_input(filter); + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_cudnn_on_gpu { + nd.set_attr_bool("use_cudnn_on_gpu", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Conv2DBackpropInputInst{op}) + } +} +impl Conv2DBackpropInputInst { + /// Returns the 'output' output of this 'Conv2DBackpropInput' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Conv2DBackpropInputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Conv2DBackpropInput::new().build(input_sizes, filter, out_backprop, scope)`. -pub fn conv2_dbackprop_input< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_sizes: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn conv2_dbackprop_input, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_sizes: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { Conv2DBackpropInput::new().build(input_sizes, filter, out_backprop, scope) } + /// Builder for the `Conv3D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Conv3D { @@ -20218,6 +24877,12 @@ pub struct Conv3D { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Conv3D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Conv3DInst { + /// An instance of a fully built Conv3D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Conv3D { /// Creates a new `Conv3D`. @@ -20232,37 +24897,25 @@ impl Conv3D { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -20274,58 +24927,85 @@ impl Conv3D { } /// Builds the `Conv3D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), filter.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Conv3D", |nd| { nd.add_input(input); nd.add_input(filter); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Conv3D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Conv3D", |nd| { + nd.add_input(input); + nd.add_input(filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Conv3DInst{op}) + } +} +impl Conv3DInst { + /// Returns the 'output' output of this 'Conv3D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Conv3DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Conv3D::new().build(input, filter, scope)`. -pub fn conv3_d, O1: ::std::convert::Into>( - input: O0, - filter: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn conv3_d, O1: ::std::convert::Into>(input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { Conv3D::new().build(input, filter, scope) } + /// Builder for the `Conv3DBackpropFilter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Conv3DBackpropFilter { @@ -20335,6 +25015,12 @@ pub struct Conv3DBackpropFilter { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Conv3DBackpropFilter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Conv3DBackpropFilterInst { + /// An instance of a fully built Conv3DBackpropFilter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Conv3DBackpropFilter { /// Creates a new `Conv3DBackpropFilter`. @@ -20349,28 +25035,19 @@ impl Conv3DBackpropFilter { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -20382,27 +25059,10 @@ impl Conv3DBackpropFilter { } /// Builds the `Conv3DBackpropFilter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), filter.into(), out_backprop.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Conv3DBackpropFilter", |nd| { nd.add_input(input); nd.add_input(filter); @@ -20410,36 +25070,70 @@ impl Conv3DBackpropFilter { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Conv3DBackpropFilter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), out_backprop.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Conv3DBackpropFilter", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Conv3DBackpropFilterInst{op}) + } +} +impl Conv3DBackpropFilterInst { + /// Returns the 'output' output of this 'Conv3DBackpropFilter' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Conv3DBackpropFilterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Conv3DBackpropFilter::new().build(input, filter, out_backprop, scope)`. -pub fn conv3_dbackprop_filter< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn conv3_dbackprop_filter, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { Conv3DBackpropFilter::new().build(input, filter, out_backprop, scope) } + /// Builder for the `Conv3DBackpropFilterV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Conv3DBackpropFilterV2 { @@ -20450,6 +25144,12 @@ pub struct Conv3DBackpropFilterV2 { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Conv3DBackpropFilterV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Conv3DBackpropFilterV2Inst { + /// An instance of a fully built Conv3DBackpropFilterV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Conv3DBackpropFilterV2 { /// Creates a new `Conv3DBackpropFilterV2`. @@ -20464,37 +25164,25 @@ impl Conv3DBackpropFilterV2 { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -20506,32 +25194,10 @@ impl Conv3DBackpropFilterV2 { } /// Builds the `Conv3DBackpropFilterV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - filter_sizes: O1, - out_backprop: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter_sizes.into(), - out_backprop.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter_sizes: crate::Output, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter_sizes: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter_sizes.into(), out_backprop.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter_sizes: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Conv3DBackpropFilterV2", |nd| { nd.add_input(input); nd.add_input(filter_sizes); @@ -20539,39 +25205,76 @@ impl Conv3DBackpropFilterV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Conv3DBackpropFilterV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter_sizes: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter_sizes.into(), out_backprop.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter_sizes: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Conv3DBackpropFilterV2", |nd| { + nd.add_input(input); + nd.add_input(filter_sizes); + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Conv3DBackpropFilterV2Inst{op}) + } +} +impl Conv3DBackpropFilterV2Inst { + /// Returns the 'output' output of this 'Conv3DBackpropFilterV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Conv3DBackpropFilterV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Conv3DBackpropFilterV2::new().build(input, filter_sizes, out_backprop, scope)`. -pub fn conv3_dbackprop_filter_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - filter_sizes: O1, - out_backprop: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn conv3_dbackprop_filter_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, filter_sizes: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { Conv3DBackpropFilterV2::new().build(input, filter_sizes, out_backprop, scope) } + /// Builder for the `Conv3DBackpropInput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Conv3DBackpropInput { @@ -20581,6 +25284,12 @@ pub struct Conv3DBackpropInput { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Conv3DBackpropInput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Conv3DBackpropInputInst { + /// An instance of a fully built Conv3DBackpropInput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Conv3DBackpropInput { /// Creates a new `Conv3DBackpropInput`. @@ -20595,28 +25304,19 @@ impl Conv3DBackpropInput { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -20628,27 +25328,10 @@ impl Conv3DBackpropInput { } /// Builds the `Conv3DBackpropInput` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), filter.into(), out_backprop.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Conv3DBackpropInput", |nd| { nd.add_input(input); nd.add_input(filter); @@ -20656,36 +25339,70 @@ impl Conv3DBackpropInput { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Conv3DBackpropInput` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), out_backprop.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Conv3DBackpropInput", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Conv3DBackpropInputInst{op}) + } +} +impl Conv3DBackpropInputInst { + /// Returns the 'output' output of this 'Conv3DBackpropInput' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Conv3DBackpropInputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Conv3DBackpropInput::new().build(input, filter, out_backprop, scope)`. -pub fn conv3_dbackprop_input< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn conv3_dbackprop_input, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { Conv3DBackpropInput::new().build(input, filter, out_backprop, scope) } + /// Builder for the `Conv3DBackpropInputV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Conv3DBackpropInputV2 { @@ -20697,6 +25414,12 @@ pub struct Conv3DBackpropInputV2 { Tshape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Conv3DBackpropInputV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Conv3DBackpropInputV2Inst { + /// An instance of a fully built Conv3DBackpropInputV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Conv3DBackpropInputV2 { /// Creates a new `Conv3DBackpropInputV2`. @@ -20711,46 +25434,31 @@ impl Conv3DBackpropInputV2 { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshape>(mut self, value: ArgType) -> Self { self.Tshape = ::std::option::Option::Some(value.into()); self } @@ -20762,32 +25470,10 @@ impl Conv3DBackpropInputV2 { } /// Builds the `Conv3DBackpropInputV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_sizes: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_sizes.into(), - filter.into(), - out_backprop.into(), - scope, - ) - } - - fn build_impl( - &self, - input_sizes: crate::Output, - filter: crate::Output, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_sizes: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_sizes.into(), filter.into(), out_backprop.into(), scope) + } + fn build_impl(&self, input_sizes: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Conv3DBackpropInputV2", |nd| { nd.add_input(input_sizes); nd.add_input(filter); @@ -20795,42 +25481,82 @@ impl Conv3DBackpropInputV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Conv3DBackpropInputV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_sizes: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_sizes.into(), filter.into(), out_backprop.into(), scope) + } + fn build_instance_impl(&self, input_sizes: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Conv3DBackpropInputV2", |nd| { + nd.add_input(input_sizes); + nd.add_input(filter); + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Conv3DBackpropInputV2Inst{op}) + } +} +impl Conv3DBackpropInputV2Inst { + /// Returns the 'output' output of this 'Conv3DBackpropInputV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Conv3DBackpropInputV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Conv3DBackpropInputV2::new().build(input_sizes, filter, out_backprop, scope)`. -pub fn conv3_dbackprop_input_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_sizes: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn conv3_dbackprop_input_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_sizes: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { Conv3DBackpropInputV2::new().build(input_sizes, filter, out_backprop, scope) } + /// Builder for the `Copy` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Copy { @@ -20839,6 +25565,12 @@ pub struct Copy { debug_ops_spec: ::std::option::Option<::std::vec::Vec<::std::string::String>>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Copy' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CopyInst { + /// An instance of a fully built Copy Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Copy { /// Creates a new `Copy`. @@ -20853,19 +25585,13 @@ impl Copy { } /// Sets the `tensor_name` attribute. - pub fn tensor_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_name>(mut self, value: ArgType) -> Self { self.tensor_name = ::std::option::Option::Some(value.into()); self } /// Sets the `debug_ops_spec` attribute. - pub fn debug_ops_spec>>( - mut self, - value: ArgType, - ) -> Self { + pub fn debug_ops_spec>>(mut self, value: ArgType) -> Self { self.debug_ops_spec = ::std::option::Option::Some(value.into()); self } @@ -20877,45 +25603,71 @@ impl Copy { } /// Builds the `Copy` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Copy", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_name { - nd.set_attr_string("tensor_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.debug_ops_spec { - nd.set_attr_string_list("debug_ops_spec", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_ops_spec { + nd.set_attr_string_list("debug_ops_spec", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Copy` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Copy", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_ops_spec { + nd.set_attr_string_list("debug_ops_spec", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CopyInst{op}) + } +} +impl CopyInst { + /// Returns the 'output' output of this 'Copy' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CopyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Copy::new().build(input, scope)`. -pub fn copy>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn copy>(input: O0, scope: &mut crate::Scope) -> crate::Result { Copy::new().build(input, scope) } + /// Builder for the `CopyHost` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CopyHost { @@ -20924,6 +25676,12 @@ pub struct CopyHost { debug_ops_spec: ::std::option::Option<::std::vec::Vec<::std::string::String>>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CopyHost' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CopyHostInst { + /// An instance of a fully built CopyHost Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CopyHost { /// Creates a new `CopyHost`. @@ -20938,19 +25696,13 @@ impl CopyHost { } /// Sets the `tensor_name` attribute. - pub fn tensor_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_name>(mut self, value: ArgType) -> Self { self.tensor_name = ::std::option::Option::Some(value.into()); self } /// Sets the `debug_ops_spec` attribute. - pub fn debug_ops_spec>>( - mut self, - value: ArgType, - ) -> Self { + pub fn debug_ops_spec>>(mut self, value: ArgType) -> Self { self.debug_ops_spec = ::std::option::Option::Some(value.into()); self } @@ -20962,51 +25714,83 @@ impl CopyHost { } /// Builds the `CopyHost` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CopyHost", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_name { - nd.set_attr_string("tensor_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.debug_ops_spec { - nd.set_attr_string_list("debug_ops_spec", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_ops_spec { + nd.set_attr_string_list("debug_ops_spec", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CopyHost` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CopyHost", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_ops_spec { + nd.set_attr_string_list("debug_ops_spec", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CopyHostInst{op}) + } +} +impl CopyHostInst { + /// Returns the 'output' output of this 'CopyHost' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CopyHostInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CopyHost::new().build(input, scope)`. -pub fn copy_host>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn copy_host>(input: O0, scope: &mut crate::Scope) -> crate::Result { CopyHost::new().build(input, scope) } + /// Builder for the `Cos` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Cos { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Cos' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CosInst { + /// An instance of a fully built Cos Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Cos { /// Creates a new `Cos`. @@ -21027,45 +25811,71 @@ impl Cos { } /// Builds the `Cos` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Cos", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Cos` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Cos", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CosInst{op}) + } +} +impl CosInst { + /// Returns the 'y' output of this 'Cos' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CosInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Cos::new().build(x, scope)`. -pub fn cos>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cos>(x: O0, scope: &mut crate::Scope) -> crate::Result { Cos::new().build(x, scope) } + /// Builder for the `Cosh` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Cosh { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Cosh' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CoshInst { + /// An instance of a fully built Cosh Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Cosh { /// Creates a new `Cosh`. @@ -21086,39 +25896,59 @@ impl Cosh { } /// Builds the `Cosh` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Cosh", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Cosh` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Cosh", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CoshInst{op}) + } +} +impl CoshInst { + /// Returns the 'y' output of this 'Cosh' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CoshInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Cosh::new().build(x, scope)`. -pub fn cosh>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cosh>(x: O0, scope: &mut crate::Scope) -> crate::Result { Cosh::new().build(x, scope) } + /// Builder for the `CountUpTo` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CountUpTo { @@ -21126,6 +25956,12 @@ pub struct CountUpTo { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CountUpTo' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CountUpToInst { + /// An instance of a fully built CountUpTo Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CountUpTo { /// Creates a new `CountUpTo`. @@ -21152,47 +25988,76 @@ impl CountUpTo { } /// Builds the `CountUpTo` operation. - pub fn build>( - &self, - ref_: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, ref_: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CountUpTo", |nd| { nd.add_input(ref_); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.limit { - nd.set_attr_int("limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.limit { + nd.set_attr_int("limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CountUpTo` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, ref_: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CountUpTo", |nd| { + nd.add_input(ref_); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.limit { + nd.set_attr_int("limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CountUpToInst{op}) + } +} +impl CountUpToInst { + /// Returns the 'output' output of this 'CountUpTo' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CountUpToInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CountUpTo::new().build(ref_, scope)`. -pub fn count_up_to>( - ref_: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn count_up_to>(ref_: O0, scope: &mut crate::Scope) -> crate::Result { CountUpTo::new().build(ref_, scope) } + /// Builder for the `CreateSummaryDbWriter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CreateSummaryDbWriter { control_inputs: ::std::vec::Vec, } +/// An instance of 'CreateSummaryDbWriter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CreateSummaryDbWriterInst { + /// An instance of a fully built CreateSummaryDbWriter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CreateSummaryDbWriter { /// Creates a new `CreateSummaryDbWriter`. @@ -21207,40 +26072,10 @@ impl CreateSummaryDbWriter { } /// Builds the `CreateSummaryDbWriter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - writer: O0, - db_uri: O1, - experiment_name: O2, - run_name: O3, - user_name: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - writer.into(), - db_uri.into(), - experiment_name.into(), - run_name.into(), - user_name.into(), - scope, - ) - } - - fn build_impl( - &self, - writer: crate::Output, - db_uri: crate::Output, - experiment_name: crate::Output, - run_name: crate::Output, - user_name: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, writer: O0, db_uri: O1, experiment_name: O2, run_name: O3, user_name: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(writer.into(), db_uri.into(), experiment_name.into(), run_name.into(), user_name.into(), scope) + } + fn build_impl(&self, writer: crate::Output, db_uri: crate::Output, experiment_name: crate::Output, run_name: crate::Output, user_name: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CreateSummaryDbWriter", |nd| { nd.add_input(writer); nd.add_input(db_uri); @@ -21253,30 +26088,49 @@ impl CreateSummaryDbWriter { ::std::result::Result::Ok(()) }) } -} + /// Builds the `CreateSummaryDbWriter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, writer: O0, db_uri: O1, experiment_name: O2, run_name: O3, user_name: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), db_uri.into(), experiment_name.into(), run_name.into(), user_name.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, db_uri: crate::Output, experiment_name: crate::Output, run_name: crate::Output, user_name: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CreateSummaryDbWriter", |nd| { + nd.add_input(writer); + nd.add_input(db_uri); + nd.add_input(experiment_name); + nd.add_input(run_name); + nd.add_input(user_name); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(CreateSummaryDbWriterInst{op}) + } +} +impl CreateSummaryDbWriterInst { +} +impl Into for CreateSummaryDbWriterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CreateSummaryDbWriter::new().build(writer, db_uri, experiment_name, run_name, user_name, scope)`. -pub fn create_summary_db_writer< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - writer: O0, - db_uri: O1, - experiment_name: O2, - run_name: O3, - user_name: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn create_summary_db_writer, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(writer: O0, db_uri: O1, experiment_name: O2, run_name: O3, user_name: O4, scope: &mut crate::Scope) -> crate::Result { CreateSummaryDbWriter::new().build(writer, db_uri, experiment_name, run_name, user_name, scope) } + /// Builder for the `CreateSummaryFileWriter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CreateSummaryFileWriter { control_inputs: ::std::vec::Vec, } +/// An instance of 'CreateSummaryFileWriter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CreateSummaryFileWriterInst { + /// An instance of a fully built CreateSummaryFileWriter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CreateSummaryFileWriter { /// Creates a new `CreateSummaryFileWriter`. @@ -21291,40 +26145,10 @@ impl CreateSummaryFileWriter { } /// Builds the `CreateSummaryFileWriter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - writer: O0, - logdir: O1, - max_queue: O2, - flush_millis: O3, - filename_suffix: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - writer.into(), - logdir.into(), - max_queue.into(), - flush_millis.into(), - filename_suffix.into(), - scope, - ) - } - - fn build_impl( - &self, - writer: crate::Output, - logdir: crate::Output, - max_queue: crate::Output, - flush_millis: crate::Output, - filename_suffix: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, writer: O0, logdir: O1, max_queue: O2, flush_millis: O3, filename_suffix: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(writer.into(), logdir.into(), max_queue.into(), flush_millis.into(), filename_suffix.into(), scope) + } + fn build_impl(&self, writer: crate::Output, logdir: crate::Output, max_queue: crate::Output, flush_millis: crate::Output, filename_suffix: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CreateSummaryFileWriter", |nd| { nd.add_input(writer); nd.add_input(logdir); @@ -21337,32 +26161,38 @@ impl CreateSummaryFileWriter { ::std::result::Result::Ok(()) }) } -} + /// Builds the `CreateSummaryFileWriter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, writer: O0, logdir: O1, max_queue: O2, flush_millis: O3, filename_suffix: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), logdir.into(), max_queue.into(), flush_millis.into(), filename_suffix.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, logdir: crate::Output, max_queue: crate::Output, flush_millis: crate::Output, filename_suffix: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CreateSummaryFileWriter", |nd| { + nd.add_input(writer); + nd.add_input(logdir); + nd.add_input(max_queue); + nd.add_input(flush_millis); + nd.add_input(filename_suffix); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(CreateSummaryFileWriterInst{op}) + } +} +impl CreateSummaryFileWriterInst { +} +impl Into for CreateSummaryFileWriterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CreateSummaryFileWriter::new().build(writer, logdir, max_queue, flush_millis, filename_suffix, scope)`. -pub fn create_summary_file_writer< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - writer: O0, - logdir: O1, - max_queue: O2, - flush_millis: O3, - filename_suffix: O4, - scope: &mut crate::Scope, -) -> crate::Result { - CreateSummaryFileWriter::new().build( - writer, - logdir, - max_queue, - flush_millis, - filename_suffix, - scope, - ) +pub fn create_summary_file_writer, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(writer: O0, logdir: O1, max_queue: O2, flush_millis: O3, filename_suffix: O4, scope: &mut crate::Scope) -> crate::Result { + CreateSummaryFileWriter::new().build(writer, logdir, max_queue, flush_millis, filename_suffix, scope) } + /// Builder for the `CropAndResize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CropAndResize { @@ -21371,6 +26201,12 @@ pub struct CropAndResize { extrapolation_value: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CropAndResize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CropAndResizeInst { + /// An instance of a fully built CropAndResize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CropAndResize { /// Creates a new `CropAndResize`. @@ -21385,19 +26221,13 @@ impl CropAndResize { } /// Sets the `method` attribute. - pub fn method>( - mut self, - value: ArgType, - ) -> Self { + pub fn method>(mut self, value: ArgType) -> Self { self.method = ::std::option::Option::Some(value.into()); self } /// Sets the `extrapolation_value` attribute. - pub fn extrapolation_value>( - mut self, - value: ArgType, - ) -> Self { + pub fn extrapolation_value>(mut self, value: ArgType) -> Self { self.extrapolation_value = ::std::option::Option::Some(value.into()); self } @@ -21409,36 +26239,10 @@ impl CropAndResize { } /// Builds the `CropAndResize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - image: O0, - boxes: O1, - box_ind: O2, - crop_size: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - image.into(), - boxes.into(), - box_ind.into(), - crop_size.into(), - scope, - ) - } - - fn build_impl( - &self, - image: crate::Output, - boxes: crate::Output, - box_ind: crate::Output, - crop_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, image: O0, boxes: O1, box_ind: O2, crop_size: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(image.into(), boxes.into(), box_ind.into(), crop_size.into(), scope) + } + fn build_impl(&self, image: crate::Output, boxes: crate::Output, box_ind: crate::Output, crop_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CropAndResize", |nd| { nd.add_input(image); nd.add_input(boxes); @@ -21447,35 +26251,65 @@ impl CropAndResize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.method { - nd.set_attr_string("method", value)?; - } - if let ::std::option::Option::Some(value) = &self.extrapolation_value { - nd.set_attr_float("extrapolation_value", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.method { + nd.set_attr_string("method", value)?; + } + if let ::std::option::Option::Some(value) = &self.extrapolation_value { + nd.set_attr_float("extrapolation_value", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CropAndResize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, image: O0, boxes: O1, box_ind: O2, crop_size: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(image.into(), boxes.into(), box_ind.into(), crop_size.into(), scope) + } + fn build_instance_impl(&self, image: crate::Output, boxes: crate::Output, box_ind: crate::Output, crop_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CropAndResize", |nd| { + nd.add_input(image); + nd.add_input(boxes); + nd.add_input(box_ind); + nd.add_input(crop_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.method { + nd.set_attr_string("method", value)?; + } + if let ::std::option::Option::Some(value) = &self.extrapolation_value { + nd.set_attr_float("extrapolation_value", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CropAndResizeInst{op}) + } +} +impl CropAndResizeInst { + /// Returns the 'crops' output of this 'CropAndResize' operation. + pub fn crops(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CropAndResizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CropAndResize::new().build(image, boxes, box_ind, crop_size, scope)`. -pub fn crop_and_resize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - image: O0, - boxes: O1, - box_ind: O2, - crop_size: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn crop_and_resize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(image: O0, boxes: O1, box_ind: O2, crop_size: O3, scope: &mut crate::Scope) -> crate::Result { CropAndResize::new().build(image, boxes, box_ind, crop_size, scope) } + /// Builder for the `CropAndResizeGradBoxes` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CropAndResizeGradBoxes { @@ -21483,6 +26317,12 @@ pub struct CropAndResizeGradBoxes { method: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CropAndResizeGradBoxes' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CropAndResizeGradBoxesInst { + /// An instance of a fully built CropAndResizeGradBoxes Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CropAndResizeGradBoxes { /// Creates a new `CropAndResizeGradBoxes`. @@ -21497,10 +26337,7 @@ impl CropAndResizeGradBoxes { } /// Sets the `method` attribute. - pub fn method>( - mut self, - value: ArgType, - ) -> Self { + pub fn method>(mut self, value: ArgType) -> Self { self.method = ::std::option::Option::Some(value.into()); self } @@ -21512,36 +26349,10 @@ impl CropAndResizeGradBoxes { } /// Builds the `CropAndResizeGradBoxes` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - grads: O0, - image: O1, - boxes: O2, - box_ind: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - grads.into(), - image.into(), - boxes.into(), - box_ind.into(), - scope, - ) - } - - fn build_impl( - &self, - grads: crate::Output, - image: crate::Output, - boxes: crate::Output, - box_ind: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grads: O0, image: O1, boxes: O2, box_ind: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(grads.into(), image.into(), boxes.into(), box_ind.into(), scope) + } + fn build_impl(&self, grads: crate::Output, image: crate::Output, boxes: crate::Output, box_ind: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CropAndResizeGradBoxes", |nd| { nd.add_input(grads); nd.add_input(image); @@ -21550,32 +26361,59 @@ impl CropAndResizeGradBoxes { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.method { - nd.set_attr_string("method", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.method { + nd.set_attr_string("method", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CropAndResizeGradBoxes` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grads: O0, image: O1, boxes: O2, box_ind: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(grads.into(), image.into(), boxes.into(), box_ind.into(), scope) + } + fn build_instance_impl(&self, grads: crate::Output, image: crate::Output, boxes: crate::Output, box_ind: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CropAndResizeGradBoxes", |nd| { + nd.add_input(grads); + nd.add_input(image); + nd.add_input(boxes); + nd.add_input(box_ind); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.method { + nd.set_attr_string("method", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CropAndResizeGradBoxesInst{op}) + } +} +impl CropAndResizeGradBoxesInst { + /// Returns the 'output' output of this 'CropAndResizeGradBoxes' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CropAndResizeGradBoxesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CropAndResizeGradBoxes::new().build(grads, image, boxes, box_ind, scope)`. -pub fn crop_and_resize_grad_boxes< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - grads: O0, - image: O1, - boxes: O2, - box_ind: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn crop_and_resize_grad_boxes, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(grads: O0, image: O1, boxes: O2, box_ind: O3, scope: &mut crate::Scope) -> crate::Result { CropAndResizeGradBoxes::new().build(grads, image, boxes, box_ind, scope) } + /// Builder for the `CropAndResizeGradImage` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CropAndResizeGradImage { @@ -21583,6 +26421,12 @@ pub struct CropAndResizeGradImage { method: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'CropAndResizeGradImage' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CropAndResizeGradImageInst { + /// An instance of a fully built CropAndResizeGradImage Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CropAndResizeGradImage { /// Creates a new `CropAndResizeGradImage`. @@ -21597,10 +26441,7 @@ impl CropAndResizeGradImage { } /// Sets the `method` attribute. - pub fn method>( - mut self, - value: ArgType, - ) -> Self { + pub fn method>(mut self, value: ArgType) -> Self { self.method = ::std::option::Option::Some(value.into()); self } @@ -21612,36 +26453,10 @@ impl CropAndResizeGradImage { } /// Builds the `CropAndResizeGradImage` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - grads: O0, - boxes: O1, - box_ind: O2, - image_size: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - grads.into(), - boxes.into(), - box_ind.into(), - image_size.into(), - scope, - ) - } - - fn build_impl( - &self, - grads: crate::Output, - boxes: crate::Output, - box_ind: crate::Output, - image_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grads: O0, boxes: O1, box_ind: O2, image_size: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(grads.into(), boxes.into(), box_ind.into(), image_size.into(), scope) + } + fn build_impl(&self, grads: crate::Output, boxes: crate::Output, box_ind: crate::Output, image_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CropAndResizeGradImage", |nd| { nd.add_input(grads); nd.add_input(boxes); @@ -21650,38 +26465,71 @@ impl CropAndResizeGradImage { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.method { - nd.set_attr_string("method", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.method { + nd.set_attr_string("method", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CropAndResizeGradImage` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grads: O0, boxes: O1, box_ind: O2, image_size: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(grads.into(), boxes.into(), box_ind.into(), image_size.into(), scope) + } + fn build_instance_impl(&self, grads: crate::Output, boxes: crate::Output, box_ind: crate::Output, image_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CropAndResizeGradImage", |nd| { + nd.add_input(grads); + nd.add_input(boxes); + nd.add_input(box_ind); + nd.add_input(image_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.method { + nd.set_attr_string("method", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CropAndResizeGradImageInst{op}) + } +} +impl CropAndResizeGradImageInst { + /// Returns the 'output' output of this 'CropAndResizeGradImage' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CropAndResizeGradImageInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CropAndResizeGradImage::new().build(grads, boxes, box_ind, image_size, scope)`. -pub fn crop_and_resize_grad_image< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - grads: O0, - boxes: O1, - box_ind: O2, - image_size: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn crop_and_resize_grad_image, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(grads: O0, boxes: O1, box_ind: O2, image_size: O3, scope: &mut crate::Scope) -> crate::Result { CropAndResizeGradImage::new().build(grads, boxes, box_ind, image_size, scope) } + /// Builder for the `Cross` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Cross { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Cross' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CrossInst { + /// An instance of a fully built Cross Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Cross { /// Creates a new `Cross`. @@ -21702,52 +26550,73 @@ impl Cross { } /// Builds the `Cross` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), b.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Cross", |nd| { nd.add_input(a); nd.add_input(b); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Cross` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Cross", |nd| { + nd.add_input(a); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CrossInst{op}) + } +} +impl CrossInst { + /// Returns the 'product' output of this 'Cross' operation. + pub fn product(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CrossInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Cross::new().build(a, b, scope)`. -pub fn cross, O1: ::std::convert::Into>( - a: O0, - b: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cross, O1: ::std::convert::Into>(a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { Cross::new().build(a, b, scope) } + /// Builder for the `CrossReplicaSum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CrossReplicaSum { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CrossReplicaSum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CrossReplicaSumInst { + /// An instance of a fully built CrossReplicaSum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CrossReplicaSum { /// Creates a new `CrossReplicaSum`. @@ -21768,49 +26637,61 @@ impl CrossReplicaSum { } /// Builds the `CrossReplicaSum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - group_assignment: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, group_assignment: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), group_assignment.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - group_assignment: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, group_assignment: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CrossReplicaSum", |nd| { nd.add_input(input); nd.add_input(group_assignment); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CrossReplicaSum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, group_assignment: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), group_assignment.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, group_assignment: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CrossReplicaSum", |nd| { + nd.add_input(input); + nd.add_input(group_assignment); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CrossReplicaSumInst{op}) + } +} +impl CrossReplicaSumInst { + /// Returns the 'output' output of this 'CrossReplicaSum' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CrossReplicaSumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CrossReplicaSum::new().build(input, group_assignment, scope)`. -pub fn cross_replica_sum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - group_assignment: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cross_replica_sum, O1: ::std::convert::Into>(input: O0, group_assignment: O1, scope: &mut crate::Scope) -> crate::Result { CrossReplicaSum::new().build(input, group_assignment, scope) } + /// Builder for the `CudnnRNN` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNN { @@ -21824,6 +26705,12 @@ pub struct CudnnRNN { is_training: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNN' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNInst { + /// An instance of a fully built CudnnRNN Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNN { /// Creates a new `CudnnRNN`. @@ -21838,28 +26725,19 @@ impl CudnnRNN { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -21895,36 +26773,10 @@ impl CudnnRNN { } /// Builds the `CudnnRNN` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input: O0, - input_h: O1, - input_c: O2, - params: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - input_h.into(), - input_c.into(), - params.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - input_h: crate::Output, - input_c: crate::Output, - params: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), input_h.into(), input_c.into(), params.into(), scope) + } + fn build_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNN", |nd| { nd.add_input(input); nd.add_input(input_h); @@ -21933,50 +26785,116 @@ impl CudnnRNN { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.is_training { - nd.set_attr_bool("is_training", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CudnnRNN` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_h.into(), input_c.into(), params.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNN", |nd| { + nd.add_input(input); + nd.add_input(input_h); + nd.add_input(input_c); + nd.add_input(params); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNInst{op}) + } +} +impl CudnnRNNInst { + /// Returns the 'output' output of this 'CudnnRNN' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_h' output of this 'CudnnRNN' operation. + pub fn output_h(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_c' output of this 'CudnnRNN' operation. + pub fn output_c(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'reserve_space' output of this 'CudnnRNN' operation. + pub fn reserve_space(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for CudnnRNNInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CudnnRNN::new().build(input, input_h, input_c, params, scope)`. -pub fn cudnn_rnn< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input: O0, - input_h: O1, - input_c: O2, - params: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cudnn_rnn, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input: O0, input_h: O1, input_c: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { CudnnRNN::new().build(input, input_h, input_c, params, scope) } + /// Builder for the `CudnnRNNBackprop` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNNBackprop { @@ -21989,6 +26907,12 @@ pub struct CudnnRNNBackprop { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNNBackprop' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNBackpropInst { + /// An instance of a fully built CudnnRNNBackprop Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNNBackprop { /// Creates a new `CudnnRNNBackprop`. @@ -22003,28 +26927,19 @@ impl CudnnRNNBackprop { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -22054,64 +26969,10 @@ impl CudnnRNNBackprop { } /// Builds the `CudnnRNNBackprop` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - >( - &self, - input: O0, - input_h: O1, - input_c: O2, - params: O3, - output: O4, - output_h: O5, - output_c: O6, - output_backprop: O7, - output_h_backprop: O8, - output_c_backprop: O9, - reserve_space: O10, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - input_h.into(), - input_c.into(), - params.into(), - output.into(), - output_h.into(), - output_c.into(), - output_backprop.into(), - output_h_backprop.into(), - output_c_backprop.into(), - reserve_space.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - input_h: crate::Output, - input_c: crate::Output, - params: crate::Output, - output: crate::Output, - output_h: crate::Output, - output_c: crate::Output, - output_backprop: crate::Output, - output_h_backprop: crate::Output, - output_c_backprop: crate::Output, - reserve_space: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, output: O4, output_h: O5, output_c: O6, output_backprop: O7, output_h_backprop: O8, output_c_backprop: O9, reserve_space: O10, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), input_h.into(), input_c.into(), params.into(), output.into(), output_h.into(), output_c.into(), output_backprop.into(), output_h_backprop.into(), output_c_backprop.into(), reserve_space.into(), scope) + } + fn build_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, output: crate::Output, output_h: crate::Output, output_c: crate::Output, output_backprop: crate::Output, output_h_backprop: crate::Output, output_c_backprop: crate::Output, reserve_space: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNNBackprop", |nd| { nd.add_input(input); nd.add_input(input_h); @@ -22127,74 +26988,117 @@ impl CudnnRNNBackprop { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CudnnRNNBackprop` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, output: O4, output_h: O5, output_c: O6, output_backprop: O7, output_h_backprop: O8, output_c_backprop: O9, reserve_space: O10, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_h.into(), input_c.into(), params.into(), output.into(), output_h.into(), output_c.into(), output_backprop.into(), output_h_backprop.into(), output_c_backprop.into(), reserve_space.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, output: crate::Output, output_h: crate::Output, output_c: crate::Output, output_backprop: crate::Output, output_h_backprop: crate::Output, output_c_backprop: crate::Output, reserve_space: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNNBackprop", |nd| { + nd.add_input(input); + nd.add_input(input_h); + nd.add_input(input_c); + nd.add_input(params); + nd.add_input(output); + nd.add_input(output_h); + nd.add_input(output_c); + nd.add_input(output_backprop); + nd.add_input(output_h_backprop); + nd.add_input(output_c_backprop); + nd.add_input(reserve_space); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNBackpropInst{op}) + } +} +impl CudnnRNNBackpropInst { + /// Returns the 'input_backprop' output of this 'CudnnRNNBackprop' operation. + pub fn input_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'input_h_backprop' output of this 'CudnnRNNBackprop' operation. + pub fn input_h_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'input_c_backprop' output of this 'CudnnRNNBackprop' operation. + pub fn input_c_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'params_backprop' output of this 'CudnnRNNBackprop' operation. + pub fn params_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for CudnnRNNBackpropInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CudnnRNNBackprop::new().build(input, input_h, input_c, params, output, output_h, output_c, output_backprop, output_h_backprop, output_c_backprop, reserve_space, scope)`. -pub fn cudnn_rnnbackprop< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, ->( - input: O0, - input_h: O1, - input_c: O2, - params: O3, - output: O4, - output_h: O5, - output_c: O6, - output_backprop: O7, - output_h_backprop: O8, - output_c_backprop: O9, - reserve_space: O10, - scope: &mut crate::Scope, -) -> crate::Result { - CudnnRNNBackprop::new().build( - input, - input_h, - input_c, - params, - output, - output_h, - output_c, - output_backprop, - output_h_backprop, - output_c_backprop, - reserve_space, - scope, - ) +pub fn cudnn_rnnbackprop, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into>(input: O0, input_h: O1, input_c: O2, params: O3, output: O4, output_h: O5, output_c: O6, output_backprop: O7, output_h_backprop: O8, output_c_backprop: O9, reserve_space: O10, scope: &mut crate::Scope) -> crate::Result { + CudnnRNNBackprop::new().build(input, input_h, input_c, params, output, output_h, output_c, output_backprop, output_h_backprop, output_c_backprop, reserve_space, scope) } + /// Builder for the `CudnnRNNBackpropV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNNBackpropV2 { @@ -22207,6 +27111,12 @@ pub struct CudnnRNNBackpropV2 { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNNBackpropV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNBackpropV2Inst { + /// An instance of a fully built CudnnRNNBackpropV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNNBackpropV2 { /// Creates a new `CudnnRNNBackpropV2`. @@ -22221,28 +27131,19 @@ impl CudnnRNNBackpropV2 { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -22272,68 +27173,10 @@ impl CudnnRNNBackpropV2 { } /// Builds the `CudnnRNNBackpropV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - >( - &self, - input: O0, - input_h: O1, - input_c: O2, - params: O3, - output: O4, - output_h: O5, - output_c: O6, - output_backprop: O7, - output_h_backprop: O8, - output_c_backprop: O9, - reserve_space: O10, - host_reserved: O11, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - input_h.into(), - input_c.into(), - params.into(), - output.into(), - output_h.into(), - output_c.into(), - output_backprop.into(), - output_h_backprop.into(), - output_c_backprop.into(), - reserve_space.into(), - host_reserved.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - input_h: crate::Output, - input_c: crate::Output, - params: crate::Output, - output: crate::Output, - output_h: crate::Output, - output_c: crate::Output, - output_backprop: crate::Output, - output_h_backprop: crate::Output, - output_c_backprop: crate::Output, - reserve_space: crate::Output, - host_reserved: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, output: O4, output_h: O5, output_c: O6, output_backprop: O7, output_h_backprop: O8, output_c_backprop: O9, reserve_space: O10, host_reserved: O11, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), input_h.into(), input_c.into(), params.into(), output.into(), output_h.into(), output_c.into(), output_backprop.into(), output_h_backprop.into(), output_c_backprop.into(), reserve_space.into(), host_reserved.into(), scope) + } + fn build_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, output: crate::Output, output_h: crate::Output, output_c: crate::Output, output_backprop: crate::Output, output_h_backprop: crate::Output, output_c_backprop: crate::Output, reserve_space: crate::Output, host_reserved: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNNBackpropV2", |nd| { nd.add_input(input); nd.add_input(input_h); @@ -22350,77 +27193,118 @@ impl CudnnRNNBackpropV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CudnnRNNBackpropV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, output: O4, output_h: O5, output_c: O6, output_backprop: O7, output_h_backprop: O8, output_c_backprop: O9, reserve_space: O10, host_reserved: O11, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_h.into(), input_c.into(), params.into(), output.into(), output_h.into(), output_c.into(), output_backprop.into(), output_h_backprop.into(), output_c_backprop.into(), reserve_space.into(), host_reserved.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, output: crate::Output, output_h: crate::Output, output_c: crate::Output, output_backprop: crate::Output, output_h_backprop: crate::Output, output_c_backprop: crate::Output, reserve_space: crate::Output, host_reserved: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNNBackpropV2", |nd| { + nd.add_input(input); + nd.add_input(input_h); + nd.add_input(input_c); + nd.add_input(params); + nd.add_input(output); + nd.add_input(output_h); + nd.add_input(output_c); + nd.add_input(output_backprop); + nd.add_input(output_h_backprop); + nd.add_input(output_c_backprop); + nd.add_input(reserve_space); + nd.add_input(host_reserved); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNBackpropV2Inst{op}) + } +} +impl CudnnRNNBackpropV2Inst { + /// Returns the 'input_backprop' output of this 'CudnnRNNBackpropV2' operation. + pub fn input_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'input_h_backprop' output of this 'CudnnRNNBackpropV2' operation. + pub fn input_h_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'input_c_backprop' output of this 'CudnnRNNBackpropV2' operation. + pub fn input_c_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'params_backprop' output of this 'CudnnRNNBackpropV2' operation. + pub fn params_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for CudnnRNNBackpropV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CudnnRNNBackpropV2::new().build(input, input_h, input_c, params, output, output_h, output_c, output_backprop, output_h_backprop, output_c_backprop, reserve_space, host_reserved, scope)`. -pub fn cudnn_rnnbackprop_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, ->( - input: O0, - input_h: O1, - input_c: O2, - params: O3, - output: O4, - output_h: O5, - output_c: O6, - output_backprop: O7, - output_h_backprop: O8, - output_c_backprop: O9, - reserve_space: O10, - host_reserved: O11, - scope: &mut crate::Scope, -) -> crate::Result { - CudnnRNNBackpropV2::new().build( - input, - input_h, - input_c, - params, - output, - output_h, - output_c, - output_backprop, - output_h_backprop, - output_c_backprop, - reserve_space, - host_reserved, - scope, - ) +pub fn cudnn_rnnbackprop_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(input: O0, input_h: O1, input_c: O2, params: O3, output: O4, output_h: O5, output_c: O6, output_backprop: O7, output_h_backprop: O8, output_c_backprop: O9, reserve_space: O10, host_reserved: O11, scope: &mut crate::Scope) -> crate::Result { + CudnnRNNBackpropV2::new().build(input, input_h, input_c, params, output, output_h, output_c, output_backprop, output_h_backprop, output_c_backprop, reserve_space, host_reserved, scope) } + /// Builder for the `CudnnRNNBackpropV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNNBackpropV3 { @@ -22435,6 +27319,12 @@ pub struct CudnnRNNBackpropV3 { time_major: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNNBackpropV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNBackpropV3Inst { + /// An instance of a fully built CudnnRNNBackpropV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNNBackpropV3 { /// Creates a new `CudnnRNNBackpropV3`. @@ -22449,28 +27339,19 @@ impl CudnnRNNBackpropV3 { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -22512,72 +27393,10 @@ impl CudnnRNNBackpropV3 { } /// Builds the `CudnnRNNBackpropV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - O12: ::std::convert::Into, - >( - &self, - input: O0, - input_h: O1, - input_c: O2, - params: O3, - sequence_lengths: O4, - output: O5, - output_h: O6, - output_c: O7, - output_backprop: O8, - output_h_backprop: O9, - output_c_backprop: O10, - reserve_space: O11, - host_reserved: O12, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - input_h.into(), - input_c.into(), - params.into(), - sequence_lengths.into(), - output.into(), - output_h.into(), - output_c.into(), - output_backprop.into(), - output_h_backprop.into(), - output_c_backprop.into(), - reserve_space.into(), - host_reserved.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - input_h: crate::Output, - input_c: crate::Output, - params: crate::Output, - sequence_lengths: crate::Output, - output: crate::Output, - output_h: crate::Output, - output_c: crate::Output, - output_backprop: crate::Output, - output_h_backprop: crate::Output, - output_c_backprop: crate::Output, - reserve_space: crate::Output, - host_reserved: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, sequence_lengths: O4, output: O5, output_h: O6, output_c: O7, output_backprop: O8, output_h_backprop: O9, output_c_backprop: O10, reserve_space: O11, host_reserved: O12, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), input_h.into(), input_c.into(), params.into(), sequence_lengths.into(), output.into(), output_h.into(), output_c.into(), output_backprop.into(), output_h_backprop.into(), output_c_backprop.into(), reserve_space.into(), host_reserved.into(), scope) + } + fn build_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, sequence_lengths: crate::Output, output: crate::Output, output_h: crate::Output, output_c: crate::Output, output_backprop: crate::Output, output_h_backprop: crate::Output, output_c_backprop: crate::Output, reserve_space: crate::Output, host_reserved: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNNBackpropV3", |nd| { nd.add_input(input); nd.add_input(input_h); @@ -22595,86 +27414,131 @@ impl CudnnRNNBackpropV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_proj { - nd.set_attr_int("num_proj", *value)?; - } - if let ::std::option::Option::Some(value) = &self.time_major { - nd.set_attr_bool("time_major", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_proj { + nd.set_attr_int("num_proj", *value)?; + } + if let ::std::option::Option::Some(value) = &self.time_major { + nd.set_attr_bool("time_major", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CudnnRNNBackpropV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, sequence_lengths: O4, output: O5, output_h: O6, output_c: O7, output_backprop: O8, output_h_backprop: O9, output_c_backprop: O10, reserve_space: O11, host_reserved: O12, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_h.into(), input_c.into(), params.into(), sequence_lengths.into(), output.into(), output_h.into(), output_c.into(), output_backprop.into(), output_h_backprop.into(), output_c_backprop.into(), reserve_space.into(), host_reserved.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, sequence_lengths: crate::Output, output: crate::Output, output_h: crate::Output, output_c: crate::Output, output_backprop: crate::Output, output_h_backprop: crate::Output, output_c_backprop: crate::Output, reserve_space: crate::Output, host_reserved: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNNBackpropV3", |nd| { + nd.add_input(input); + nd.add_input(input_h); + nd.add_input(input_c); + nd.add_input(params); + nd.add_input(sequence_lengths); + nd.add_input(output); + nd.add_input(output_h); + nd.add_input(output_c); + nd.add_input(output_backprop); + nd.add_input(output_h_backprop); + nd.add_input(output_c_backprop); + nd.add_input(reserve_space); + nd.add_input(host_reserved); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_proj { + nd.set_attr_int("num_proj", *value)?; + } + if let ::std::option::Option::Some(value) = &self.time_major { + nd.set_attr_bool("time_major", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNBackpropV3Inst{op}) + } +} +impl CudnnRNNBackpropV3Inst { + /// Returns the 'input_backprop' output of this 'CudnnRNNBackpropV3' operation. + pub fn input_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'input_h_backprop' output of this 'CudnnRNNBackpropV3' operation. + pub fn input_h_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'input_c_backprop' output of this 'CudnnRNNBackpropV3' operation. + pub fn input_c_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'params_backprop' output of this 'CudnnRNNBackpropV3' operation. + pub fn params_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for CudnnRNNBackpropV3Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CudnnRNNBackpropV3::new().build(input, input_h, input_c, params, sequence_lengths, output, output_h, output_c, output_backprop, output_h_backprop, output_c_backprop, reserve_space, host_reserved, scope)`. -pub fn cudnn_rnnbackprop_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - O12: ::std::convert::Into, ->( - input: O0, - input_h: O1, - input_c: O2, - params: O3, - sequence_lengths: O4, - output: O5, - output_h: O6, - output_c: O7, - output_backprop: O8, - output_h_backprop: O9, - output_c_backprop: O10, - reserve_space: O11, - host_reserved: O12, - scope: &mut crate::Scope, -) -> crate::Result { - CudnnRNNBackpropV3::new().build( - input, - input_h, - input_c, - params, - sequence_lengths, - output, - output_h, - output_c, - output_backprop, - output_h_backprop, - output_c_backprop, - reserve_space, - host_reserved, - scope, - ) +pub fn cudnn_rnnbackprop_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into>(input: O0, input_h: O1, input_c: O2, params: O3, sequence_lengths: O4, output: O5, output_h: O6, output_c: O7, output_backprop: O8, output_h_backprop: O9, output_c_backprop: O10, reserve_space: O11, host_reserved: O12, scope: &mut crate::Scope) -> crate::Result { + CudnnRNNBackpropV3::new().build(input, input_h, input_c, params, sequence_lengths, output, output_h, output_c, output_backprop, output_h_backprop, output_c_backprop, reserve_space, host_reserved, scope) } + /// Builder for the `CudnnRNNCanonicalToParams` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNNCanonicalToParams { @@ -22688,6 +27552,12 @@ pub struct CudnnRNNCanonicalToParams { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNNCanonicalToParams' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNCanonicalToParamsInst { + /// An instance of a fully built CudnnRNNCanonicalToParams Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNNCanonicalToParams { /// Creates a new `CudnnRNNCanonicalToParams`. @@ -22708,28 +27578,19 @@ impl CudnnRNNCanonicalToParams { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -22759,40 +27620,10 @@ impl CudnnRNNCanonicalToParams { } /// Builds the `CudnnRNNCanonicalToParams` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - num_layers: O0, - num_units: O1, - input_size: O2, - weights: O3, - biases: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - num_layers.into(), - num_units.into(), - input_size.into(), - weights.into(), - biases.into(), - scope, - ) - } - - fn build_impl( - &self, - num_layers: crate::Output, - num_units: crate::Output, - input_size: crate::Output, - weights: crate::Output, - biases: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, num_layers: O0, num_units: O1, input_size: O2, weights: O3, biases: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(num_layers.into(), num_units.into(), input_size.into(), weights.into(), biases.into(), scope) + } + fn build_impl(&self, num_layers: crate::Output, num_units: crate::Output, input_size: crate::Output, weights: crate::Output, biases: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNNCanonicalToParams", |nd| { nd.add_input(num_layers); nd.add_input(num_units); @@ -22802,53 +27633,96 @@ impl CudnnRNNCanonicalToParams { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_params { - nd.set_attr_int("num_params", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params { + nd.set_attr_int("num_params", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CudnnRNNCanonicalToParams` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, num_layers: O0, num_units: O1, input_size: O2, weights: O3, biases: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(num_layers.into(), num_units.into(), input_size.into(), weights.into(), biases.into(), scope) + } + fn build_instance_impl(&self, num_layers: crate::Output, num_units: crate::Output, input_size: crate::Output, weights: crate::Output, biases: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNNCanonicalToParams", |nd| { + nd.add_input(num_layers); + nd.add_input(num_units); + nd.add_input(input_size); + nd.add_input(weights); + nd.add_input(biases); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params { + nd.set_attr_int("num_params", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNCanonicalToParamsInst{op}) + } +} +impl CudnnRNNCanonicalToParamsInst { + /// Returns the 'params' output of this 'CudnnRNNCanonicalToParams' operation. + pub fn params(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CudnnRNNCanonicalToParamsInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CudnnRNNCanonicalToParams::new().build(num_layers, num_units, input_size, weights, biases, scope)`. -pub fn cudnn_rnncanonical_to_params< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - num_layers: O0, - num_units: O1, - input_size: O2, - weights: O3, - biases: O4, - scope: &mut crate::Scope, -) -> crate::Result { - CudnnRNNCanonicalToParams::new() - .build(num_layers, num_units, input_size, weights, biases, scope) +pub fn cudnn_rnncanonical_to_params, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(num_layers: O0, num_units: O1, input_size: O2, weights: O3, biases: O4, scope: &mut crate::Scope) -> crate::Result { + CudnnRNNCanonicalToParams::new().build(num_layers, num_units, input_size, weights, biases, scope) } + /// Builder for the `CudnnRNNCanonicalToParamsV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNNCanonicalToParamsV2 { @@ -22864,6 +27738,12 @@ pub struct CudnnRNNCanonicalToParamsV2 { num_proj: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNNCanonicalToParamsV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNCanonicalToParamsV2Inst { + /// An instance of a fully built CudnnRNNCanonicalToParamsV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNNCanonicalToParamsV2 { /// Creates a new `CudnnRNNCanonicalToParamsV2`. @@ -22878,10 +27758,7 @@ impl CudnnRNNCanonicalToParamsV2 { } /// Sets the `num_params_weights` attribute. - pub fn num_params_weights>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_params_weights>(mut self, value: ArgType) -> Self { self.num_params_weights = ::std::option::Option::Some(value.into()); self } @@ -22893,28 +27770,19 @@ impl CudnnRNNCanonicalToParamsV2 { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -22950,40 +27818,10 @@ impl CudnnRNNCanonicalToParamsV2 { } /// Builds the `CudnnRNNCanonicalToParamsV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - num_layers: O0, - num_units: O1, - input_size: O2, - weights: O3, - biases: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - num_layers.into(), - num_units.into(), - input_size.into(), - weights.into(), - biases.into(), - scope, - ) - } - - fn build_impl( - &self, - num_layers: crate::Output, - num_units: crate::Output, - input_size: crate::Output, - weights: crate::Output, - biases: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, num_layers: O0, num_units: O1, input_size: O2, weights: O3, biases: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(num_layers.into(), num_units.into(), input_size.into(), weights.into(), biases.into(), scope) + } + fn build_impl(&self, num_layers: crate::Output, num_units: crate::Output, input_size: crate::Output, weights: crate::Output, biases: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNNCanonicalToParamsV2", |nd| { nd.add_input(num_layers); nd.add_input(num_units); @@ -22993,59 +27831,108 @@ impl CudnnRNNCanonicalToParamsV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_params_weights { - nd.set_attr_int("num_params_weights", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_params_biases { - nd.set_attr_int("num_params_biases", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_proj { - nd.set_attr_int("num_proj", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params_weights { + nd.set_attr_int("num_params_weights", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params_biases { + nd.set_attr_int("num_params_biases", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_proj { + nd.set_attr_int("num_proj", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CudnnRNNCanonicalToParamsV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, num_layers: O0, num_units: O1, input_size: O2, weights: O3, biases: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(num_layers.into(), num_units.into(), input_size.into(), weights.into(), biases.into(), scope) + } + fn build_instance_impl(&self, num_layers: crate::Output, num_units: crate::Output, input_size: crate::Output, weights: crate::Output, biases: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNNCanonicalToParamsV2", |nd| { + nd.add_input(num_layers); + nd.add_input(num_units); + nd.add_input(input_size); + nd.add_input(weights); + nd.add_input(biases); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params_weights { + nd.set_attr_int("num_params_weights", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params_biases { + nd.set_attr_int("num_params_biases", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_proj { + nd.set_attr_int("num_proj", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNCanonicalToParamsV2Inst{op}) + } +} +impl CudnnRNNCanonicalToParamsV2Inst { + /// Returns the 'params' output of this 'CudnnRNNCanonicalToParamsV2' operation. + pub fn params(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CudnnRNNCanonicalToParamsV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CudnnRNNCanonicalToParamsV2::new().build(num_layers, num_units, input_size, weights, biases, scope)`. -pub fn cudnn_rnncanonical_to_params_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - num_layers: O0, - num_units: O1, - input_size: O2, - weights: O3, - biases: O4, - scope: &mut crate::Scope, -) -> crate::Result { - CudnnRNNCanonicalToParamsV2::new() - .build(num_layers, num_units, input_size, weights, biases, scope) +pub fn cudnn_rnncanonical_to_params_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(num_layers: O0, num_units: O1, input_size: O2, weights: O3, biases: O4, scope: &mut crate::Scope) -> crate::Result { + CudnnRNNCanonicalToParamsV2::new().build(num_layers, num_units, input_size, weights, biases, scope) } + /// Builder for the `CudnnRNNParamsSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNNParamsSize { @@ -23060,6 +27947,12 @@ pub struct CudnnRNNParamsSize { num_proj: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNNParamsSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNParamsSizeInst { + /// An instance of a fully built CudnnRNNParamsSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNNParamsSize { /// Creates a new `CudnnRNNParamsSize`. @@ -23080,28 +27973,19 @@ impl CudnnRNNParamsSize { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -23137,32 +28021,10 @@ impl CudnnRNNParamsSize { } /// Builds the `CudnnRNNParamsSize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - num_layers: O0, - num_units: O1, - input_size: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - num_layers.into(), - num_units.into(), - input_size.into(), - scope, - ) - } - - fn build_impl( - &self, - num_layers: crate::Output, - num_units: crate::Output, - input_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, num_layers: O0, num_units: O1, input_size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(num_layers.into(), num_units.into(), input_size.into(), scope) + } + fn build_impl(&self, num_layers: crate::Output, num_units: crate::Output, input_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNNParamsSize", |nd| { nd.add_input(num_layers); nd.add_input(num_units); @@ -23170,51 +28032,100 @@ impl CudnnRNNParamsSize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.S { - nd.set_attr_type("S", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_proj { - nd.set_attr_int("num_proj", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_proj { + nd.set_attr_int("num_proj", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CudnnRNNParamsSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, num_layers: O0, num_units: O1, input_size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(num_layers.into(), num_units.into(), input_size.into(), scope) + } + fn build_instance_impl(&self, num_layers: crate::Output, num_units: crate::Output, input_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNNParamsSize", |nd| { + nd.add_input(num_layers); + nd.add_input(num_units); + nd.add_input(input_size); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_proj { + nd.set_attr_int("num_proj", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNParamsSizeInst{op}) + } +} +impl CudnnRNNParamsSizeInst { + /// Returns the 'params_size' output of this 'CudnnRNNParamsSize' operation. + pub fn params_size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CudnnRNNParamsSizeInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CudnnRNNParamsSize::new().build(num_layers, num_units, input_size, scope)`. -pub fn cudnn_rnnparams_size< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - num_layers: O0, - num_units: O1, - input_size: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cudnn_rnnparams_size, O1: ::std::convert::Into, O2: ::std::convert::Into>(num_layers: O0, num_units: O1, input_size: O2, scope: &mut crate::Scope) -> crate::Result { CudnnRNNParamsSize::new().build(num_layers, num_units, input_size, scope) } + /// Builder for the `CudnnRNNParamsToCanonical` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNNParamsToCanonical { @@ -23228,6 +28139,12 @@ pub struct CudnnRNNParamsToCanonical { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNNParamsToCanonical' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNParamsToCanonicalInst { + /// An instance of a fully built CudnnRNNParamsToCanonical Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNNParamsToCanonical { /// Creates a new `CudnnRNNParamsToCanonical`. @@ -23248,28 +28165,19 @@ impl CudnnRNNParamsToCanonical { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -23299,36 +28207,10 @@ impl CudnnRNNParamsToCanonical { } /// Builds the `CudnnRNNParamsToCanonical` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - num_layers: O0, - num_units: O1, - input_size: O2, - params: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - num_layers.into(), - num_units.into(), - input_size.into(), - params.into(), - scope, - ) - } - - fn build_impl( - &self, - num_layers: crate::Output, - num_units: crate::Output, - input_size: crate::Output, - params: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, num_layers: O0, num_units: O1, input_size: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(num_layers.into(), num_units.into(), input_size.into(), params.into(), scope) + } + fn build_impl(&self, num_layers: crate::Output, num_units: crate::Output, input_size: crate::Output, params: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNNParamsToCanonical", |nd| { nd.add_input(num_layers); nd.add_input(num_units); @@ -23337,50 +28219,112 @@ impl CudnnRNNParamsToCanonical { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_params { - nd.set_attr_int("num_params", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params { + nd.set_attr_int("num_params", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CudnnRNNParamsToCanonical` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, num_layers: O0, num_units: O1, input_size: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(num_layers.into(), num_units.into(), input_size.into(), params.into(), scope) + } + fn build_instance_impl(&self, num_layers: crate::Output, num_units: crate::Output, input_size: crate::Output, params: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNNParamsToCanonical", |nd| { + nd.add_input(num_layers); + nd.add_input(num_units); + nd.add_input(input_size); + nd.add_input(params); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params { + nd.set_attr_int("num_params", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNParamsToCanonicalInst{op}) + } +} +impl CudnnRNNParamsToCanonicalInst { + /// Returns a Vector of Outputs for 'weights' output of this CudnnRNNParamsToCanonical operation. + pub fn weights(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_params")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'biases' output of this CudnnRNNParamsToCanonical operation. + pub fn biases(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("num_params")?+1) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_params")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for CudnnRNNParamsToCanonicalInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CudnnRNNParamsToCanonical::new().build(num_layers, num_units, input_size, params, scope)`. -pub fn cudnn_rnnparams_to_canonical< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - num_layers: O0, - num_units: O1, - input_size: O2, - params: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cudnn_rnnparams_to_canonical, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(num_layers: O0, num_units: O1, input_size: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { CudnnRNNParamsToCanonical::new().build(num_layers, num_units, input_size, params, scope) } + /// Builder for the `CudnnRNNParamsToCanonicalV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNNParamsToCanonicalV2 { @@ -23396,6 +28340,12 @@ pub struct CudnnRNNParamsToCanonicalV2 { num_proj: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNNParamsToCanonicalV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNParamsToCanonicalV2Inst { + /// An instance of a fully built CudnnRNNParamsToCanonicalV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNNParamsToCanonicalV2 { /// Creates a new `CudnnRNNParamsToCanonicalV2`. @@ -23410,10 +28360,7 @@ impl CudnnRNNParamsToCanonicalV2 { } /// Sets the `num_params_weights` attribute. - pub fn num_params_weights>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_params_weights>(mut self, value: ArgType) -> Self { self.num_params_weights = ::std::option::Option::Some(value.into()); self } @@ -23425,28 +28372,19 @@ impl CudnnRNNParamsToCanonicalV2 { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -23482,36 +28420,10 @@ impl CudnnRNNParamsToCanonicalV2 { } /// Builds the `CudnnRNNParamsToCanonicalV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - num_layers: O0, - num_units: O1, - input_size: O2, - params: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - num_layers.into(), - num_units.into(), - input_size.into(), - params.into(), - scope, - ) - } - - fn build_impl( - &self, - num_layers: crate::Output, - num_units: crate::Output, - input_size: crate::Output, - params: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, num_layers: O0, num_units: O1, input_size: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(num_layers.into(), num_units.into(), input_size.into(), params.into(), scope) + } + fn build_impl(&self, num_layers: crate::Output, num_units: crate::Output, input_size: crate::Output, params: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNNParamsToCanonicalV2", |nd| { nd.add_input(num_layers); nd.add_input(num_units); @@ -23520,56 +28432,124 @@ impl CudnnRNNParamsToCanonicalV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_params_weights { - nd.set_attr_int("num_params_weights", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_params_biases { - nd.set_attr_int("num_params_biases", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_proj { - nd.set_attr_int("num_proj", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params_weights { + nd.set_attr_int("num_params_weights", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params_biases { + nd.set_attr_int("num_params_biases", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_proj { + nd.set_attr_int("num_proj", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CudnnRNNParamsToCanonicalV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, num_layers: O0, num_units: O1, input_size: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(num_layers.into(), num_units.into(), input_size.into(), params.into(), scope) + } + fn build_instance_impl(&self, num_layers: crate::Output, num_units: crate::Output, input_size: crate::Output, params: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNNParamsToCanonicalV2", |nd| { + nd.add_input(num_layers); + nd.add_input(num_units); + nd.add_input(input_size); + nd.add_input(params); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params_weights { + nd.set_attr_int("num_params_weights", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_params_biases { + nd.set_attr_int("num_params_biases", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_proj { + nd.set_attr_int("num_proj", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNParamsToCanonicalV2Inst{op}) + } +} +impl CudnnRNNParamsToCanonicalV2Inst { + /// Returns a Vector of Outputs for 'weights' output of this CudnnRNNParamsToCanonicalV2 operation. + pub fn weights(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_params_weights")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'biases' output of this CudnnRNNParamsToCanonicalV2 operation. + pub fn biases(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("num_params_weights")?+1) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_params_biases")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for CudnnRNNParamsToCanonicalV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CudnnRNNParamsToCanonicalV2::new().build(num_layers, num_units, input_size, params, scope)`. -pub fn cudnn_rnnparams_to_canonical_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - num_layers: O0, - num_units: O1, - input_size: O2, - params: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cudnn_rnnparams_to_canonical_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(num_layers: O0, num_units: O1, input_size: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { CudnnRNNParamsToCanonicalV2::new().build(num_layers, num_units, input_size, params, scope) } + /// Builder for the `CudnnRNNV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNNV2 { @@ -23583,6 +28563,12 @@ pub struct CudnnRNNV2 { is_training: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNNV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNV2Inst { + /// An instance of a fully built CudnnRNNV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNNV2 { /// Creates a new `CudnnRNNV2`. @@ -23597,28 +28583,19 @@ impl CudnnRNNV2 { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -23654,36 +28631,10 @@ impl CudnnRNNV2 { } /// Builds the `CudnnRNNV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input: O0, - input_h: O1, - input_c: O2, - params: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - input_h.into(), - input_c.into(), - params.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - input_h: crate::Output, - input_c: crate::Output, - params: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), input_h.into(), input_c.into(), params.into(), scope) + } + fn build_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNNV2", |nd| { nd.add_input(input); nd.add_input(input_h); @@ -23692,50 +28643,123 @@ impl CudnnRNNV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.is_training { - nd.set_attr_bool("is_training", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CudnnRNNV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_h.into(), input_c.into(), params.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNNV2", |nd| { + nd.add_input(input); + nd.add_input(input_h); + nd.add_input(input_c); + nd.add_input(params); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNV2Inst{op}) + } +} +impl CudnnRNNV2Inst { + /// Returns the 'output' output of this 'CudnnRNNV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_h' output of this 'CudnnRNNV2' operation. + pub fn output_h(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_c' output of this 'CudnnRNNV2' operation. + pub fn output_c(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'reserve_space' output of this 'CudnnRNNV2' operation. + pub fn reserve_space(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'host_reserved' output of this 'CudnnRNNV2' operation. + pub fn host_reserved(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } +} +impl Into for CudnnRNNV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CudnnRNNV2::new().build(input, input_h, input_c, params, scope)`. -pub fn cudnn_rnnv2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input: O0, - input_h: O1, - input_c: O2, - params: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cudnn_rnnv2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input: O0, input_h: O1, input_c: O2, params: O3, scope: &mut crate::Scope) -> crate::Result { CudnnRNNV2::new().build(input, input_h, input_c, params, scope) } + /// Builder for the `CudnnRNNV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CudnnRNNV3 { @@ -23751,6 +28775,12 @@ pub struct CudnnRNNV3 { time_major: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CudnnRNNV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CudnnRNNV3Inst { + /// An instance of a fully built CudnnRNNV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CudnnRNNV3 { /// Creates a new `CudnnRNNV3`. @@ -23765,28 +28795,19 @@ impl CudnnRNNV3 { } /// Sets the `rnn_mode` attribute. - pub fn rnn_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn rnn_mode>(mut self, value: ArgType) -> Self { self.rnn_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `input_mode` attribute. - pub fn input_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_mode>(mut self, value: ArgType) -> Self { self.input_mode = ::std::option::Option::Some(value.into()); self } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -23834,40 +28855,10 @@ impl CudnnRNNV3 { } /// Builds the `CudnnRNNV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input: O0, - input_h: O1, - input_c: O2, - params: O3, - sequence_lengths: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - input_h.into(), - input_c.into(), - params.into(), - sequence_lengths.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - input_h: crate::Output, - input_c: crate::Output, - params: crate::Output, - sequence_lengths: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, sequence_lengths: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), input_h.into(), input_c.into(), params.into(), sequence_lengths.into(), scope) + } + fn build_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, sequence_lengths: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CudnnRNNV3", |nd| { nd.add_input(input); nd.add_input(input_h); @@ -23877,58 +28868,136 @@ impl CudnnRNNV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.rnn_mode { - nd.set_attr_string("rnn_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.input_mode { - nd.set_attr_string("input_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } - if let ::std::option::Option::Some(value) = &self.dropout { - nd.set_attr_float("dropout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_proj { - nd.set_attr_int("num_proj", *value)?; - } - if let ::std::option::Option::Some(value) = &self.is_training { - nd.set_attr_bool("is_training", *value)?; - } - if let ::std::option::Option::Some(value) = &self.time_major { - nd.set_attr_bool("time_major", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_proj { + nd.set_attr_int("num_proj", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + if let ::std::option::Option::Some(value) = &self.time_major { + nd.set_attr_bool("time_major", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `CudnnRNNV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, input_h: O1, input_c: O2, params: O3, sequence_lengths: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_h.into(), input_c.into(), params.into(), sequence_lengths.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_h: crate::Output, input_c: crate::Output, params: crate::Output, sequence_lengths: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CudnnRNNV3", |nd| { + nd.add_input(input); + nd.add_input(input_h); + nd.add_input(input_c); + nd.add_input(params); + nd.add_input(sequence_lengths); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.rnn_mode { + nd.set_attr_string("rnn_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.input_mode { + nd.set_attr_string("input_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + if let ::std::option::Option::Some(value) = &self.dropout { + nd.set_attr_float("dropout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_proj { + nd.set_attr_int("num_proj", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + if let ::std::option::Option::Some(value) = &self.time_major { + nd.set_attr_bool("time_major", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CudnnRNNV3Inst{op}) + } +} +impl CudnnRNNV3Inst { + /// Returns the 'output' output of this 'CudnnRNNV3' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_h' output of this 'CudnnRNNV3' operation. + pub fn output_h(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_c' output of this 'CudnnRNNV3' operation. + pub fn output_c(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'reserve_space' output of this 'CudnnRNNV3' operation. + pub fn reserve_space(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'host_reserved' output of this 'CudnnRNNV3' operation. + pub fn host_reserved(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } +} +impl Into for CudnnRNNV3Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `CudnnRNNV3::new().build(input, input_h, input_c, params, sequence_lengths, scope)`. -pub fn cudnn_rnnv3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input: O0, - input_h: O1, - input_c: O2, - params: O3, - sequence_lengths: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cudnn_rnnv3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input: O0, input_h: O1, input_c: O2, params: O3, sequence_lengths: O4, scope: &mut crate::Scope) -> crate::Result { CudnnRNNV3::new().build(input, input_h, input_c, params, sequence_lengths, scope) } + /// Builder for the `Cumprod` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Cumprod { @@ -23938,6 +29007,12 @@ pub struct Cumprod { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Cumprod' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CumprodInst { + /// An instance of a fully built Cumprod Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Cumprod { /// Creates a new `Cumprod`. @@ -23976,55 +29051,79 @@ impl Cumprod { } /// Builds the `Cumprod` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), axis.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Cumprod", |nd| { nd.add_input(x); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.exclusive { - nd.set_attr_bool("exclusive", *value)?; - } - if let ::std::option::Option::Some(value) = &self.reverse { - nd.set_attr_bool("reverse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.exclusive { + nd.set_attr_bool("exclusive", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reverse { + nd.set_attr_bool("reverse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Cumprod` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), axis.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Cumprod", |nd| { + nd.add_input(x); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.exclusive { + nd.set_attr_bool("exclusive", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reverse { + nd.set_attr_bool("reverse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CumprodInst{op}) + } +} +impl CumprodInst { + /// Returns the 'out' output of this 'Cumprod' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CumprodInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Cumprod::new().build(x, axis, scope)`. -pub fn cumprod, O1: ::std::convert::Into>( - x: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cumprod, O1: ::std::convert::Into>(x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { Cumprod::new().build(x, axis, scope) } + /// Builder for the `Cumsum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Cumsum { @@ -24034,6 +29133,12 @@ pub struct Cumsum { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Cumsum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CumsumInst { + /// An instance of a fully built Cumsum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Cumsum { /// Creates a new `Cumsum`. @@ -24072,55 +29177,79 @@ impl Cumsum { } /// Builds the `Cumsum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), axis.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Cumsum", |nd| { nd.add_input(x); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.exclusive { - nd.set_attr_bool("exclusive", *value)?; - } - if let ::std::option::Option::Some(value) = &self.reverse { - nd.set_attr_bool("reverse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.exclusive { + nd.set_attr_bool("exclusive", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reverse { + nd.set_attr_bool("reverse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Cumsum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), axis.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Cumsum", |nd| { + nd.add_input(x); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.exclusive { + nd.set_attr_bool("exclusive", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reverse { + nd.set_attr_bool("reverse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CumsumInst{op}) + } +} +impl CumsumInst { + /// Returns the 'out' output of this 'Cumsum' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CumsumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Cumsum::new().build(x, axis, scope)`. -pub fn cumsum, O1: ::std::convert::Into>( - x: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cumsum, O1: ::std::convert::Into>(x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { Cumsum::new().build(x, axis, scope) } + /// Builder for the `CumulativeLogsumexp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct CumulativeLogsumexp { @@ -24130,6 +29259,12 @@ pub struct CumulativeLogsumexp { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'CumulativeLogsumexp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct CumulativeLogsumexpInst { + /// An instance of a fully built CumulativeLogsumexp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl CumulativeLogsumexp { /// Creates a new `CumulativeLogsumexp`. @@ -24168,58 +29303,79 @@ impl CumulativeLogsumexp { } /// Builds the `CumulativeLogsumexp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), axis.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("CumulativeLogsumexp", |nd| { nd.add_input(x); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.exclusive { - nd.set_attr_bool("exclusive", *value)?; - } - if let ::std::option::Option::Some(value) = &self.reverse { - nd.set_attr_bool("reverse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.exclusive { + nd.set_attr_bool("exclusive", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reverse { + nd.set_attr_bool("reverse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `CumulativeLogsumexp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), axis.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("CumulativeLogsumexp", |nd| { + nd.add_input(x); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.exclusive { + nd.set_attr_bool("exclusive", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reverse { + nd.set_attr_bool("reverse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(CumulativeLogsumexpInst{op}) + } +} +impl CumulativeLogsumexpInst { + /// Returns the 'out' output of this 'CumulativeLogsumexp' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for CumulativeLogsumexpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `CumulativeLogsumexp::new().build(x, axis, scope)`. -pub fn cumulative_logsumexp< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn cumulative_logsumexp, O1: ::std::convert::Into>(x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { CumulativeLogsumexp::new().build(x, axis, scope) } + /// Builder for the `DataFormatDimMap` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DataFormatDimMap { @@ -24228,6 +29384,12 @@ pub struct DataFormatDimMap { dst_format: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DataFormatDimMap' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DataFormatDimMapInst { + /// An instance of a fully built DataFormatDimMap Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DataFormatDimMap { /// Creates a new `DataFormatDimMap`. @@ -24242,19 +29404,13 @@ impl DataFormatDimMap { } /// Sets the `src_format` attribute. - pub fn src_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn src_format>(mut self, value: ArgType) -> Self { self.src_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dst_format` attribute. - pub fn dst_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn dst_format>(mut self, value: ArgType) -> Self { self.dst_format = ::std::option::Option::Some(value.into()); self } @@ -24266,45 +29422,71 @@ impl DataFormatDimMap { } /// Builds the `DataFormatDimMap` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DataFormatDimMap", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.src_format { - nd.set_attr_string("src_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dst_format { - nd.set_attr_string("dst_format", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.src_format { + nd.set_attr_string("src_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dst_format { + nd.set_attr_string("dst_format", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DataFormatDimMap` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DataFormatDimMap", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.src_format { + nd.set_attr_string("src_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dst_format { + nd.set_attr_string("dst_format", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DataFormatDimMapInst{op}) + } +} +impl DataFormatDimMapInst { + /// Returns the 'y' output of this 'DataFormatDimMap' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DataFormatDimMapInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DataFormatDimMap::new().build(x, scope)`. -pub fn data_format_dim_map>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn data_format_dim_map>(x: O0, scope: &mut crate::Scope) -> crate::Result { DataFormatDimMap::new().build(x, scope) } + /// Builder for the `DataFormatVecPermute` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DataFormatVecPermute { @@ -24313,6 +29495,12 @@ pub struct DataFormatVecPermute { dst_format: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DataFormatVecPermute' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DataFormatVecPermuteInst { + /// An instance of a fully built DataFormatVecPermute Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DataFormatVecPermute { /// Creates a new `DataFormatVecPermute`. @@ -24327,19 +29515,13 @@ impl DataFormatVecPermute { } /// Sets the `src_format` attribute. - pub fn src_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn src_format>(mut self, value: ArgType) -> Self { self.src_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dst_format` attribute. - pub fn dst_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn dst_format>(mut self, value: ArgType) -> Self { self.dst_format = ::std::option::Option::Some(value.into()); self } @@ -24351,45 +29533,71 @@ impl DataFormatVecPermute { } /// Builds the `DataFormatVecPermute` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DataFormatVecPermute", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.src_format { - nd.set_attr_string("src_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dst_format { - nd.set_attr_string("dst_format", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.src_format { + nd.set_attr_string("src_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dst_format { + nd.set_attr_string("dst_format", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DataFormatVecPermute` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DataFormatVecPermute", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.src_format { + nd.set_attr_string("src_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dst_format { + nd.set_attr_string("dst_format", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DataFormatVecPermuteInst{op}) + } +} +impl DataFormatVecPermuteInst { + /// Returns the 'y' output of this 'DataFormatVecPermute' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DataFormatVecPermuteInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DataFormatVecPermute::new().build(x, scope)`. -pub fn data_format_vec_permute>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn data_format_vec_permute>(x: O0, scope: &mut crate::Scope) -> crate::Result { DataFormatVecPermute::new().build(x, scope) } + /// Builder for the `DataServiceDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DataServiceDataset { @@ -24400,6 +29608,12 @@ pub struct DataServiceDataset { target_workers: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DataServiceDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DataServiceDatasetInst { + /// An instance of a fully built DataServiceDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DataServiceDataset { /// Creates a new `DataServiceDataset`. @@ -24408,46 +29622,31 @@ impl DataServiceDataset { } /// Sets the `task_refresh_interval_hint_ms` attribute. - pub fn task_refresh_interval_hint_ms>( - mut self, - value: ArgType, - ) -> Self { + pub fn task_refresh_interval_hint_ms>(mut self, value: ArgType) -> Self { self.task_refresh_interval_hint_ms = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `data_transfer_protocol` attribute. - pub fn data_transfer_protocol>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_transfer_protocol>(mut self, value: ArgType) -> Self { self.data_transfer_protocol = ::std::option::Option::Some(value.into()); self } /// Sets the `target_workers` attribute. - pub fn target_workers>( - mut self, - value: ArgType, - ) -> Self { + pub fn target_workers>(mut self, value: ArgType) -> Self { self.target_workers = ::std::option::Option::Some(value.into()); self } @@ -24459,48 +29658,10 @@ impl DataServiceDataset { } /// Builds the `DataServiceDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - dataset_id: O0, - processing_mode: O1, - address: O2, - protocol: O3, - job_name: O4, - max_outstanding_requests: O5, - iteration_counter: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - dataset_id.into(), - processing_mode.into(), - address.into(), - protocol.into(), - job_name.into(), - max_outstanding_requests.into(), - iteration_counter.into(), - scope, - ) - } - - fn build_impl( - &self, - dataset_id: crate::Output, - processing_mode: crate::Output, - address: crate::Output, - protocol: crate::Output, - job_name: crate::Output, - max_outstanding_requests: crate::Output, - iteration_counter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, dataset_id: O0, processing_mode: O1, address: O2, protocol: O3, job_name: O4, max_outstanding_requests: O5, iteration_counter: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(dataset_id.into(), processing_mode.into(), address.into(), protocol.into(), job_name.into(), max_outstanding_requests.into(), iteration_counter.into(), scope) + } + fn build_impl(&self, dataset_id: crate::Output, processing_mode: crate::Output, address: crate::Output, protocol: crate::Output, job_name: crate::Output, max_outstanding_requests: crate::Output, iteration_counter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DataServiceDataset", |nd| { nd.add_input(dataset_id); nd.add_input(processing_mode); @@ -24512,56 +29673,80 @@ impl DataServiceDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.task_refresh_interval_hint_ms { - nd.set_attr_int("task_refresh_interval_hint_ms", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_transfer_protocol { - nd.set_attr_string("data_transfer_protocol", value)?; - } - if let ::std::option::Option::Some(value) = &self.target_workers { - nd.set_attr_string("target_workers", value)?; - } + if let ::std::option::Option::Some(value) = &self.task_refresh_interval_hint_ms { + nd.set_attr_int("task_refresh_interval_hint_ms", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_transfer_protocol { + nd.set_attr_string("data_transfer_protocol", value)?; + } + if let ::std::option::Option::Some(value) = &self.target_workers { + nd.set_attr_string("target_workers", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DataServiceDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, dataset_id: O0, processing_mode: O1, address: O2, protocol: O3, job_name: O4, max_outstanding_requests: O5, iteration_counter: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dataset_id.into(), processing_mode.into(), address.into(), protocol.into(), job_name.into(), max_outstanding_requests.into(), iteration_counter.into(), scope) + } + fn build_instance_impl(&self, dataset_id: crate::Output, processing_mode: crate::Output, address: crate::Output, protocol: crate::Output, job_name: crate::Output, max_outstanding_requests: crate::Output, iteration_counter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DataServiceDataset", |nd| { + nd.add_input(dataset_id); + nd.add_input(processing_mode); + nd.add_input(address); + nd.add_input(protocol); + nd.add_input(job_name); + nd.add_input(max_outstanding_requests); + nd.add_input(iteration_counter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.task_refresh_interval_hint_ms { + nd.set_attr_int("task_refresh_interval_hint_ms", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_transfer_protocol { + nd.set_attr_string("data_transfer_protocol", value)?; + } + if let ::std::option::Option::Some(value) = &self.target_workers { + nd.set_attr_string("target_workers", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DataServiceDatasetInst{op}) + } +} +impl DataServiceDatasetInst { + /// Returns the 'handle' output of this 'DataServiceDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DataServiceDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DataServiceDataset::new().build(dataset_id, processing_mode, address, protocol, job_name, max_outstanding_requests, iteration_counter, scope)`. -pub fn data_service_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - dataset_id: O0, - processing_mode: O1, - address: O2, - protocol: O3, - job_name: O4, - max_outstanding_requests: O5, - iteration_counter: O6, - scope: &mut crate::Scope, -) -> crate::Result { - DataServiceDataset::new().build( - dataset_id, - processing_mode, - address, - protocol, - job_name, - max_outstanding_requests, - iteration_counter, - scope, - ) +pub fn data_service_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(dataset_id: O0, processing_mode: O1, address: O2, protocol: O3, job_name: O4, max_outstanding_requests: O5, iteration_counter: O6, scope: &mut crate::Scope) -> crate::Result { + DataServiceDataset::new().build(dataset_id, processing_mode, address, protocol, job_name, max_outstanding_requests, iteration_counter, scope) } + /// Builder for the `DataServiceDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DataServiceDatasetV2 { @@ -24572,6 +29757,12 @@ pub struct DataServiceDatasetV2 { target_workers: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DataServiceDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DataServiceDatasetV2Inst { + /// An instance of a fully built DataServiceDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DataServiceDatasetV2 { /// Creates a new `DataServiceDatasetV2`. @@ -24580,46 +29771,31 @@ impl DataServiceDatasetV2 { } /// Sets the `task_refresh_interval_hint_ms` attribute. - pub fn task_refresh_interval_hint_ms>( - mut self, - value: ArgType, - ) -> Self { + pub fn task_refresh_interval_hint_ms>(mut self, value: ArgType) -> Self { self.task_refresh_interval_hint_ms = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `data_transfer_protocol` attribute. - pub fn data_transfer_protocol>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_transfer_protocol>(mut self, value: ArgType) -> Self { self.data_transfer_protocol = ::std::option::Option::Some(value.into()); self } /// Sets the `target_workers` attribute. - pub fn target_workers>( - mut self, - value: ArgType, - ) -> Self { + pub fn target_workers>(mut self, value: ArgType) -> Self { self.target_workers = ::std::option::Option::Some(value.into()); self } @@ -24631,56 +29807,10 @@ impl DataServiceDatasetV2 { } /// Builds the `DataServiceDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - dataset_id: O0, - processing_mode: O1, - address: O2, - protocol: O3, - job_name: O4, - consumer_index: O5, - num_consumers: O6, - max_outstanding_requests: O7, - iteration_counter: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - dataset_id.into(), - processing_mode.into(), - address.into(), - protocol.into(), - job_name.into(), - consumer_index.into(), - num_consumers.into(), - max_outstanding_requests.into(), - iteration_counter.into(), - scope, - ) - } - - fn build_impl( - &self, - dataset_id: crate::Output, - processing_mode: crate::Output, - address: crate::Output, - protocol: crate::Output, - job_name: crate::Output, - consumer_index: crate::Output, - num_consumers: crate::Output, - max_outstanding_requests: crate::Output, - iteration_counter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, dataset_id: O0, processing_mode: O1, address: O2, protocol: O3, job_name: O4, consumer_index: O5, num_consumers: O6, max_outstanding_requests: O7, iteration_counter: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(dataset_id.into(), processing_mode.into(), address.into(), protocol.into(), job_name.into(), consumer_index.into(), num_consumers.into(), max_outstanding_requests.into(), iteration_counter.into(), scope) + } + fn build_impl(&self, dataset_id: crate::Output, processing_mode: crate::Output, address: crate::Output, protocol: crate::Output, job_name: crate::Output, consumer_index: crate::Output, num_consumers: crate::Output, max_outstanding_requests: crate::Output, iteration_counter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DataServiceDatasetV2", |nd| { nd.add_input(dataset_id); nd.add_input(processing_mode); @@ -24694,62 +29824,82 @@ impl DataServiceDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.task_refresh_interval_hint_ms { - nd.set_attr_int("task_refresh_interval_hint_ms", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_transfer_protocol { - nd.set_attr_string("data_transfer_protocol", value)?; - } - if let ::std::option::Option::Some(value) = &self.target_workers { - nd.set_attr_string("target_workers", value)?; - } + if let ::std::option::Option::Some(value) = &self.task_refresh_interval_hint_ms { + nd.set_attr_int("task_refresh_interval_hint_ms", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_transfer_protocol { + nd.set_attr_string("data_transfer_protocol", value)?; + } + if let ::std::option::Option::Some(value) = &self.target_workers { + nd.set_attr_string("target_workers", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DataServiceDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, dataset_id: O0, processing_mode: O1, address: O2, protocol: O3, job_name: O4, consumer_index: O5, num_consumers: O6, max_outstanding_requests: O7, iteration_counter: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dataset_id.into(), processing_mode.into(), address.into(), protocol.into(), job_name.into(), consumer_index.into(), num_consumers.into(), max_outstanding_requests.into(), iteration_counter.into(), scope) + } + fn build_instance_impl(&self, dataset_id: crate::Output, processing_mode: crate::Output, address: crate::Output, protocol: crate::Output, job_name: crate::Output, consumer_index: crate::Output, num_consumers: crate::Output, max_outstanding_requests: crate::Output, iteration_counter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DataServiceDatasetV2", |nd| { + nd.add_input(dataset_id); + nd.add_input(processing_mode); + nd.add_input(address); + nd.add_input(protocol); + nd.add_input(job_name); + nd.add_input(consumer_index); + nd.add_input(num_consumers); + nd.add_input(max_outstanding_requests); + nd.add_input(iteration_counter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.task_refresh_interval_hint_ms { + nd.set_attr_int("task_refresh_interval_hint_ms", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_transfer_protocol { + nd.set_attr_string("data_transfer_protocol", value)?; + } + if let ::std::option::Option::Some(value) = &self.target_workers { + nd.set_attr_string("target_workers", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DataServiceDatasetV2Inst{op}) + } +} +impl DataServiceDatasetV2Inst { + /// Returns the 'handle' output of this 'DataServiceDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DataServiceDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DataServiceDatasetV2::new().build(dataset_id, processing_mode, address, protocol, job_name, consumer_index, num_consumers, max_outstanding_requests, iteration_counter, scope)`. -pub fn data_service_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - dataset_id: O0, - processing_mode: O1, - address: O2, - protocol: O3, - job_name: O4, - consumer_index: O5, - num_consumers: O6, - max_outstanding_requests: O7, - iteration_counter: O8, - scope: &mut crate::Scope, -) -> crate::Result { - DataServiceDatasetV2::new().build( - dataset_id, - processing_mode, - address, - protocol, - job_name, - consumer_index, - num_consumers, - max_outstanding_requests, - iteration_counter, - scope, - ) +pub fn data_service_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(dataset_id: O0, processing_mode: O1, address: O2, protocol: O3, job_name: O4, consumer_index: O5, num_consumers: O6, max_outstanding_requests: O7, iteration_counter: O8, scope: &mut crate::Scope) -> crate::Result { + DataServiceDatasetV2::new().build(dataset_id, processing_mode, address, protocol, job_name, consumer_index, num_consumers, max_outstanding_requests, iteration_counter, scope) } + /// Builder for the `DataServiceDatasetV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DataServiceDatasetV3 { @@ -24762,6 +29912,12 @@ pub struct DataServiceDatasetV3 { uncompress_fn: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DataServiceDatasetV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DataServiceDatasetV3Inst { + /// An instance of a fully built DataServiceDatasetV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DataServiceDatasetV3 { /// Creates a new `DataServiceDatasetV3`. @@ -24770,46 +29926,31 @@ impl DataServiceDatasetV3 { } /// Sets the `task_refresh_interval_hint_ms` attribute. - pub fn task_refresh_interval_hint_ms>( - mut self, - value: ArgType, - ) -> Self { + pub fn task_refresh_interval_hint_ms>(mut self, value: ArgType) -> Self { self.task_refresh_interval_hint_ms = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `data_transfer_protocol` attribute. - pub fn data_transfer_protocol>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_transfer_protocol>(mut self, value: ArgType) -> Self { self.data_transfer_protocol = ::std::option::Option::Some(value.into()); self } /// Sets the `target_workers` attribute. - pub fn target_workers>( - mut self, - value: ArgType, - ) -> Self { + pub fn target_workers>(mut self, value: ArgType) -> Self { self.target_workers = ::std::option::Option::Some(value.into()); self } @@ -24821,10 +29962,7 @@ impl DataServiceDatasetV3 { } /// Sets the `uncompress_fn` attribute. - pub fn uncompress_fn>( - mut self, - value: ArgType, - ) -> Self { + pub fn uncompress_fn>(mut self, value: ArgType) -> Self { self.uncompress_fn = ::std::option::Option::Some(value.into()); self } @@ -24836,56 +29974,10 @@ impl DataServiceDatasetV3 { } /// Builds the `DataServiceDatasetV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - dataset_id: O0, - processing_mode: O1, - address: O2, - protocol: O3, - job_name: O4, - consumer_index: O5, - num_consumers: O6, - max_outstanding_requests: O7, - iteration_counter: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - dataset_id.into(), - processing_mode.into(), - address.into(), - protocol.into(), - job_name.into(), - consumer_index.into(), - num_consumers.into(), - max_outstanding_requests.into(), - iteration_counter.into(), - scope, - ) - } - - fn build_impl( - &self, - dataset_id: crate::Output, - processing_mode: crate::Output, - address: crate::Output, - protocol: crate::Output, - job_name: crate::Output, - consumer_index: crate::Output, - num_consumers: crate::Output, - max_outstanding_requests: crate::Output, - iteration_counter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, dataset_id: O0, processing_mode: O1, address: O2, protocol: O3, job_name: O4, consumer_index: O5, num_consumers: O6, max_outstanding_requests: O7, iteration_counter: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(dataset_id.into(), processing_mode.into(), address.into(), protocol.into(), job_name.into(), consumer_index.into(), num_consumers.into(), max_outstanding_requests.into(), iteration_counter.into(), scope) + } + fn build_impl(&self, dataset_id: crate::Output, processing_mode: crate::Output, address: crate::Output, protocol: crate::Output, job_name: crate::Output, consumer_index: crate::Output, num_consumers: crate::Output, max_outstanding_requests: crate::Output, iteration_counter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DataServiceDatasetV3", |nd| { nd.add_input(dataset_id); nd.add_input(processing_mode); @@ -24899,73 +29991,105 @@ impl DataServiceDatasetV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.task_refresh_interval_hint_ms { - nd.set_attr_int("task_refresh_interval_hint_ms", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_transfer_protocol { - nd.set_attr_string("data_transfer_protocol", value)?; - } - if let ::std::option::Option::Some(value) = &self.target_workers { - nd.set_attr_string("target_workers", value)?; - } - if let ::std::option::Option::Some(value) = &self.uncompress { - nd.set_attr_bool("uncompress", *value)?; - } - if let ::std::option::Option::Some(value) = &self.uncompress_fn { - nd.set_attr_string("uncompress_fn", value)?; - } + if let ::std::option::Option::Some(value) = &self.task_refresh_interval_hint_ms { + nd.set_attr_int("task_refresh_interval_hint_ms", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_transfer_protocol { + nd.set_attr_string("data_transfer_protocol", value)?; + } + if let ::std::option::Option::Some(value) = &self.target_workers { + nd.set_attr_string("target_workers", value)?; + } + if let ::std::option::Option::Some(value) = &self.uncompress { + nd.set_attr_bool("uncompress", *value)?; + } + if let ::std::option::Option::Some(value) = &self.uncompress_fn { + nd.set_attr_string("uncompress_fn", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DataServiceDatasetV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, dataset_id: O0, processing_mode: O1, address: O2, protocol: O3, job_name: O4, consumer_index: O5, num_consumers: O6, max_outstanding_requests: O7, iteration_counter: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dataset_id.into(), processing_mode.into(), address.into(), protocol.into(), job_name.into(), consumer_index.into(), num_consumers.into(), max_outstanding_requests.into(), iteration_counter.into(), scope) + } + fn build_instance_impl(&self, dataset_id: crate::Output, processing_mode: crate::Output, address: crate::Output, protocol: crate::Output, job_name: crate::Output, consumer_index: crate::Output, num_consumers: crate::Output, max_outstanding_requests: crate::Output, iteration_counter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DataServiceDatasetV3", |nd| { + nd.add_input(dataset_id); + nd.add_input(processing_mode); + nd.add_input(address); + nd.add_input(protocol); + nd.add_input(job_name); + nd.add_input(consumer_index); + nd.add_input(num_consumers); + nd.add_input(max_outstanding_requests); + nd.add_input(iteration_counter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.task_refresh_interval_hint_ms { + nd.set_attr_int("task_refresh_interval_hint_ms", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_transfer_protocol { + nd.set_attr_string("data_transfer_protocol", value)?; + } + if let ::std::option::Option::Some(value) = &self.target_workers { + nd.set_attr_string("target_workers", value)?; + } + if let ::std::option::Option::Some(value) = &self.uncompress { + nd.set_attr_bool("uncompress", *value)?; + } + if let ::std::option::Option::Some(value) = &self.uncompress_fn { + nd.set_attr_string("uncompress_fn", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DataServiceDatasetV3Inst{op}) + } +} +impl DataServiceDatasetV3Inst { + /// Returns the 'handle' output of this 'DataServiceDatasetV3' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DataServiceDatasetV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DataServiceDatasetV3::new().build(dataset_id, processing_mode, address, protocol, job_name, consumer_index, num_consumers, max_outstanding_requests, iteration_counter, scope)`. -pub fn data_service_dataset_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - dataset_id: O0, - processing_mode: O1, - address: O2, - protocol: O3, - job_name: O4, - consumer_index: O5, - num_consumers: O6, - max_outstanding_requests: O7, - iteration_counter: O8, - scope: &mut crate::Scope, -) -> crate::Result { - DataServiceDatasetV3::new().build( - dataset_id, - processing_mode, - address, - protocol, - job_name, - consumer_index, - num_consumers, - max_outstanding_requests, - iteration_counter, - scope, - ) +pub fn data_service_dataset_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(dataset_id: O0, processing_mode: O1, address: O2, protocol: O3, job_name: O4, consumer_index: O5, num_consumers: O6, max_outstanding_requests: O7, iteration_counter: O8, scope: &mut crate::Scope) -> crate::Result { + DataServiceDatasetV3::new().build(dataset_id, processing_mode, address, protocol, job_name, consumer_index, num_consumers, max_outstanding_requests, iteration_counter, scope) } + /// Builder for the `DatasetCardinality` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DatasetCardinality { control_inputs: ::std::vec::Vec, } +/// An instance of 'DatasetCardinality' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DatasetCardinalityInst { + /// An instance of a fully built DatasetCardinality Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DatasetCardinality { /// Creates a new `DatasetCardinality`. @@ -24980,19 +30104,10 @@ impl DatasetCardinality { } /// Builds the `DatasetCardinality` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DatasetCardinality", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { @@ -25001,20 +30116,52 @@ impl DatasetCardinality { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DatasetCardinality` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DatasetCardinality", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DatasetCardinalityInst{op}) + } +} +impl DatasetCardinalityInst { + /// Returns the 'cardinality' output of this 'DatasetCardinality' operation. + pub fn cardinality(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DatasetCardinalityInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DatasetCardinality::new().build(input_dataset, scope)`. -pub fn dataset_cardinality>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dataset_cardinality>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { DatasetCardinality::new().build(input_dataset, scope) } + /// Builder for the `DatasetFromGraph` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DatasetFromGraph { control_inputs: ::std::vec::Vec, } +/// An instance of 'DatasetFromGraph' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DatasetFromGraphInst { + /// An instance of a fully built DatasetFromGraph Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DatasetFromGraph { /// Creates a new `DatasetFromGraph`. @@ -25029,19 +30176,10 @@ impl DatasetFromGraph { } /// Builds the `DatasetFromGraph` operation. - pub fn build>( - &self, - graph_def: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, graph_def: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(graph_def.into(), scope) } - - fn build_impl( - &self, - graph_def: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, graph_def: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DatasetFromGraph", |nd| { nd.add_input(graph_def); for op in &self.control_inputs { @@ -25050,15 +30188,41 @@ impl DatasetFromGraph { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DatasetFromGraph` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, graph_def: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(graph_def.into(), scope) + } + fn build_instance_impl(&self, graph_def: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DatasetFromGraph", |nd| { + nd.add_input(graph_def); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DatasetFromGraphInst{op}) + } +} +impl DatasetFromGraphInst { + /// Returns the 'handle' output of this 'DatasetFromGraph' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DatasetFromGraphInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DatasetFromGraph::new().build(graph_def, scope)`. -pub fn dataset_from_graph>( - graph_def: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dataset_from_graph>(graph_def: O0, scope: &mut crate::Scope) -> crate::Result { DatasetFromGraph::new().build(graph_def, scope) } + /// Builder for the `DatasetToGraph` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DatasetToGraph { @@ -25067,6 +30231,12 @@ pub struct DatasetToGraph { strip_device_assignment: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DatasetToGraph' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DatasetToGraphInst { + /// An instance of a fully built DatasetToGraph Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DatasetToGraph { /// Creates a new `DatasetToGraph`. @@ -25075,12 +30245,7 @@ impl DatasetToGraph { } /// Sets the `stateful_whitelist` attribute. - pub fn stateful_whitelist< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn stateful_whitelist>>(mut self, value: ArgType) -> Self { self.stateful_whitelist = ::std::option::Option::Some(value.into()); self } @@ -25092,10 +30257,7 @@ impl DatasetToGraph { } /// Sets the `strip_device_assignment` attribute. - pub fn strip_device_assignment>( - mut self, - value: ArgType, - ) -> Self { + pub fn strip_device_assignment>(mut self, value: ArgType) -> Self { self.strip_device_assignment = ::std::option::Option::Some(value.into()); self } @@ -25107,45 +30269,71 @@ impl DatasetToGraph { } /// Builds the `DatasetToGraph` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DatasetToGraph", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.stateful_whitelist { - nd.set_attr_string_list("stateful_whitelist", value)?; - } - if let ::std::option::Option::Some(value) = &self.allow_stateful { - nd.set_attr_bool("allow_stateful", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strip_device_assignment { - nd.set_attr_bool("strip_device_assignment", *value)?; - } + if let ::std::option::Option::Some(value) = &self.stateful_whitelist { + nd.set_attr_string_list("stateful_whitelist", value)?; + } + if let ::std::option::Option::Some(value) = &self.allow_stateful { + nd.set_attr_bool("allow_stateful", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strip_device_assignment { + nd.set_attr_bool("strip_device_assignment", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DatasetToGraph` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DatasetToGraph", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.stateful_whitelist { + nd.set_attr_string_list("stateful_whitelist", value)?; + } + if let ::std::option::Option::Some(value) = &self.allow_stateful { + nd.set_attr_bool("allow_stateful", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strip_device_assignment { + nd.set_attr_bool("strip_device_assignment", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DatasetToGraphInst{op}) + } +} +impl DatasetToGraphInst { + /// Returns the 'graph' output of this 'DatasetToGraph' operation. + pub fn graph(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DatasetToGraphInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DatasetToGraph::new().build(input_dataset, scope)`. -pub fn dataset_to_graph>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dataset_to_graph>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { DatasetToGraph::new().build(input_dataset, scope) } + /// Builder for the `DatasetToGraphV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DatasetToGraphV2 { @@ -25153,6 +30341,12 @@ pub struct DatasetToGraphV2 { strip_device_assignment: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DatasetToGraphV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DatasetToGraphV2Inst { + /// An instance of a fully built DatasetToGraphV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DatasetToGraphV2 { /// Creates a new `DatasetToGraphV2`. @@ -25161,19 +30355,13 @@ impl DatasetToGraphV2 { } /// Sets the `external_state_policy` attribute. - pub fn external_state_policy>( - mut self, - value: ArgType, - ) -> Self { + pub fn external_state_policy>(mut self, value: ArgType) -> Self { self.external_state_policy = ::std::option::Option::Some(value.into()); self } /// Sets the `strip_device_assignment` attribute. - pub fn strip_device_assignment>( - mut self, - value: ArgType, - ) -> Self { + pub fn strip_device_assignment>(mut self, value: ArgType) -> Self { self.strip_device_assignment = ::std::option::Option::Some(value.into()); self } @@ -25185,42 +30373,65 @@ impl DatasetToGraphV2 { } /// Builds the `DatasetToGraphV2` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DatasetToGraphV2", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.external_state_policy { - nd.set_attr_int("external_state_policy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strip_device_assignment { - nd.set_attr_bool("strip_device_assignment", *value)?; - } + if let ::std::option::Option::Some(value) = &self.external_state_policy { + nd.set_attr_int("external_state_policy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strip_device_assignment { + nd.set_attr_bool("strip_device_assignment", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DatasetToGraphV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DatasetToGraphV2", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.external_state_policy { + nd.set_attr_int("external_state_policy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strip_device_assignment { + nd.set_attr_bool("strip_device_assignment", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DatasetToGraphV2Inst{op}) + } +} +impl DatasetToGraphV2Inst { + /// Returns the 'graph' output of this 'DatasetToGraphV2' operation. + pub fn graph(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DatasetToGraphV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DatasetToGraphV2::new().build(input_dataset, scope)`. -pub fn dataset_to_graph_v2>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dataset_to_graph_v2>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { DatasetToGraphV2::new().build(input_dataset, scope) } + /// Builder for the `DatasetToSingleElement` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DatasetToSingleElement { @@ -25229,6 +30440,12 @@ pub struct DatasetToSingleElement { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DatasetToSingleElement' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DatasetToSingleElementInst { + /// An instance of a fully built DatasetToSingleElement Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DatasetToSingleElement { /// Creates a new `DatasetToSingleElement`. @@ -25237,28 +30454,19 @@ impl DatasetToSingleElement { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -25270,50 +30478,82 @@ impl DatasetToSingleElement { } /// Builds the `DatasetToSingleElement` operation. - pub fn build>( - &self, - dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(dataset.into(), scope) } - - fn build_impl( - &self, - dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DatasetToSingleElement", |nd| { nd.add_input(dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DatasetToSingleElement` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dataset.into(), scope) + } + fn build_instance_impl(&self, dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DatasetToSingleElement", |nd| { + nd.add_input(dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DatasetToSingleElementInst{op}) + } +} +impl DatasetToSingleElementInst { + /// Returns the 'components' output of this 'DatasetToSingleElement' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DatasetToSingleElementInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DatasetToSingleElement::new().build(dataset, scope)`. -pub fn dataset_to_single_element>( - dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dataset_to_single_element>(dataset: O0, scope: &mut crate::Scope) -> crate::Result { DatasetToSingleElement::new().build(dataset, scope) } + /// Builder for the `DatasetToTFRecord` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DatasetToTFRecord { control_inputs: ::std::vec::Vec, } +/// An instance of 'DatasetToTFRecord' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DatasetToTFRecordInst { + /// An instance of a fully built DatasetToTFRecord Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DatasetToTFRecord { /// Creates a new `DatasetToTFRecord`. @@ -25328,32 +30568,10 @@ impl DatasetToTFRecord { } /// Builds the `DatasetToTFRecord` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - filename: O1, - compression_type: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - filename.into(), - compression_type.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - filename: crate::Output, - compression_type: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, filename: O1, compression_type: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), filename.into(), compression_type.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, filename: crate::Output, compression_type: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DatasetToTFRecord", |nd| { nd.add_input(input_dataset); nd.add_input(filename); @@ -25364,27 +30582,48 @@ impl DatasetToTFRecord { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DatasetToTFRecord` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, filename: O1, compression_type: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), filename.into(), compression_type.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, filename: crate::Output, compression_type: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DatasetToTFRecord", |nd| { + nd.add_input(input_dataset); + nd.add_input(filename); + nd.add_input(compression_type); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DatasetToTFRecordInst{op}) + } +} +impl DatasetToTFRecordInst { +} +impl Into for DatasetToTFRecordInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DatasetToTFRecord::new().build(input_dataset, filename, compression_type, scope)`. -pub fn dataset_to_tfrecord< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - filename: O1, - compression_type: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dataset_to_tfrecord, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, filename: O1, compression_type: O2, scope: &mut crate::Scope) -> crate::Result { DatasetToTFRecord::new().build(input_dataset, filename, compression_type, scope) } + /// Builder for the `Dawsn` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Dawsn { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Dawsn' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DawsnInst { + /// An instance of a fully built Dawsn Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Dawsn { /// Creates a new `Dawsn`. @@ -25405,45 +30644,71 @@ impl Dawsn { } /// Builds the `Dawsn` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Dawsn", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Dawsn` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Dawsn", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DawsnInst{op}) + } +} +impl DawsnInst { + /// Returns the 'y' output of this 'Dawsn' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DawsnInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Dawsn::new().build(x, scope)`. -pub fn dawsn>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dawsn>(x: O0, scope: &mut crate::Scope) -> crate::Result { Dawsn::new().build(x, scope) } + /// Builder for the `DebugGradientIdentity` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DebugGradientIdentity { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DebugGradientIdentity' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DebugGradientIdentityInst { + /// An instance of a fully built DebugGradientIdentity Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DebugGradientIdentity { /// Creates a new `DebugGradientIdentity`. @@ -25464,45 +30729,71 @@ impl DebugGradientIdentity { } /// Builds the `DebugGradientIdentity` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DebugGradientIdentity", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DebugGradientIdentity` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DebugGradientIdentity", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DebugGradientIdentityInst{op}) + } +} +impl DebugGradientIdentityInst { + /// Returns the 'output' output of this 'DebugGradientIdentity' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DebugGradientIdentityInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DebugGradientIdentity::new().build(input, scope)`. -pub fn debug_gradient_identity>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn debug_gradient_identity>(input: O0, scope: &mut crate::Scope) -> crate::Result { DebugGradientIdentity::new().build(input, scope) } + /// Builder for the `DebugGradientRefIdentity` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DebugGradientRefIdentity { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DebugGradientRefIdentity' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DebugGradientRefIdentityInst { + /// An instance of a fully built DebugGradientRefIdentity Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DebugGradientRefIdentity { /// Creates a new `DebugGradientRefIdentity`. @@ -25523,39 +30814,59 @@ impl DebugGradientRefIdentity { } /// Builds the `DebugGradientRefIdentity` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DebugGradientRefIdentity", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DebugGradientRefIdentity` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DebugGradientRefIdentity", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DebugGradientRefIdentityInst{op}) + } +} +impl DebugGradientRefIdentityInst { + /// Returns the 'output' output of this 'DebugGradientRefIdentity' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DebugGradientRefIdentityInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DebugGradientRefIdentity::new().build(input, scope)`. -pub fn debug_gradient_ref_identity>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn debug_gradient_ref_identity>(input: O0, scope: &mut crate::Scope) -> crate::Result { DebugGradientRefIdentity::new().build(input, scope) } + /// Builder for the `DebugIdentity` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DebugIdentity { @@ -25566,6 +30877,12 @@ pub struct DebugIdentity { gated_grpc: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DebugIdentity' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DebugIdentityInst { + /// An instance of a fully built DebugIdentity Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DebugIdentity { /// Creates a new `DebugIdentity`. @@ -25580,28 +30897,19 @@ impl DebugIdentity { } /// Sets the `device_name` attribute. - pub fn device_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn device_name>(mut self, value: ArgType) -> Self { self.device_name = ::std::option::Option::Some(value.into()); self } /// Sets the `tensor_name` attribute. - pub fn tensor_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_name>(mut self, value: ArgType) -> Self { self.tensor_name = ::std::option::Option::Some(value.into()); self } /// Sets the `debug_urls` attribute. - pub fn debug_urls>>( - mut self, - value: ArgType, - ) -> Self { + pub fn debug_urls>>(mut self, value: ArgType) -> Self { self.debug_urls = ::std::option::Option::Some(value.into()); self } @@ -25619,51 +30927,83 @@ impl DebugIdentity { } /// Builds the `DebugIdentity` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DebugIdentity", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.device_name { - nd.set_attr_string("device_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_name { - nd.set_attr_string("tensor_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.debug_urls { - nd.set_attr_string_list("debug_urls", value)?; - } - if let ::std::option::Option::Some(value) = &self.gated_grpc { - nd.set_attr_bool("gated_grpc", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_name { + nd.set_attr_string("device_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_urls { + nd.set_attr_string_list("debug_urls", value)?; + } + if let ::std::option::Option::Some(value) = &self.gated_grpc { + nd.set_attr_bool("gated_grpc", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DebugIdentity` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DebugIdentity", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_name { + nd.set_attr_string("device_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_urls { + nd.set_attr_string_list("debug_urls", value)?; + } + if let ::std::option::Option::Some(value) = &self.gated_grpc { + nd.set_attr_bool("gated_grpc", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DebugIdentityInst{op}) + } +} +impl DebugIdentityInst { + /// Returns the 'output' output of this 'DebugIdentity' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DebugIdentityInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DebugIdentity::new().build(input, scope)`. -pub fn debug_identity>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn debug_identity>(input: O0, scope: &mut crate::Scope) -> crate::Result { DebugIdentity::new().build(input, scope) } + /// Builder for the `DebugIdentityV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DebugIdentityV2 { @@ -25677,6 +31017,12 @@ pub struct DebugIdentityV2 { tfdbg_run_id: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DebugIdentityV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DebugIdentityV2Inst { + /// An instance of a fully built DebugIdentityV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DebugIdentityV2 { /// Creates a new `DebugIdentityV2`. @@ -25691,19 +31037,13 @@ impl DebugIdentityV2 { } /// Sets the `tfdbg_context_id` attribute. - pub fn tfdbg_context_id>( - mut self, - value: ArgType, - ) -> Self { + pub fn tfdbg_context_id>(mut self, value: ArgType) -> Self { self.tfdbg_context_id = ::std::option::Option::Some(value.into()); self } /// Sets the `op_name` attribute. - pub fn op_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn op_name>(mut self, value: ArgType) -> Self { self.op_name = ::std::option::Option::Some(value.into()); self } @@ -25721,28 +31061,19 @@ impl DebugIdentityV2 { } /// Sets the `debug_urls` attribute. - pub fn debug_urls>>( - mut self, - value: ArgType, - ) -> Self { + pub fn debug_urls>>(mut self, value: ArgType) -> Self { self.debug_urls = ::std::option::Option::Some(value.into()); self } /// Sets the `circular_buffer_size` attribute. - pub fn circular_buffer_size>( - mut self, - value: ArgType, - ) -> Self { + pub fn circular_buffer_size>(mut self, value: ArgType) -> Self { self.circular_buffer_size = ::std::option::Option::Some(value.into()); self } /// Sets the `tfdbg_run_id` attribute. - pub fn tfdbg_run_id>( - mut self, - value: ArgType, - ) -> Self { + pub fn tfdbg_run_id>(mut self, value: ArgType) -> Self { self.tfdbg_run_id = ::std::option::Option::Some(value.into()); self } @@ -25754,60 +31085,101 @@ impl DebugIdentityV2 { } /// Builds the `DebugIdentityV2` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DebugIdentityV2", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tfdbg_context_id { - nd.set_attr_string("tfdbg_context_id", value)?; - } - if let ::std::option::Option::Some(value) = &self.op_name { - nd.set_attr_string("op_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_slot { - nd.set_attr_int("output_slot", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_debug_mode { - nd.set_attr_int("tensor_debug_mode", *value)?; - } - if let ::std::option::Option::Some(value) = &self.debug_urls { - nd.set_attr_string_list("debug_urls", value)?; - } - if let ::std::option::Option::Some(value) = &self.circular_buffer_size { - nd.set_attr_int("circular_buffer_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tfdbg_run_id { - nd.set_attr_string("tfdbg_run_id", value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tfdbg_context_id { + nd.set_attr_string("tfdbg_context_id", value)?; + } + if let ::std::option::Option::Some(value) = &self.op_name { + nd.set_attr_string("op_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_slot { + nd.set_attr_int("output_slot", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_debug_mode { + nd.set_attr_int("tensor_debug_mode", *value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_urls { + nd.set_attr_string_list("debug_urls", value)?; + } + if let ::std::option::Option::Some(value) = &self.circular_buffer_size { + nd.set_attr_int("circular_buffer_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tfdbg_run_id { + nd.set_attr_string("tfdbg_run_id", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `DebugIdentityV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DebugIdentityV2", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tfdbg_context_id { + nd.set_attr_string("tfdbg_context_id", value)?; + } + if let ::std::option::Option::Some(value) = &self.op_name { + nd.set_attr_string("op_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_slot { + nd.set_attr_int("output_slot", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_debug_mode { + nd.set_attr_int("tensor_debug_mode", *value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_urls { + nd.set_attr_string_list("debug_urls", value)?; + } + if let ::std::option::Option::Some(value) = &self.circular_buffer_size { + nd.set_attr_int("circular_buffer_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tfdbg_run_id { + nd.set_attr_string("tfdbg_run_id", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DebugIdentityV2Inst{op}) + } +} +impl DebugIdentityV2Inst { + /// Returns the 'output' output of this 'DebugIdentityV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DebugIdentityV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `DebugIdentityV2::new().build(input, scope)`. -pub fn debug_identity_v2>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn debug_identity_v2>(input: O0, scope: &mut crate::Scope) -> crate::Result { DebugIdentityV2::new().build(input, scope) } + /// Builder for the `DebugNanCount` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DebugNanCount { @@ -25818,6 +31190,12 @@ pub struct DebugNanCount { gated_grpc: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DebugNanCount' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DebugNanCountInst { + /// An instance of a fully built DebugNanCount Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DebugNanCount { /// Creates a new `DebugNanCount`. @@ -25832,28 +31210,19 @@ impl DebugNanCount { } /// Sets the `device_name` attribute. - pub fn device_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn device_name>(mut self, value: ArgType) -> Self { self.device_name = ::std::option::Option::Some(value.into()); self } /// Sets the `tensor_name` attribute. - pub fn tensor_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_name>(mut self, value: ArgType) -> Self { self.tensor_name = ::std::option::Option::Some(value.into()); self } /// Sets the `debug_urls` attribute. - pub fn debug_urls>>( - mut self, - value: ArgType, - ) -> Self { + pub fn debug_urls>>(mut self, value: ArgType) -> Self { self.debug_urls = ::std::option::Option::Some(value.into()); self } @@ -25871,51 +31240,83 @@ impl DebugNanCount { } /// Builds the `DebugNanCount` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DebugNanCount", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.device_name { - nd.set_attr_string("device_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_name { - nd.set_attr_string("tensor_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.debug_urls { - nd.set_attr_string_list("debug_urls", value)?; - } - if let ::std::option::Option::Some(value) = &self.gated_grpc { - nd.set_attr_bool("gated_grpc", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_name { + nd.set_attr_string("device_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_urls { + nd.set_attr_string_list("debug_urls", value)?; + } + if let ::std::option::Option::Some(value) = &self.gated_grpc { + nd.set_attr_bool("gated_grpc", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DebugNanCount` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DebugNanCount", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_name { + nd.set_attr_string("device_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_urls { + nd.set_attr_string_list("debug_urls", value)?; + } + if let ::std::option::Option::Some(value) = &self.gated_grpc { + nd.set_attr_bool("gated_grpc", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DebugNanCountInst{op}) + } +} +impl DebugNanCountInst { + /// Returns the 'output' output of this 'DebugNanCount' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DebugNanCountInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DebugNanCount::new().build(input, scope)`. -pub fn debug_nan_count>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn debug_nan_count>(input: O0, scope: &mut crate::Scope) -> crate::Result { DebugNanCount::new().build(input, scope) } + /// Builder for the `DebugNumericSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DebugNumericSummary { @@ -25929,6 +31330,12 @@ pub struct DebugNumericSummary { gated_grpc: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DebugNumericSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DebugNumericSummaryInst { + /// An instance of a fully built DebugNumericSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DebugNumericSummary { /// Creates a new `DebugNumericSummary`. @@ -25943,28 +31350,19 @@ impl DebugNumericSummary { } /// Sets the `device_name` attribute. - pub fn device_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn device_name>(mut self, value: ArgType) -> Self { self.device_name = ::std::option::Option::Some(value.into()); self } /// Sets the `tensor_name` attribute. - pub fn tensor_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_name>(mut self, value: ArgType) -> Self { self.tensor_name = ::std::option::Option::Some(value.into()); self } /// Sets the `debug_urls` attribute. - pub fn debug_urls>>( - mut self, - value: ArgType, - ) -> Self { + pub fn debug_urls>>(mut self, value: ArgType) -> Self { self.debug_urls = ::std::option::Option::Some(value.into()); self } @@ -26000,60 +31398,101 @@ impl DebugNumericSummary { } /// Builds the `DebugNumericSummary` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DebugNumericSummary", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.device_name { - nd.set_attr_string("device_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_name { - nd.set_attr_string("tensor_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.debug_urls { - nd.set_attr_string_list("debug_urls", value)?; - } - if let ::std::option::Option::Some(value) = &self.lower_bound { - nd.set_attr_float("lower_bound", *value)?; - } - if let ::std::option::Option::Some(value) = &self.upper_bound { - nd.set_attr_float("upper_bound", *value)?; - } - if let ::std::option::Option::Some(value) = &self.mute_if_healthy { - nd.set_attr_bool("mute_if_healthy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.gated_grpc { - nd.set_attr_bool("gated_grpc", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_name { + nd.set_attr_string("device_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_urls { + nd.set_attr_string_list("debug_urls", value)?; + } + if let ::std::option::Option::Some(value) = &self.lower_bound { + nd.set_attr_float("lower_bound", *value)?; + } + if let ::std::option::Option::Some(value) = &self.upper_bound { + nd.set_attr_float("upper_bound", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mute_if_healthy { + nd.set_attr_bool("mute_if_healthy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.gated_grpc { + nd.set_attr_bool("gated_grpc", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `DebugNumericSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DebugNumericSummary", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_name { + nd.set_attr_string("device_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.debug_urls { + nd.set_attr_string_list("debug_urls", value)?; + } + if let ::std::option::Option::Some(value) = &self.lower_bound { + nd.set_attr_float("lower_bound", *value)?; + } + if let ::std::option::Option::Some(value) = &self.upper_bound { + nd.set_attr_float("upper_bound", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mute_if_healthy { + nd.set_attr_bool("mute_if_healthy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.gated_grpc { + nd.set_attr_bool("gated_grpc", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DebugNumericSummaryInst{op}) + } +} +impl DebugNumericSummaryInst { + /// Returns the 'output' output of this 'DebugNumericSummary' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DebugNumericSummaryInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `DebugNumericSummary::new().build(input, scope)`. -pub fn debug_numeric_summary>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn debug_numeric_summary>(input: O0, scope: &mut crate::Scope) -> crate::Result { DebugNumericSummary::new().build(input, scope) } + /// Builder for the `DebugNumericSummaryV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DebugNumericSummaryV2 { @@ -26063,6 +31502,12 @@ pub struct DebugNumericSummaryV2 { tensor_id: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DebugNumericSummaryV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DebugNumericSummaryV2Inst { + /// An instance of a fully built DebugNumericSummaryV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DebugNumericSummaryV2 { /// Creates a new `DebugNumericSummaryV2`. @@ -26071,10 +31516,7 @@ impl DebugNumericSummaryV2 { } /// Sets the `output_dtype` attribute. - pub fn output_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_dtype>(mut self, value: ArgType) -> Self { self.output_dtype = ::std::option::Option::Some(value.into()); self } @@ -26104,48 +31546,77 @@ impl DebugNumericSummaryV2 { } /// Builds the `DebugNumericSummaryV2` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DebugNumericSummaryV2", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_dtype { - nd.set_attr_type("output_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_debug_mode { - nd.set_attr_int("tensor_debug_mode", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_id { - nd.set_attr_int("tensor_id", *value)?; - } + if let ::std::option::Option::Some(value) = &self.output_dtype { + nd.set_attr_type("output_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_debug_mode { + nd.set_attr_int("tensor_debug_mode", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_id { + nd.set_attr_int("tensor_id", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DebugNumericSummaryV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DebugNumericSummaryV2", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_dtype { + nd.set_attr_type("output_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_debug_mode { + nd.set_attr_int("tensor_debug_mode", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_id { + nd.set_attr_int("tensor_id", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DebugNumericSummaryV2Inst{op}) + } +} +impl DebugNumericSummaryV2Inst { + /// Returns the 'output' output of this 'DebugNumericSummaryV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DebugNumericSummaryV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DebugNumericSummaryV2::new().build(input, scope)`. -pub fn debug_numeric_summary_v2>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn debug_numeric_summary_v2>(input: O0, scope: &mut crate::Scope) -> crate::Result { DebugNumericSummaryV2::new().build(input, scope) } + /// Builder for the `DecodeAndCropJpeg` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeAndCropJpeg { @@ -26157,6 +31628,12 @@ pub struct DecodeAndCropJpeg { dct_method: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeAndCropJpeg' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeAndCropJpegInst { + /// An instance of a fully built DecodeAndCropJpeg Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeAndCropJpeg { /// Creates a new `DecodeAndCropJpeg`. @@ -26183,28 +31660,19 @@ impl DecodeAndCropJpeg { } /// Sets the `try_recover_truncated` attribute. - pub fn try_recover_truncated>( - mut self, - value: ArgType, - ) -> Self { + pub fn try_recover_truncated>(mut self, value: ArgType) -> Self { self.try_recover_truncated = ::std::option::Option::Some(value.into()); self } /// Sets the `acceptable_fraction` attribute. - pub fn acceptable_fraction>( - mut self, - value: ArgType, - ) -> Self { + pub fn acceptable_fraction>(mut self, value: ArgType) -> Self { self.acceptable_fraction = ::std::option::Option::Some(value.into()); self } /// Sets the `dct_method` attribute. - pub fn dct_method>( - mut self, - value: ArgType, - ) -> Self { + pub fn dct_method>(mut self, value: ArgType) -> Self { self.dct_method = ::std::option::Option::Some(value.into()); self } @@ -26216,69 +31684,102 @@ impl DecodeAndCropJpeg { } /// Builds the `DecodeAndCropJpeg` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - contents: O0, - crop_window: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, contents: O0, crop_window: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(contents.into(), crop_window.into(), scope) } - - fn build_impl( - &self, - contents: crate::Output, - crop_window: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, contents: crate::Output, crop_window: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeAndCropJpeg", |nd| { nd.add_input(contents); nd.add_input(crop_window); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.channels { - nd.set_attr_int("channels", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ratio { - nd.set_attr_int("ratio", *value)?; - } - if let ::std::option::Option::Some(value) = &self.fancy_upscaling { - nd.set_attr_bool("fancy_upscaling", *value)?; - } - if let ::std::option::Option::Some(value) = &self.try_recover_truncated { - nd.set_attr_bool("try_recover_truncated", *value)?; - } - if let ::std::option::Option::Some(value) = &self.acceptable_fraction { - nd.set_attr_float("acceptable_fraction", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dct_method { - nd.set_attr_string("dct_method", value)?; - } + if let ::std::option::Option::Some(value) = &self.channels { + nd.set_attr_int("channels", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ratio { + nd.set_attr_int("ratio", *value)?; + } + if let ::std::option::Option::Some(value) = &self.fancy_upscaling { + nd.set_attr_bool("fancy_upscaling", *value)?; + } + if let ::std::option::Option::Some(value) = &self.try_recover_truncated { + nd.set_attr_bool("try_recover_truncated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.acceptable_fraction { + nd.set_attr_float("acceptable_fraction", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dct_method { + nd.set_attr_string("dct_method", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeAndCropJpeg` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, contents: O0, crop_window: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(contents.into(), crop_window.into(), scope) + } + fn build_instance_impl(&self, contents: crate::Output, crop_window: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeAndCropJpeg", |nd| { + nd.add_input(contents); + nd.add_input(crop_window); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.channels { + nd.set_attr_int("channels", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ratio { + nd.set_attr_int("ratio", *value)?; + } + if let ::std::option::Option::Some(value) = &self.fancy_upscaling { + nd.set_attr_bool("fancy_upscaling", *value)?; + } + if let ::std::option::Option::Some(value) = &self.try_recover_truncated { + nd.set_attr_bool("try_recover_truncated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.acceptable_fraction { + nd.set_attr_float("acceptable_fraction", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dct_method { + nd.set_attr_string("dct_method", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeAndCropJpegInst{op}) + } +} +impl DecodeAndCropJpegInst { + /// Returns the 'image' output of this 'DecodeAndCropJpeg' operation. + pub fn image(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodeAndCropJpegInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeAndCropJpeg::new().build(contents, crop_window, scope)`. -pub fn decode_and_crop_jpeg< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - contents: O0, - crop_window: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_and_crop_jpeg, O1: ::std::convert::Into>(contents: O0, crop_window: O1, scope: &mut crate::Scope) -> crate::Result { DecodeAndCropJpeg::new().build(contents, crop_window, scope) } + /// Builder for the `DecodeBase64` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeBase64 { control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeBase64' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeBase64Inst { + /// An instance of a fully built DecodeBase64 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeBase64 { /// Creates a new `DecodeBase64`. @@ -26293,19 +31794,10 @@ impl DecodeBase64 { } /// Builds the `DecodeBase64` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeBase64", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -26314,21 +31806,53 @@ impl DecodeBase64 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeBase64` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeBase64", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeBase64Inst{op}) + } +} +impl DecodeBase64Inst { + /// Returns the 'output' output of this 'DecodeBase64' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodeBase64Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeBase64::new().build(input, scope)`. -pub fn decode_base64>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_base64>(input: O0, scope: &mut crate::Scope) -> crate::Result { DecodeBase64::new().build(input, scope) } + /// Builder for the `DecodeBmp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeBmp { channels: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeBmp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeBmpInst { + /// An instance of a fully built DecodeBmp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeBmp { /// Creates a new `DecodeBmp`. @@ -26349,39 +31873,59 @@ impl DecodeBmp { } /// Builds the `DecodeBmp` operation. - pub fn build>( - &self, - contents: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(contents.into(), scope) } - - fn build_impl( - &self, - contents: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeBmp", |nd| { nd.add_input(contents); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.channels { - nd.set_attr_int("channels", *value)?; - } + if let ::std::option::Option::Some(value) = &self.channels { + nd.set_attr_int("channels", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeBmp` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(contents.into(), scope) + } + fn build_instance_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeBmp", |nd| { + nd.add_input(contents); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.channels { + nd.set_attr_int("channels", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeBmpInst{op}) + } +} +impl DecodeBmpInst { + /// Returns the 'image' output of this 'DecodeBmp' operation. + pub fn image(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodeBmpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeBmp::new().build(contents, scope)`. -pub fn decode_bmp>( - contents: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_bmp>(contents: O0, scope: &mut crate::Scope) -> crate::Result { DecodeBmp::new().build(contents, scope) } + /// Builder for the `DecodeCSV` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeCSV { @@ -26392,6 +31936,12 @@ pub struct DecodeCSV { select_cols: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeCSV' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeCSVInst { + /// An instance of a fully built DecodeCSV Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeCSV { /// Creates a new `DecodeCSV`. @@ -26400,19 +31950,13 @@ impl DecodeCSV { } /// Sets the `OUT_TYPE` attribute. - pub fn OUT_TYPE>>( - mut self, - value: ArgType, - ) -> Self { + pub fn OUT_TYPE>>(mut self, value: ArgType) -> Self { self.OUT_TYPE = ::std::option::Option::Some(value.into()); self } /// Sets the `field_delim` attribute. - pub fn field_delim>( - mut self, - value: ArgType, - ) -> Self { + pub fn field_delim>(mut self, value: ArgType) -> Self { self.field_delim = ::std::option::Option::Some(value.into()); self } @@ -26424,19 +31968,13 @@ impl DecodeCSV { } /// Sets the `na_value` attribute. - pub fn na_value>( - mut self, - value: ArgType, - ) -> Self { + pub fn na_value>(mut self, value: ArgType) -> Self { self.na_value = ::std::option::Option::Some(value.into()); self } /// Sets the `select_cols` attribute. - pub fn select_cols>>( - mut self, - value: ArgType, - ) -> Self { + pub fn select_cols>>(mut self, value: ArgType) -> Self { self.select_cols = ::std::option::Option::Some(value.into()); self } @@ -26448,67 +31986,97 @@ impl DecodeCSV { } /// Builds the `DecodeCSV` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - records: O0, - record_defaults: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, records: O0, record_defaults: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(records.into(), record_defaults.into(), scope) } - - fn build_impl( - &self, - records: crate::Output, - record_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, records: crate::Output, record_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeCSV", |nd| { nd.add_input(records); nd.add_input(record_defaults); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.OUT_TYPE { - nd.set_attr_type_list("OUT_TYPE", value)?; - } - if let ::std::option::Option::Some(value) = &self.field_delim { - nd.set_attr_string("field_delim", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_quote_delim { - nd.set_attr_bool("use_quote_delim", *value)?; - } - if let ::std::option::Option::Some(value) = &self.na_value { - nd.set_attr_string("na_value", value)?; - } - if let ::std::option::Option::Some(value) = &self.select_cols { - nd.set_attr_int_list("select_cols", value)?; - } + if let ::std::option::Option::Some(value) = &self.OUT_TYPE { + nd.set_attr_type_list("OUT_TYPE", value)?; + } + if let ::std::option::Option::Some(value) = &self.field_delim { + nd.set_attr_string("field_delim", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_quote_delim { + nd.set_attr_bool("use_quote_delim", *value)?; + } + if let ::std::option::Option::Some(value) = &self.na_value { + nd.set_attr_string("na_value", value)?; + } + if let ::std::option::Option::Some(value) = &self.select_cols { + nd.set_attr_int_list("select_cols", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeCSV` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, records: O0, record_defaults: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(records.into(), record_defaults.into(), scope) + } + fn build_instance_impl(&self, records: crate::Output, record_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeCSV", |nd| { + nd.add_input(records); + nd.add_input(record_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.OUT_TYPE { + nd.set_attr_type_list("OUT_TYPE", value)?; + } + if let ::std::option::Option::Some(value) = &self.field_delim { + nd.set_attr_string("field_delim", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_quote_delim { + nd.set_attr_bool("use_quote_delim", *value)?; + } + if let ::std::option::Option::Some(value) = &self.na_value { + nd.set_attr_string("na_value", value)?; + } + if let ::std::option::Option::Some(value) = &self.select_cols { + nd.set_attr_int_list("select_cols", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeCSVInst{op}) + } +} +impl DecodeCSVInst { + /// Returns the 'output' output of this 'DecodeCSV' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodeCSVInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeCSV::new().build(records, record_defaults, scope)`. -pub fn decode_csv< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - records: O0, - record_defaults: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_csv, O1: ::std::convert::Into>(records: O0, record_defaults: O1, scope: &mut crate::Scope) -> crate::Result { DecodeCSV::new().build(records, record_defaults, scope) } + /// Builder for the `DecodeCompressed` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeCompressed { compression_type: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeCompressed' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeCompressedInst { + /// An instance of a fully built DecodeCompressed Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeCompressed { /// Creates a new `DecodeCompressed`. @@ -26517,10 +32085,7 @@ impl DecodeCompressed { } /// Sets the `compression_type` attribute. - pub fn compression_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn compression_type>(mut self, value: ArgType) -> Self { self.compression_type = ::std::option::Option::Some(value.into()); self } @@ -26532,44 +32097,70 @@ impl DecodeCompressed { } /// Builds the `DecodeCompressed` operation. - pub fn build>( - &self, - bytes: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, bytes: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(bytes.into(), scope) } - - fn build_impl( - &self, - bytes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, bytes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeCompressed", |nd| { nd.add_input(bytes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.compression_type { - nd.set_attr_string("compression_type", value)?; - } + if let ::std::option::Option::Some(value) = &self.compression_type { + nd.set_attr_string("compression_type", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeCompressed` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, bytes: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(bytes.into(), scope) + } + fn build_instance_impl(&self, bytes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeCompressed", |nd| { + nd.add_input(bytes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.compression_type { + nd.set_attr_string("compression_type", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeCompressedInst{op}) + } +} +impl DecodeCompressedInst { + /// Returns the 'output' output of this 'DecodeCompressed' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodeCompressedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeCompressed::new().build(bytes, scope)`. -pub fn decode_compressed>( - bytes: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_compressed>(bytes: O0, scope: &mut crate::Scope) -> crate::Result { DecodeCompressed::new().build(bytes, scope) } + /// Builder for the `DecodeGif` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeGif { control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeGif' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeGifInst { + /// An instance of a fully built DecodeGif Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeGif { /// Creates a new `DecodeGif`. @@ -26584,19 +32175,10 @@ impl DecodeGif { } /// Builds the `DecodeGif` operation. - pub fn build>( - &self, - contents: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(contents.into(), scope) } - - fn build_impl( - &self, - contents: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeGif", |nd| { nd.add_input(contents); for op in &self.control_inputs { @@ -26605,15 +32187,41 @@ impl DecodeGif { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeGif` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(contents.into(), scope) + } + fn build_instance_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeGif", |nd| { + nd.add_input(contents); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeGifInst{op}) + } +} +impl DecodeGifInst { + /// Returns the 'image' output of this 'DecodeGif' operation. + pub fn image(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodeGifInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeGif::new().build(contents, scope)`. -pub fn decode_gif>( - contents: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_gif>(contents: O0, scope: &mut crate::Scope) -> crate::Result { DecodeGif::new().build(contents, scope) } + /// Builder for the `DecodeImage` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeImage { @@ -26622,6 +32230,12 @@ pub struct DecodeImage { expand_animations: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeImage' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeImageInst { + /// An instance of a fully built DecodeImage Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeImage { /// Creates a new `DecodeImage`. @@ -26642,10 +32256,7 @@ impl DecodeImage { } /// Sets the `expand_animations` attribute. - pub fn expand_animations>( - mut self, - value: ArgType, - ) -> Self { + pub fn expand_animations>(mut self, value: ArgType) -> Self { self.expand_animations = ::std::option::Option::Some(value.into()); self } @@ -26657,50 +32268,82 @@ impl DecodeImage { } /// Builds the `DecodeImage` operation. - pub fn build>( - &self, - contents: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(contents.into(), scope) } - - fn build_impl( - &self, - contents: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeImage", |nd| { nd.add_input(contents); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.channels { - nd.set_attr_int("channels", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.expand_animations { - nd.set_attr_bool("expand_animations", *value)?; - } + if let ::std::option::Option::Some(value) = &self.channels { + nd.set_attr_int("channels", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.expand_animations { + nd.set_attr_bool("expand_animations", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeImage` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(contents.into(), scope) + } + fn build_instance_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeImage", |nd| { + nd.add_input(contents); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.channels { + nd.set_attr_int("channels", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.expand_animations { + nd.set_attr_bool("expand_animations", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeImageInst{op}) + } +} +impl DecodeImageInst { + /// Returns the 'image' output of this 'DecodeImage' operation. + pub fn image(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodeImageInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeImage::new().build(contents, scope)`. -pub fn decode_image>( - contents: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_image>(contents: O0, scope: &mut crate::Scope) -> crate::Result { DecodeImage::new().build(contents, scope) } + /// Builder for the `DecodeJSONExample` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeJSONExample { control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeJSONExample' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeJSONExampleInst { + /// An instance of a fully built DecodeJSONExample Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeJSONExample { /// Creates a new `DecodeJSONExample`. @@ -26715,19 +32358,10 @@ impl DecodeJSONExample { } /// Builds the `DecodeJSONExample` operation. - pub fn build>( - &self, - json_examples: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, json_examples: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(json_examples.into(), scope) } - - fn build_impl( - &self, - json_examples: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, json_examples: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeJSONExample", |nd| { nd.add_input(json_examples); for op in &self.control_inputs { @@ -26736,15 +32370,41 @@ impl DecodeJSONExample { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeJSONExample` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, json_examples: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(json_examples.into(), scope) + } + fn build_instance_impl(&self, json_examples: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeJSONExample", |nd| { + nd.add_input(json_examples); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeJSONExampleInst{op}) + } +} +impl DecodeJSONExampleInst { + /// Returns the 'binary_examples' output of this 'DecodeJSONExample' operation. + pub fn binary_examples(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodeJSONExampleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeJSONExample::new().build(json_examples, scope)`. -pub fn decode_jsonexample>( - json_examples: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_jsonexample>(json_examples: O0, scope: &mut crate::Scope) -> crate::Result { DecodeJSONExample::new().build(json_examples, scope) } + /// Builder for the `DecodeJpeg` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeJpeg { @@ -26756,6 +32416,12 @@ pub struct DecodeJpeg { dct_method: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeJpeg' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeJpegInst { + /// An instance of a fully built DecodeJpeg Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeJpeg { /// Creates a new `DecodeJpeg`. @@ -26782,28 +32448,19 @@ impl DecodeJpeg { } /// Sets the `try_recover_truncated` attribute. - pub fn try_recover_truncated>( - mut self, - value: ArgType, - ) -> Self { + pub fn try_recover_truncated>(mut self, value: ArgType) -> Self { self.try_recover_truncated = ::std::option::Option::Some(value.into()); self } /// Sets the `acceptable_fraction` attribute. - pub fn acceptable_fraction>( - mut self, - value: ArgType, - ) -> Self { + pub fn acceptable_fraction>(mut self, value: ArgType) -> Self { self.acceptable_fraction = ::std::option::Option::Some(value.into()); self } /// Sets the `dct_method` attribute. - pub fn dct_method>( - mut self, - value: ArgType, - ) -> Self { + pub fn dct_method>(mut self, value: ArgType) -> Self { self.dct_method = ::std::option::Option::Some(value.into()); self } @@ -26815,54 +32472,89 @@ impl DecodeJpeg { } /// Builds the `DecodeJpeg` operation. - pub fn build>( - &self, - contents: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(contents.into(), scope) } - - fn build_impl( - &self, - contents: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeJpeg", |nd| { nd.add_input(contents); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.channels { - nd.set_attr_int("channels", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ratio { - nd.set_attr_int("ratio", *value)?; - } - if let ::std::option::Option::Some(value) = &self.fancy_upscaling { - nd.set_attr_bool("fancy_upscaling", *value)?; - } - if let ::std::option::Option::Some(value) = &self.try_recover_truncated { - nd.set_attr_bool("try_recover_truncated", *value)?; - } - if let ::std::option::Option::Some(value) = &self.acceptable_fraction { - nd.set_attr_float("acceptable_fraction", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dct_method { - nd.set_attr_string("dct_method", value)?; - } + if let ::std::option::Option::Some(value) = &self.channels { + nd.set_attr_int("channels", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ratio { + nd.set_attr_int("ratio", *value)?; + } + if let ::std::option::Option::Some(value) = &self.fancy_upscaling { + nd.set_attr_bool("fancy_upscaling", *value)?; + } + if let ::std::option::Option::Some(value) = &self.try_recover_truncated { + nd.set_attr_bool("try_recover_truncated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.acceptable_fraction { + nd.set_attr_float("acceptable_fraction", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dct_method { + nd.set_attr_string("dct_method", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeJpeg` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(contents.into(), scope) + } + fn build_instance_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeJpeg", |nd| { + nd.add_input(contents); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.channels { + nd.set_attr_int("channels", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ratio { + nd.set_attr_int("ratio", *value)?; + } + if let ::std::option::Option::Some(value) = &self.fancy_upscaling { + nd.set_attr_bool("fancy_upscaling", *value)?; + } + if let ::std::option::Option::Some(value) = &self.try_recover_truncated { + nd.set_attr_bool("try_recover_truncated", *value)?; + } + if let ::std::option::Option::Some(value) = &self.acceptable_fraction { + nd.set_attr_float("acceptable_fraction", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dct_method { + nd.set_attr_string("dct_method", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeJpegInst{op}) + } +} +impl DecodeJpegInst { + /// Returns the 'image' output of this 'DecodeJpeg' operation. + pub fn image(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodeJpegInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeJpeg::new().build(contents, scope)`. -pub fn decode_jpeg>( - contents: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_jpeg>(contents: O0, scope: &mut crate::Scope) -> crate::Result { DecodeJpeg::new().build(contents, scope) } + /// Builder for the `DecodePaddedRaw` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodePaddedRaw { @@ -26870,6 +32562,12 @@ pub struct DecodePaddedRaw { little_endian: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodePaddedRaw' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodePaddedRawInst { + /// An instance of a fully built DecodePaddedRaw Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodePaddedRaw { /// Creates a new `DecodePaddedRaw`. @@ -26878,10 +32576,7 @@ impl DecodePaddedRaw { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -26899,52 +32594,67 @@ impl DecodePaddedRaw { } /// Builds the `DecodePaddedRaw` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_bytes: O0, - fixed_length: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_bytes: O0, fixed_length: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_bytes.into(), fixed_length.into(), scope) } - - fn build_impl( - &self, - input_bytes: crate::Output, - fixed_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_bytes: crate::Output, fixed_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodePaddedRaw", |nd| { nd.add_input(input_bytes); nd.add_input(fixed_length); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.little_endian { - nd.set_attr_bool("little_endian", *value)?; - } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.little_endian { + nd.set_attr_bool("little_endian", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodePaddedRaw` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_bytes: O0, fixed_length: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_bytes.into(), fixed_length.into(), scope) + } + fn build_instance_impl(&self, input_bytes: crate::Output, fixed_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodePaddedRaw", |nd| { + nd.add_input(input_bytes); + nd.add_input(fixed_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.little_endian { + nd.set_attr_bool("little_endian", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodePaddedRawInst{op}) + } +} +impl DecodePaddedRawInst { + /// Returns the 'output' output of this 'DecodePaddedRaw' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodePaddedRawInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodePaddedRaw::new().build(input_bytes, fixed_length, scope)`. -pub fn decode_padded_raw< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_bytes: O0, - fixed_length: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_padded_raw, O1: ::std::convert::Into>(input_bytes: O0, fixed_length: O1, scope: &mut crate::Scope) -> crate::Result { DecodePaddedRaw::new().build(input_bytes, fixed_length, scope) } + /// Builder for the `DecodePng` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodePng { @@ -26952,6 +32662,12 @@ pub struct DecodePng { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodePng' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodePngInst { + /// An instance of a fully built DecodePng Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodePng { /// Creates a new `DecodePng`. @@ -26978,42 +32694,65 @@ impl DecodePng { } /// Builds the `DecodePng` operation. - pub fn build>( - &self, - contents: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(contents.into(), scope) } - - fn build_impl( - &self, - contents: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodePng", |nd| { nd.add_input(contents); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.channels { - nd.set_attr_int("channels", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.channels { + nd.set_attr_int("channels", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodePng` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(contents.into(), scope) + } + fn build_instance_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodePng", |nd| { + nd.add_input(contents); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.channels { + nd.set_attr_int("channels", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodePngInst{op}) + } +} +impl DecodePngInst { + /// Returns the 'image' output of this 'DecodePng' operation. + pub fn image(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodePngInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodePng::new().build(contents, scope)`. -pub fn decode_png>( - contents: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_png>(contents: O0, scope: &mut crate::Scope) -> crate::Result { DecodePng::new().build(contents, scope) } + /// Builder for the `DecodeProtoV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeProtoV2 { @@ -27025,6 +32764,12 @@ pub struct DecodeProtoV2 { sanitize: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeProtoV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeProtoV2Inst { + /// An instance of a fully built DecodeProtoV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeProtoV2 { /// Creates a new `DecodeProtoV2`. @@ -27033,46 +32778,31 @@ impl DecodeProtoV2 { } /// Sets the `message_type` attribute. - pub fn message_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn message_type>(mut self, value: ArgType) -> Self { self.message_type = ::std::option::Option::Some(value.into()); self } /// Sets the `field_names` attribute. - pub fn field_names>>( - mut self, - value: ArgType, - ) -> Self { + pub fn field_names>>(mut self, value: ArgType) -> Self { self.field_names = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `descriptor_source` attribute. - pub fn descriptor_source>( - mut self, - value: ArgType, - ) -> Self { + pub fn descriptor_source>(mut self, value: ArgType) -> Self { self.descriptor_source = ::std::option::Option::Some(value.into()); self } /// Sets the `message_format` attribute. - pub fn message_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn message_format>(mut self, value: ArgType) -> Self { self.message_format = ::std::option::Option::Some(value.into()); self } @@ -27090,54 +32820,96 @@ impl DecodeProtoV2 { } /// Builds the `DecodeProtoV2` operation. - pub fn build>( - &self, - bytes: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, bytes: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(bytes.into(), scope) } - - fn build_impl( - &self, - bytes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, bytes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeProtoV2", |nd| { nd.add_input(bytes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.message_type { - nd.set_attr_string("message_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.field_names { - nd.set_attr_string_list("field_names", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.descriptor_source { - nd.set_attr_string("descriptor_source", value)?; - } - if let ::std::option::Option::Some(value) = &self.message_format { - nd.set_attr_string("message_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.sanitize { - nd.set_attr_bool("sanitize", *value)?; - } + if let ::std::option::Option::Some(value) = &self.message_type { + nd.set_attr_string("message_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.field_names { + nd.set_attr_string_list("field_names", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.descriptor_source { + nd.set_attr_string("descriptor_source", value)?; + } + if let ::std::option::Option::Some(value) = &self.message_format { + nd.set_attr_string("message_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.sanitize { + nd.set_attr_bool("sanitize", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeProtoV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, bytes: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(bytes.into(), scope) + } + fn build_instance_impl(&self, bytes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeProtoV2", |nd| { + nd.add_input(bytes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.message_type { + nd.set_attr_string("message_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.field_names { + nd.set_attr_string_list("field_names", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.descriptor_source { + nd.set_attr_string("descriptor_source", value)?; + } + if let ::std::option::Option::Some(value) = &self.message_format { + nd.set_attr_string("message_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.sanitize { + nd.set_attr_bool("sanitize", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeProtoV2Inst{op}) + } +} +impl DecodeProtoV2Inst { + /// Returns the 'sizes' output of this 'DecodeProtoV2' operation. + pub fn sizes(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'DecodeProtoV2' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for DecodeProtoV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeProtoV2::new().build(bytes, scope)`. -pub fn decode_proto_v2>( - bytes: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_proto_v2>(bytes: O0, scope: &mut crate::Scope) -> crate::Result { DecodeProtoV2::new().build(bytes, scope) } + /// Builder for the `DecodeRaw` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeRaw { @@ -27145,6 +32917,12 @@ pub struct DecodeRaw { little_endian: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeRaw' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeRawInst { + /// An instance of a fully built DecodeRaw Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeRaw { /// Creates a new `DecodeRaw`. @@ -27153,10 +32931,7 @@ impl DecodeRaw { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -27174,42 +32949,65 @@ impl DecodeRaw { } /// Builds the `DecodeRaw` operation. - pub fn build>( - &self, - bytes: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, bytes: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(bytes.into(), scope) } - - fn build_impl( - &self, - bytes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, bytes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeRaw", |nd| { nd.add_input(bytes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.little_endian { - nd.set_attr_bool("little_endian", *value)?; - } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.little_endian { + nd.set_attr_bool("little_endian", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeRaw` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, bytes: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(bytes.into(), scope) + } + fn build_instance_impl(&self, bytes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeRaw", |nd| { + nd.add_input(bytes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.little_endian { + nd.set_attr_bool("little_endian", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeRawInst{op}) + } +} +impl DecodeRawInst { + /// Returns the 'output' output of this 'DecodeRaw' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DecodeRawInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeRaw::new().build(bytes, scope)`. -pub fn decode_raw>( - bytes: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_raw>(bytes: O0, scope: &mut crate::Scope) -> crate::Result { DecodeRaw::new().build(bytes, scope) } + /// Builder for the `DecodeWav` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DecodeWav { @@ -27217,6 +33015,12 @@ pub struct DecodeWav { desired_samples: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DecodeWav' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DecodeWavInst { + /// An instance of a fully built DecodeWav Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DecodeWav { /// Creates a new `DecodeWav`. @@ -27243,48 +33047,84 @@ impl DecodeWav { } /// Builds the `DecodeWav` operation. - pub fn build>( - &self, - contents: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(contents.into(), scope) } - - fn build_impl( - &self, - contents: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DecodeWav", |nd| { nd.add_input(contents); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.desired_channels { - nd.set_attr_int("desired_channels", *value)?; - } - if let ::std::option::Option::Some(value) = &self.desired_samples { - nd.set_attr_int("desired_samples", *value)?; - } + if let ::std::option::Option::Some(value) = &self.desired_channels { + nd.set_attr_int("desired_channels", *value)?; + } + if let ::std::option::Option::Some(value) = &self.desired_samples { + nd.set_attr_int("desired_samples", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DecodeWav` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(contents.into(), scope) + } + fn build_instance_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DecodeWav", |nd| { + nd.add_input(contents); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.desired_channels { + nd.set_attr_int("desired_channels", *value)?; + } + if let ::std::option::Option::Some(value) = &self.desired_samples { + nd.set_attr_int("desired_samples", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DecodeWavInst{op}) + } +} +impl DecodeWavInst { + /// Returns the 'audio' output of this 'DecodeWav' operation. + pub fn audio(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'sample_rate' output of this 'DecodeWav' operation. + pub fn sample_rate(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for DecodeWavInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DecodeWav::new().build(contents, scope)`. -pub fn decode_wav>( - contents: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn decode_wav>(contents: O0, scope: &mut crate::Scope) -> crate::Result { DecodeWav::new().build(contents, scope) } + /// Builder for the `DeepCopy` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeepCopy { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DeepCopy' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeepCopyInst { + /// An instance of a fully built DeepCopy Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeepCopy { /// Creates a new `DeepCopy`. @@ -27305,44 +33145,70 @@ impl DeepCopy { } /// Builds the `DeepCopy` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeepCopy", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeepCopy` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeepCopy", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DeepCopyInst{op}) + } +} +impl DeepCopyInst { + /// Returns the 'y' output of this 'DeepCopy' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DeepCopyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeepCopy::new().build(x, scope)`. -pub fn deep_copy>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn deep_copy>(x: O0, scope: &mut crate::Scope) -> crate::Result { DeepCopy::new().build(x, scope) } + /// Builder for the `DeleteIterator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeleteIterator { control_inputs: ::std::vec::Vec, } +/// An instance of 'DeleteIterator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeleteIteratorInst { + /// An instance of a fully built DeleteIterator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeleteIterator { /// Creates a new `DeleteIterator`. @@ -27357,24 +33223,10 @@ impl DeleteIterator { } /// Builds the `DeleteIterator` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - deleter: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), deleter.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - deleter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, deleter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeleteIterator", |nd| { nd.add_input(handle); nd.add_input(deleter); @@ -27384,24 +33236,46 @@ impl DeleteIterator { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeleteIterator` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), deleter.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, deleter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeleteIterator", |nd| { + nd.add_input(handle); + nd.add_input(deleter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DeleteIteratorInst{op}) + } +} +impl DeleteIteratorInst { +} +impl Into for DeleteIteratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeleteIterator::new().build(handle, deleter, scope)`. -pub fn delete_iterator< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - deleter: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn delete_iterator, O1: ::std::convert::Into>(handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { DeleteIterator::new().build(handle, deleter, scope) } + /// Builder for the `DeleteMemoryCache` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeleteMemoryCache { control_inputs: ::std::vec::Vec, } +/// An instance of 'DeleteMemoryCache' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeleteMemoryCacheInst { + /// An instance of a fully built DeleteMemoryCache Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeleteMemoryCache { /// Creates a new `DeleteMemoryCache`. @@ -27416,24 +33290,10 @@ impl DeleteMemoryCache { } /// Builds the `DeleteMemoryCache` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - deleter: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), deleter.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - deleter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, deleter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeleteMemoryCache", |nd| { nd.add_input(handle); nd.add_input(deleter); @@ -27443,25 +33303,47 @@ impl DeleteMemoryCache { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeleteMemoryCache` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), deleter.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, deleter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeleteMemoryCache", |nd| { + nd.add_input(handle); + nd.add_input(deleter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DeleteMemoryCacheInst{op}) + } +} +impl DeleteMemoryCacheInst { +} +impl Into for DeleteMemoryCacheInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeleteMemoryCache::new().build(handle, deleter, scope)`. -pub fn delete_memory_cache< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - deleter: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn delete_memory_cache, O1: ::std::convert::Into>(handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { DeleteMemoryCache::new().build(handle, deleter, scope) } + /// Builder for the `DeleteMultiDeviceIterator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeleteMultiDeviceIterator { N: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DeleteMultiDeviceIterator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeleteMultiDeviceIteratorInst { + /// An instance of a fully built DeleteMultiDeviceIterator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeleteMultiDeviceIterator { /// Creates a new `DeleteMultiDeviceIterator`. @@ -27482,32 +33364,10 @@ impl DeleteMultiDeviceIterator { } /// Builds the `DeleteMultiDeviceIterator` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - multi_device_iterator: O0, - iterators: O1, - deleter: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - multi_device_iterator.into(), - iterators.into(), - deleter.into(), - scope, - ) - } - - fn build_impl( - &self, - multi_device_iterator: crate::Output, - iterators: crate::Output, - deleter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, multi_device_iterator: O0, iterators: O1, deleter: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(multi_device_iterator.into(), iterators.into(), deleter.into(), scope) + } + fn build_impl(&self, multi_device_iterator: crate::Output, iterators: crate::Output, deleter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeleteMultiDeviceIterator", |nd| { nd.add_input(multi_device_iterator); nd.add_input(iterators); @@ -27515,32 +33375,56 @@ impl DeleteMultiDeviceIterator { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeleteMultiDeviceIterator` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, multi_device_iterator: O0, iterators: O1, deleter: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(multi_device_iterator.into(), iterators.into(), deleter.into(), scope) + } + fn build_instance_impl(&self, multi_device_iterator: crate::Output, iterators: crate::Output, deleter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeleteMultiDeviceIterator", |nd| { + nd.add_input(multi_device_iterator); + nd.add_input(iterators); + nd.add_input(deleter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DeleteMultiDeviceIteratorInst{op}) + } +} +impl DeleteMultiDeviceIteratorInst { +} +impl Into for DeleteMultiDeviceIteratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeleteMultiDeviceIterator::new().build(multi_device_iterator, iterators, deleter, scope)`. -pub fn delete_multi_device_iterator< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - multi_device_iterator: O0, - iterators: O1, - deleter: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn delete_multi_device_iterator, O1: ::std::convert::Into, O2: ::std::convert::Into>(multi_device_iterator: O0, iterators: O1, deleter: O2, scope: &mut crate::Scope) -> crate::Result { DeleteMultiDeviceIterator::new().build(multi_device_iterator, iterators, deleter, scope) } + /// Builder for the `DeleteRandomSeedGenerator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeleteRandomSeedGenerator { control_inputs: ::std::vec::Vec, } +/// An instance of 'DeleteRandomSeedGenerator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeleteRandomSeedGeneratorInst { + /// An instance of a fully built DeleteRandomSeedGenerator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeleteRandomSeedGenerator { /// Creates a new `DeleteRandomSeedGenerator`. @@ -27555,24 +33439,10 @@ impl DeleteRandomSeedGenerator { } /// Builds the `DeleteRandomSeedGenerator` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - deleter: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), deleter.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - deleter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, deleter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeleteRandomSeedGenerator", |nd| { nd.add_input(handle); nd.add_input(deleter); @@ -27582,24 +33452,46 @@ impl DeleteRandomSeedGenerator { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeleteRandomSeedGenerator` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), deleter.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, deleter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeleteRandomSeedGenerator", |nd| { + nd.add_input(handle); + nd.add_input(deleter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DeleteRandomSeedGeneratorInst{op}) + } +} +impl DeleteRandomSeedGeneratorInst { +} +impl Into for DeleteRandomSeedGeneratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeleteRandomSeedGenerator::new().build(handle, deleter, scope)`. -pub fn delete_random_seed_generator< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - deleter: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn delete_random_seed_generator, O1: ::std::convert::Into>(handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { DeleteRandomSeedGenerator::new().build(handle, deleter, scope) } + /// Builder for the `DeleteSeedGenerator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeleteSeedGenerator { control_inputs: ::std::vec::Vec, } +/// An instance of 'DeleteSeedGenerator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeleteSeedGeneratorInst { + /// An instance of a fully built DeleteSeedGenerator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeleteSeedGenerator { /// Creates a new `DeleteSeedGenerator`. @@ -27614,24 +33506,10 @@ impl DeleteSeedGenerator { } /// Builds the `DeleteSeedGenerator` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - deleter: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), deleter.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - deleter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, deleter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeleteSeedGenerator", |nd| { nd.add_input(handle); nd.add_input(deleter); @@ -27641,24 +33519,46 @@ impl DeleteSeedGenerator { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeleteSeedGenerator` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), deleter.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, deleter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeleteSeedGenerator", |nd| { + nd.add_input(handle); + nd.add_input(deleter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DeleteSeedGeneratorInst{op}) + } +} +impl DeleteSeedGeneratorInst { +} +impl Into for DeleteSeedGeneratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeleteSeedGenerator::new().build(handle, deleter, scope)`. -pub fn delete_seed_generator< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - deleter: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn delete_seed_generator, O1: ::std::convert::Into>(handle: O0, deleter: O1, scope: &mut crate::Scope) -> crate::Result { DeleteSeedGenerator::new().build(handle, deleter, scope) } + /// Builder for the `DeleteSessionTensor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeleteSessionTensor { control_inputs: ::std::vec::Vec, } +/// An instance of 'DeleteSessionTensor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeleteSessionTensorInst { + /// An instance of a fully built DeleteSessionTensor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeleteSessionTensor { /// Creates a new `DeleteSessionTensor`. @@ -27673,19 +33573,10 @@ impl DeleteSessionTensor { } /// Builds the `DeleteSessionTensor` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeleteSessionTensor", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -27694,15 +33585,34 @@ impl DeleteSessionTensor { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeleteSessionTensor` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeleteSessionTensor", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DeleteSessionTensorInst{op}) + } +} +impl DeleteSessionTensorInst { +} +impl Into for DeleteSessionTensorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeleteSessionTensor::new().build(handle, scope)`. -pub fn delete_session_tensor>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn delete_session_tensor>(handle: O0, scope: &mut crate::Scope) -> crate::Result { DeleteSessionTensor::new().build(handle, scope) } + /// Builder for the `DenseBincount` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DenseBincount { @@ -27711,6 +33621,12 @@ pub struct DenseBincount { binary_output: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DenseBincount' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DenseBincountInst { + /// An instance of a fully built DenseBincount Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DenseBincount { /// Creates a new `DenseBincount`. @@ -27743,27 +33659,10 @@ impl DenseBincount { } /// Builds the `DenseBincount` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - size: O1, - weights: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, size: O1, weights: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), size.into(), weights.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - size: crate::Output, - weights: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, size: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DenseBincount", |nd| { nd.add_input(input); nd.add_input(size); @@ -27771,33 +33670,64 @@ impl DenseBincount { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.binary_output { - nd.set_attr_bool("binary_output", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DenseBincount` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, size: O1, weights: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), size.into(), weights.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, size: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DenseBincount", |nd| { + nd.add_input(input); + nd.add_input(size); + nd.add_input(weights); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DenseBincountInst{op}) + } +} +impl DenseBincountInst { + /// Returns the 'output' output of this 'DenseBincount' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DenseBincountInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DenseBincount::new().build(input, size, weights, scope)`. -pub fn dense_bincount< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - size: O1, - weights: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dense_bincount, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, size: O1, weights: O2, scope: &mut crate::Scope) -> crate::Result { DenseBincount::new().build(input, size, weights, scope) } + /// Builder for the `DenseCountSparseOutput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DenseCountSparseOutput { @@ -27808,6 +33738,12 @@ pub struct DenseCountSparseOutput { output_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DenseCountSparseOutput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DenseCountSparseOutputInst { + /// An instance of a fully built DenseCountSparseOutput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DenseCountSparseOutput { /// Creates a new `DenseCountSparseOutput`. @@ -27840,10 +33776,7 @@ impl DenseCountSparseOutput { } /// Sets the `output_type` attribute. - pub fn output_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_type>(mut self, value: ArgType) -> Self { self.output_type = ::std::option::Option::Some(value.into()); self } @@ -27855,67 +33788,111 @@ impl DenseCountSparseOutput { } /// Builds the `DenseCountSparseOutput` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - values: O0, - weights: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, values: O0, weights: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(values.into(), weights.into(), scope) } - - fn build_impl( - &self, - values: crate::Output, - weights: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, values: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DenseCountSparseOutput", |nd| { nd.add_input(values); nd.add_input(weights); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.minlength { - nd.set_attr_int("minlength", *value)?; - } - if let ::std::option::Option::Some(value) = &self.maxlength { - nd.set_attr_int("maxlength", *value)?; - } - if let ::std::option::Option::Some(value) = &self.binary_output { - nd.set_attr_bool("binary_output", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_type { - nd.set_attr_type("output_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.minlength { + nd.set_attr_int("minlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.maxlength { + nd.set_attr_int("maxlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DenseCountSparseOutput` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, values: O0, weights: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(values.into(), weights.into(), scope) + } + fn build_instance_impl(&self, values: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DenseCountSparseOutput", |nd| { + nd.add_input(values); + nd.add_input(weights); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.minlength { + nd.set_attr_int("minlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.maxlength { + nd.set_attr_int("maxlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DenseCountSparseOutputInst{op}) + } +} +impl DenseCountSparseOutputInst { + /// Returns the 'output_indices' output of this 'DenseCountSparseOutput' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'DenseCountSparseOutput' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_dense_shape' output of this 'DenseCountSparseOutput' operation. + pub fn output_dense_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for DenseCountSparseOutputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DenseCountSparseOutput::new().build(values, weights, scope)`. -pub fn dense_count_sparse_output< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - values: O0, - weights: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dense_count_sparse_output, O1: ::std::convert::Into>(values: O0, weights: O1, scope: &mut crate::Scope) -> crate::Result { DenseCountSparseOutput::new().build(values, weights, scope) } + /// Builder for the `DenseToCSRSparseMatrix` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DenseToCSRSparseMatrix { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DenseToCSRSparseMatrix' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DenseToCSRSparseMatrixInst { + /// An instance of a fully built DenseToCSRSparseMatrix Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DenseToCSRSparseMatrix { /// Creates a new `DenseToCSRSparseMatrix`. @@ -27936,49 +33913,61 @@ impl DenseToCSRSparseMatrix { } /// Builds the `DenseToCSRSparseMatrix` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - dense_input: O0, - indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, dense_input: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(dense_input.into(), indices.into(), scope) } - - fn build_impl( - &self, - dense_input: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, dense_input: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DenseToCSRSparseMatrix", |nd| { nd.add_input(dense_input); nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DenseToCSRSparseMatrix` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, dense_input: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dense_input.into(), indices.into(), scope) + } + fn build_instance_impl(&self, dense_input: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DenseToCSRSparseMatrix", |nd| { + nd.add_input(dense_input); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DenseToCSRSparseMatrixInst{op}) + } +} +impl DenseToCSRSparseMatrixInst { + /// Returns the 'sparse_output' output of this 'DenseToCSRSparseMatrix' operation. + pub fn sparse_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DenseToCSRSparseMatrixInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DenseToCSRSparseMatrix::new().build(dense_input, indices, scope)`. -pub fn dense_to_csrsparse_matrix< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - dense_input: O0, - indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dense_to_csrsparse_matrix, O1: ::std::convert::Into>(dense_input: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { DenseToCSRSparseMatrix::new().build(dense_input, indices, scope) } + /// Builder for the `DenseToDenseSetOperation` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DenseToDenseSetOperation { @@ -27987,6 +33976,12 @@ pub struct DenseToDenseSetOperation { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DenseToDenseSetOperation' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DenseToDenseSetOperationInst { + /// An instance of a fully built DenseToDenseSetOperation Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DenseToDenseSetOperation { /// Creates a new `DenseToDenseSetOperation`. @@ -27995,10 +33990,7 @@ impl DenseToDenseSetOperation { } /// Sets the `set_operation` attribute. - pub fn set_operation>( - mut self, - value: ArgType, - ) -> Self { + pub fn set_operation>(mut self, value: ArgType) -> Self { self.set_operation = ::std::option::Option::Some(value.into()); self } @@ -28022,55 +34014,87 @@ impl DenseToDenseSetOperation { } /// Builds the `DenseToDenseSetOperation` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - set1: O0, - set2: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, set1: O0, set2: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(set1.into(), set2.into(), scope) } - - fn build_impl( - &self, - set1: crate::Output, - set2: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, set1: crate::Output, set2: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DenseToDenseSetOperation", |nd| { nd.add_input(set1); nd.add_input(set2); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.set_operation { - nd.set_attr_string("set_operation", value)?; - } - if let ::std::option::Option::Some(value) = &self.validate_indices { - nd.set_attr_bool("validate_indices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.set_operation { + nd.set_attr_string("set_operation", value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DenseToDenseSetOperation` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, set1: O0, set2: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(set1.into(), set2.into(), scope) + } + fn build_instance_impl(&self, set1: crate::Output, set2: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DenseToDenseSetOperation", |nd| { + nd.add_input(set1); + nd.add_input(set2); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.set_operation { + nd.set_attr_string("set_operation", value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DenseToDenseSetOperationInst{op}) + } +} +impl DenseToDenseSetOperationInst { + /// Returns the 'result_indices' output of this 'DenseToDenseSetOperation' operation. + pub fn result_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'result_values' output of this 'DenseToDenseSetOperation' operation. + pub fn result_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'result_shape' output of this 'DenseToDenseSetOperation' operation. + pub fn result_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for DenseToDenseSetOperationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DenseToDenseSetOperation::new().build(set1, set2, scope)`. -pub fn dense_to_dense_set_operation< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - set1: O0, - set2: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dense_to_dense_set_operation, O1: ::std::convert::Into>(set1: O0, set2: O1, scope: &mut crate::Scope) -> crate::Result { DenseToDenseSetOperation::new().build(set1, set2, scope) } + /// Builder for the `DenseToSparseBatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DenseToSparseBatchDataset { @@ -28078,6 +34102,12 @@ pub struct DenseToSparseBatchDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DenseToSparseBatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DenseToSparseBatchDatasetInst { + /// An instance of a fully built DenseToSparseBatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DenseToSparseBatchDataset { /// Creates a new `DenseToSparseBatchDataset`. @@ -28086,19 +34116,13 @@ impl DenseToSparseBatchDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -28110,32 +34134,10 @@ impl DenseToSparseBatchDataset { } /// Builds the `DenseToSparseBatchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - batch_size: O1, - row_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - batch_size.into(), - row_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - batch_size: crate::Output, - row_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, row_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), batch_size.into(), row_shape.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, row_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DenseToSparseBatchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(batch_size); @@ -28143,30 +34145,58 @@ impl DenseToSparseBatchDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DenseToSparseBatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, row_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), batch_size.into(), row_shape.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, row_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DenseToSparseBatchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(batch_size); + nd.add_input(row_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DenseToSparseBatchDatasetInst{op}) + } +} +impl DenseToSparseBatchDatasetInst { + /// Returns the 'handle' output of this 'DenseToSparseBatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DenseToSparseBatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DenseToSparseBatchDataset::new().build(input_dataset, batch_size, row_shape, scope)`. -pub fn dense_to_sparse_batch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - batch_size: O1, - row_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dense_to_sparse_batch_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, batch_size: O1, row_shape: O2, scope: &mut crate::Scope) -> crate::Result { DenseToSparseBatchDataset::new().build(input_dataset, batch_size, row_shape, scope) } + /// Builder for the `DenseToSparseSetOperation` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DenseToSparseSetOperation { @@ -28175,6 +34205,12 @@ pub struct DenseToSparseSetOperation { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DenseToSparseSetOperation' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DenseToSparseSetOperationInst { + /// An instance of a fully built DenseToSparseSetOperation Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DenseToSparseSetOperation { /// Creates a new `DenseToSparseSetOperation`. @@ -28183,10 +34219,7 @@ impl DenseToSparseSetOperation { } /// Sets the `set_operation` attribute. - pub fn set_operation>( - mut self, - value: ArgType, - ) -> Self { + pub fn set_operation>(mut self, value: ArgType) -> Self { self.set_operation = ::std::option::Option::Some(value.into()); self } @@ -28210,36 +34243,10 @@ impl DenseToSparseSetOperation { } /// Builds the `DenseToSparseSetOperation` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - set1: O0, - set2_indices: O1, - set2_values: O2, - set2_shape: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - set1.into(), - set2_indices.into(), - set2_values.into(), - set2_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - set1: crate::Output, - set2_indices: crate::Output, - set2_values: crate::Output, - set2_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, set1: O0, set2_indices: O1, set2_values: O2, set2_shape: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(set1.into(), set2_indices.into(), set2_values.into(), set2_shape.into(), scope) + } + fn build_impl(&self, set1: crate::Output, set2_indices: crate::Output, set2_values: crate::Output, set2_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DenseToSparseSetOperation", |nd| { nd.add_input(set1); nd.add_input(set2_indices); @@ -28248,35 +34255,79 @@ impl DenseToSparseSetOperation { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.set_operation { - nd.set_attr_string("set_operation", value)?; - } - if let ::std::option::Option::Some(value) = &self.validate_indices { - nd.set_attr_bool("validate_indices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.set_operation { + nd.set_attr_string("set_operation", value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DenseToSparseSetOperation` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, set1: O0, set2_indices: O1, set2_values: O2, set2_shape: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(set1.into(), set2_indices.into(), set2_values.into(), set2_shape.into(), scope) + } + fn build_instance_impl(&self, set1: crate::Output, set2_indices: crate::Output, set2_values: crate::Output, set2_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DenseToSparseSetOperation", |nd| { + nd.add_input(set1); + nd.add_input(set2_indices); + nd.add_input(set2_values); + nd.add_input(set2_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.set_operation { + nd.set_attr_string("set_operation", value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DenseToSparseSetOperationInst{op}) + } +} +impl DenseToSparseSetOperationInst { + /// Returns the 'result_indices' output of this 'DenseToSparseSetOperation' operation. + pub fn result_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'result_values' output of this 'DenseToSparseSetOperation' operation. + pub fn result_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'result_shape' output of this 'DenseToSparseSetOperation' operation. + pub fn result_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for DenseToSparseSetOperationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DenseToSparseSetOperation::new().build(set1, set2_indices, set2_values, set2_shape, scope)`. -pub fn dense_to_sparse_set_operation< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - set1: O0, - set2_indices: O1, - set2_values: O2, - set2_shape: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dense_to_sparse_set_operation, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(set1: O0, set2_indices: O1, set2_values: O2, set2_shape: O3, scope: &mut crate::Scope) -> crate::Result { DenseToSparseSetOperation::new().build(set1, set2_indices, set2_values, set2_shape, scope) } + /// Builder for the `DepthToSpace` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DepthToSpace { @@ -28285,6 +34336,12 @@ pub struct DepthToSpace { data_format: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DepthToSpace' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DepthToSpaceInst { + /// An instance of a fully built DepthToSpace Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DepthToSpace { /// Creates a new `DepthToSpace`. @@ -28305,10 +34362,7 @@ impl DepthToSpace { } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -28320,45 +34374,71 @@ impl DepthToSpace { } /// Builds the `DepthToSpace` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DepthToSpace", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.block_size { - nd.set_attr_int("block_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.block_size { + nd.set_attr_int("block_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DepthToSpace` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DepthToSpace", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.block_size { + nd.set_attr_int("block_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DepthToSpaceInst{op}) + } +} +impl DepthToSpaceInst { + /// Returns the 'output' output of this 'DepthToSpace' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DepthToSpaceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DepthToSpace::new().build(input, scope)`. -pub fn depth_to_space>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn depth_to_space>(input: O0, scope: &mut crate::Scope) -> crate::Result { DepthToSpace::new().build(input, scope) } + /// Builder for the `DepthwiseConv2dNative` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DepthwiseConv2dNative { @@ -28370,6 +34450,12 @@ pub struct DepthwiseConv2dNative { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DepthwiseConv2dNative' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DepthwiseConv2dNativeInst { + /// An instance of a fully built DepthwiseConv2dNative Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DepthwiseConv2dNative { /// Creates a new `DepthwiseConv2dNative`. @@ -28384,46 +34470,31 @@ impl DepthwiseConv2dNative { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `explicit_paddings` attribute. - pub fn explicit_paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn explicit_paddings>>(mut self, value: ArgType) -> Self { self.explicit_paddings = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -28435,64 +34506,91 @@ impl DepthwiseConv2dNative { } /// Builds the `DepthwiseConv2dNative` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), filter.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DepthwiseConv2dNative", |nd| { nd.add_input(input); nd.add_input(filter); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.explicit_paddings { - nd.set_attr_int_list("explicit_paddings", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DepthwiseConv2dNative` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DepthwiseConv2dNative", |nd| { + nd.add_input(input); + nd.add_input(filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DepthwiseConv2dNativeInst{op}) + } +} +impl DepthwiseConv2dNativeInst { + /// Returns the 'output' output of this 'DepthwiseConv2dNative' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DepthwiseConv2dNativeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DepthwiseConv2dNative::new().build(input, filter, scope)`. -pub fn depthwise_conv2d_native< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - filter: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn depthwise_conv2d_native, O1: ::std::convert::Into>(input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { DepthwiseConv2dNative::new().build(input, filter, scope) } + /// Builder for the `DepthwiseConv2dNativeBackpropFilter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DepthwiseConv2dNativeBackpropFilter { @@ -28504,6 +34602,12 @@ pub struct DepthwiseConv2dNativeBackpropFilter { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DepthwiseConv2dNativeBackpropFilter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DepthwiseConv2dNativeBackpropFilterInst { + /// An instance of a fully built DepthwiseConv2dNativeBackpropFilter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DepthwiseConv2dNativeBackpropFilter { /// Creates a new `DepthwiseConv2dNativeBackpropFilter`. @@ -28518,46 +34622,31 @@ impl DepthwiseConv2dNativeBackpropFilter { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `explicit_paddings` attribute. - pub fn explicit_paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn explicit_paddings>>(mut self, value: ArgType) -> Self { self.explicit_paddings = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -28569,32 +34658,10 @@ impl DepthwiseConv2dNativeBackpropFilter { } /// Builds the `DepthwiseConv2dNativeBackpropFilter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - filter_sizes: O1, - out_backprop: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter_sizes.into(), - out_backprop.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter_sizes: crate::Output, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter_sizes: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter_sizes.into(), out_backprop.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter_sizes: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DepthwiseConv2dNativeBackpropFilter", |nd| { nd.add_input(input); nd.add_input(filter_sizes); @@ -28602,42 +34669,82 @@ impl DepthwiseConv2dNativeBackpropFilter { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.explicit_paddings { - nd.set_attr_int_list("explicit_paddings", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DepthwiseConv2dNativeBackpropFilter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter_sizes: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter_sizes.into(), out_backprop.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter_sizes: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DepthwiseConv2dNativeBackpropFilter", |nd| { + nd.add_input(input); + nd.add_input(filter_sizes); + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DepthwiseConv2dNativeBackpropFilterInst{op}) + } +} +impl DepthwiseConv2dNativeBackpropFilterInst { + /// Returns the 'output' output of this 'DepthwiseConv2dNativeBackpropFilter' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DepthwiseConv2dNativeBackpropFilterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DepthwiseConv2dNativeBackpropFilter::new().build(input, filter_sizes, out_backprop, scope)`. -pub fn depthwise_conv2d_native_backprop_filter< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - filter_sizes: O1, - out_backprop: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn depthwise_conv2d_native_backprop_filter, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, filter_sizes: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { DepthwiseConv2dNativeBackpropFilter::new().build(input, filter_sizes, out_backprop, scope) } + /// Builder for the `DepthwiseConv2dNativeBackpropInput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DepthwiseConv2dNativeBackpropInput { @@ -28649,6 +34756,12 @@ pub struct DepthwiseConv2dNativeBackpropInput { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DepthwiseConv2dNativeBackpropInput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DepthwiseConv2dNativeBackpropInputInst { + /// An instance of a fully built DepthwiseConv2dNativeBackpropInput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DepthwiseConv2dNativeBackpropInput { /// Creates a new `DepthwiseConv2dNativeBackpropInput`. @@ -28663,46 +34776,31 @@ impl DepthwiseConv2dNativeBackpropInput { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `explicit_paddings` attribute. - pub fn explicit_paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn explicit_paddings>>(mut self, value: ArgType) -> Self { self.explicit_paddings = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -28714,32 +34812,10 @@ impl DepthwiseConv2dNativeBackpropInput { } /// Builds the `DepthwiseConv2dNativeBackpropInput` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_sizes: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_sizes.into(), - filter.into(), - out_backprop.into(), - scope, - ) - } - - fn build_impl( - &self, - input_sizes: crate::Output, - filter: crate::Output, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_sizes: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_sizes.into(), filter.into(), out_backprop.into(), scope) + } + fn build_impl(&self, input_sizes: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DepthwiseConv2dNativeBackpropInput", |nd| { nd.add_input(input_sizes); nd.add_input(filter); @@ -28747,42 +34823,82 @@ impl DepthwiseConv2dNativeBackpropInput { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.explicit_paddings { - nd.set_attr_int_list("explicit_paddings", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DepthwiseConv2dNativeBackpropInput` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_sizes: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_sizes.into(), filter.into(), out_backprop.into(), scope) + } + fn build_instance_impl(&self, input_sizes: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DepthwiseConv2dNativeBackpropInput", |nd| { + nd.add_input(input_sizes); + nd.add_input(filter); + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DepthwiseConv2dNativeBackpropInputInst{op}) + } +} +impl DepthwiseConv2dNativeBackpropInputInst { + /// Returns the 'output' output of this 'DepthwiseConv2dNativeBackpropInput' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DepthwiseConv2dNativeBackpropInputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DepthwiseConv2dNativeBackpropInput::new().build(input_sizes, filter, out_backprop, scope)`. -pub fn depthwise_conv2d_native_backprop_input< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_sizes: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn depthwise_conv2d_native_backprop_input, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_sizes: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { DepthwiseConv2dNativeBackpropInput::new().build(input_sizes, filter, out_backprop, scope) } + /// Builder for the `Dequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Dequantize { @@ -28793,6 +34909,12 @@ pub struct Dequantize { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Dequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DequantizeInst { + /// An instance of a fully built Dequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Dequantize { /// Creates a new `Dequantize`. @@ -28807,10 +34929,7 @@ impl Dequantize { } /// Sets the `mode` attribute. - pub fn mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn mode>(mut self, value: ArgType) -> Self { self.mode = ::std::option::Option::Some(value.into()); self } @@ -28840,27 +34959,10 @@ impl Dequantize { } /// Builds the `Dequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - min_range: O1, - max_range: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, min_range: O1, max_range: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), min_range.into(), max_range.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - min_range: crate::Output, - max_range: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, min_range: crate::Output, max_range: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Dequantize", |nd| { nd.add_input(input); nd.add_input(min_range); @@ -28868,44 +34970,87 @@ impl Dequantize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.mode { - nd.set_attr_string("mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } - if let ::std::option::Option::Some(value) = &self.axis { - nd.set_attr_int("axis", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Dequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, min_range: O1, max_range: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), min_range.into(), max_range.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, min_range: crate::Output, max_range: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Dequantize", |nd| { + nd.add_input(input); + nd.add_input(min_range); + nd.add_input(max_range); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DequantizeInst{op}) + } +} +impl DequantizeInst { + /// Returns the 'output' output of this 'Dequantize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DequantizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Dequantize::new().build(input, min_range, max_range, scope)`. -pub fn dequantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - min_range: O1, - max_range: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dequantize, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, min_range: O1, max_range: O2, scope: &mut crate::Scope) -> crate::Result { Dequantize::new().build(input, min_range, max_range, scope) } + /// Builder for the `DeserializeIterator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeserializeIterator { control_inputs: ::std::vec::Vec, } +/// An instance of 'DeserializeIterator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeserializeIteratorInst { + /// An instance of a fully built DeserializeIterator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeserializeIterator { /// Creates a new `DeserializeIterator`. @@ -28920,24 +35065,10 @@ impl DeserializeIterator { } /// Builds the `DeserializeIterator` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - resource_handle: O0, - serialized: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, resource_handle: O0, serialized: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource_handle.into(), serialized.into(), scope) } - - fn build_impl( - &self, - resource_handle: crate::Output, - serialized: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource_handle: crate::Output, serialized: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeserializeIterator", |nd| { nd.add_input(resource_handle); nd.add_input(serialized); @@ -28947,25 +35078,47 @@ impl DeserializeIterator { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeserializeIterator` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, resource_handle: O0, serialized: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource_handle.into(), serialized.into(), scope) + } + fn build_instance_impl(&self, resource_handle: crate::Output, serialized: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeserializeIterator", |nd| { + nd.add_input(resource_handle); + nd.add_input(serialized); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DeserializeIteratorInst{op}) + } +} +impl DeserializeIteratorInst { +} +impl Into for DeserializeIteratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeserializeIterator::new().build(resource_handle, serialized, scope)`. -pub fn deserialize_iterator< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - resource_handle: O0, - serialized: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn deserialize_iterator, O1: ::std::convert::Into>(resource_handle: O0, serialized: O1, scope: &mut crate::Scope) -> crate::Result { DeserializeIterator::new().build(resource_handle, serialized, scope) } + /// Builder for the `DeserializeManySparse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeserializeManySparse { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DeserializeManySparse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeserializeManySparseInst { + /// An instance of a fully built DeserializeManySparse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeserializeManySparse { /// Creates a new `DeserializeManySparse`. @@ -28986,39 +35139,73 @@ impl DeserializeManySparse { } /// Builds the `DeserializeManySparse` operation. - pub fn build>( - &self, - serialized_sparse: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, serialized_sparse: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(serialized_sparse.into(), scope) } - - fn build_impl( - &self, - serialized_sparse: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, serialized_sparse: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeserializeManySparse", |nd| { nd.add_input(serialized_sparse); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeserializeManySparse` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, serialized_sparse: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(serialized_sparse.into(), scope) + } + fn build_instance_impl(&self, serialized_sparse: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeserializeManySparse", |nd| { + nd.add_input(serialized_sparse); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DeserializeManySparseInst{op}) + } +} +impl DeserializeManySparseInst { + /// Returns the 'sparse_indices' output of this 'DeserializeManySparse' operation. + pub fn sparse_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'sparse_values' output of this 'DeserializeManySparse' operation. + pub fn sparse_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sparse_shape' output of this 'DeserializeManySparse' operation. + pub fn sparse_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for DeserializeManySparseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeserializeManySparse::new().build(serialized_sparse, scope)`. -pub fn deserialize_many_sparse>( - serialized_sparse: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn deserialize_many_sparse>(serialized_sparse: O0, scope: &mut crate::Scope) -> crate::Result { DeserializeManySparse::new().build(serialized_sparse, scope) } + /// Builder for the `DeserializeSparse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeserializeSparse { @@ -29026,6 +35213,12 @@ pub struct DeserializeSparse { Tserialized: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DeserializeSparse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeserializeSparseInst { + /// An instance of a fully built DeserializeSparse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeserializeSparse { /// Creates a new `DeserializeSparse`. @@ -29040,10 +35233,7 @@ impl DeserializeSparse { } /// Sets the `Tserialized` attribute. - pub fn Tserialized>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tserialized>(mut self, value: ArgType) -> Self { self.Tserialized = ::std::option::Option::Some(value.into()); self } @@ -29055,48 +35245,91 @@ impl DeserializeSparse { } /// Builds the `DeserializeSparse` operation. - pub fn build>( - &self, - serialized_sparse: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, serialized_sparse: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(serialized_sparse.into(), scope) } - - fn build_impl( - &self, - serialized_sparse: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, serialized_sparse: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeserializeSparse", |nd| { nd.add_input(serialized_sparse); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tserialized { - nd.set_attr_type("Tserialized", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tserialized { + nd.set_attr_type("Tserialized", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeserializeSparse` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, serialized_sparse: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(serialized_sparse.into(), scope) + } + fn build_instance_impl(&self, serialized_sparse: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeserializeSparse", |nd| { + nd.add_input(serialized_sparse); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tserialized { + nd.set_attr_type("Tserialized", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DeserializeSparseInst{op}) + } +} +impl DeserializeSparseInst { + /// Returns the 'sparse_indices' output of this 'DeserializeSparse' operation. + pub fn sparse_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'sparse_values' output of this 'DeserializeSparse' operation. + pub fn sparse_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sparse_shape' output of this 'DeserializeSparse' operation. + pub fn sparse_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for DeserializeSparseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeserializeSparse::new().build(serialized_sparse, scope)`. -pub fn deserialize_sparse>( - serialized_sparse: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn deserialize_sparse>(serialized_sparse: O0, scope: &mut crate::Scope) -> crate::Result { DeserializeSparse::new().build(serialized_sparse, scope) } + /// Builder for the `DestroyResourceOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DestroyResourceOp { ignore_lookup_error: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DestroyResourceOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DestroyResourceOpInst { + /// An instance of a fully built DestroyResourceOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DestroyResourceOp { /// Creates a new `DestroyResourceOp`. @@ -29105,10 +35338,7 @@ impl DestroyResourceOp { } /// Sets the `ignore_lookup_error` attribute. - pub fn ignore_lookup_error>( - mut self, - value: ArgType, - ) -> Self { + pub fn ignore_lookup_error>(mut self, value: ArgType) -> Self { self.ignore_lookup_error = ::std::option::Option::Some(value.into()); self } @@ -29120,39 +35350,52 @@ impl DestroyResourceOp { } /// Builds the `DestroyResourceOp` operation. - pub fn build>( - &self, - resource: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DestroyResourceOp", |nd| { nd.add_input(resource); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ignore_lookup_error { - nd.set_attr_bool("ignore_lookup_error", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ignore_lookup_error { + nd.set_attr_bool("ignore_lookup_error", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DestroyResourceOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DestroyResourceOp", |nd| { + nd.add_input(resource); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ignore_lookup_error { + nd.set_attr_bool("ignore_lookup_error", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DestroyResourceOpInst{op}) + } +} +impl DestroyResourceOpInst { +} +impl Into for DestroyResourceOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DestroyResourceOp::new().build(resource, scope)`. -pub fn destroy_resource_op>( - resource: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn destroy_resource_op>(resource: O0, scope: &mut crate::Scope) -> crate::Result { DestroyResourceOp::new().build(resource, scope) } + /// Builder for the `DestroyTemporaryVariable` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DestroyTemporaryVariable { @@ -29160,6 +35403,12 @@ pub struct DestroyTemporaryVariable { var_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DestroyTemporaryVariable' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DestroyTemporaryVariableInst { + /// An instance of a fully built DestroyTemporaryVariable Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DestroyTemporaryVariable { /// Creates a new `DestroyTemporaryVariable`. @@ -29174,10 +35423,7 @@ impl DestroyTemporaryVariable { } /// Sets the `var_name` attribute. - pub fn var_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn var_name>(mut self, value: ArgType) -> Self { self.var_name = ::std::option::Option::Some(value.into()); self } @@ -29189,48 +35435,77 @@ impl DestroyTemporaryVariable { } /// Builds the `DestroyTemporaryVariable` operation. - pub fn build>( - &self, - ref_: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, ref_: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DestroyTemporaryVariable", |nd| { nd.add_input(ref_); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.var_name { - nd.set_attr_string("var_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.var_name { + nd.set_attr_string("var_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DestroyTemporaryVariable` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, ref_: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DestroyTemporaryVariable", |nd| { + nd.add_input(ref_); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.var_name { + nd.set_attr_string("var_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DestroyTemporaryVariableInst{op}) + } +} +impl DestroyTemporaryVariableInst { + /// Returns the 'value' output of this 'DestroyTemporaryVariable' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DestroyTemporaryVariableInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DestroyTemporaryVariable::new().build(ref_, scope)`. -pub fn destroy_temporary_variable>( - ref_: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn destroy_temporary_variable>(ref_: O0, scope: &mut crate::Scope) -> crate::Result { DestroyTemporaryVariable::new().build(ref_, scope) } + /// Builder for the `DeviceIndex` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DeviceIndex { device_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DeviceIndex' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DeviceIndexInst { + /// An instance of a fully built DeviceIndex Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DeviceIndex { /// Creates a new `DeviceIndex`. @@ -29239,10 +35514,7 @@ impl DeviceIndex { } /// Sets the `device_names` attribute. - pub fn device_names>>( - mut self, - value: ArgType, - ) -> Self { + pub fn device_names>>(mut self, value: ArgType) -> Self { self.device_names = ::std::option::Option::Some(value.into()); self } @@ -29254,33 +35526,69 @@ impl DeviceIndex { } /// Builds the `DeviceIndex` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DeviceIndex", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.device_names { - nd.set_attr_string_list("device_names", value)?; - } + if let ::std::option::Option::Some(value) = &self.device_names { + nd.set_attr_string_list("device_names", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DeviceIndex` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DeviceIndex", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.device_names { + nd.set_attr_string_list("device_names", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DeviceIndexInst{op}) + } +} +impl DeviceIndexInst { + /// Returns the 'index' output of this 'DeviceIndex' operation. + pub fn index(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DeviceIndexInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DeviceIndex::new().build(scope)`. -pub fn device_index(scope: &mut crate::Scope) -> crate::Result { +pub fn device_index<>(scope: &mut crate::Scope) -> crate::Result { DeviceIndex::new().build(scope) } + /// Builder for the `Diag` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Diag { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Diag' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DiagInst { + /// An instance of a fully built Diag Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Diag { /// Creates a new `Diag`. @@ -29301,45 +35609,71 @@ impl Diag { } /// Builds the `Diag` operation. - pub fn build>( - &self, - diagonal: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, diagonal: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(diagonal.into(), scope) } - - fn build_impl( - &self, - diagonal: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, diagonal: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Diag", |nd| { nd.add_input(diagonal); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Diag` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, diagonal: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(diagonal.into(), scope) + } + fn build_instance_impl(&self, diagonal: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Diag", |nd| { + nd.add_input(diagonal); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DiagInst{op}) + } +} +impl DiagInst { + /// Returns the 'output' output of this 'Diag' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DiagInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Diag::new().build(diagonal, scope)`. -pub fn diag>( - diagonal: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn diag>(diagonal: O0, scope: &mut crate::Scope) -> crate::Result { Diag::new().build(diagonal, scope) } + /// Builder for the `DiagPart` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DiagPart { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DiagPart' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DiagPartInst { + /// An instance of a fully built DiagPart Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DiagPart { /// Creates a new `DiagPart`. @@ -29360,45 +35694,71 @@ impl DiagPart { } /// Builds the `DiagPart` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DiagPart", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DiagPart` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DiagPart", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DiagPartInst{op}) + } +} +impl DiagPartInst { + /// Returns the 'diagonal' output of this 'DiagPart' operation. + pub fn diagonal(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DiagPartInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DiagPart::new().build(input, scope)`. -pub fn diag_part>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn diag_part>(input: O0, scope: &mut crate::Scope) -> crate::Result { DiagPart::new().build(input, scope) } + /// Builder for the `Digamma` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Digamma { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Digamma' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DigammaInst { + /// An instance of a fully built Digamma Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Digamma { /// Creates a new `Digamma`. @@ -29419,39 +35779,59 @@ impl Digamma { } /// Builds the `Digamma` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Digamma", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Digamma` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Digamma", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DigammaInst{op}) + } +} +impl DigammaInst { + /// Returns the 'y' output of this 'Digamma' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DigammaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Digamma::new().build(x, scope)`. -pub fn digamma>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn digamma>(x: O0, scope: &mut crate::Scope) -> crate::Result { Digamma::new().build(x, scope) } + /// Builder for the `Dilation2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Dilation2D { @@ -29461,6 +35841,12 @@ pub struct Dilation2D { padding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Dilation2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Dilation2DInst { + /// An instance of a fully built Dilation2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Dilation2D { /// Creates a new `Dilation2D`. @@ -29475,28 +35861,19 @@ impl Dilation2D { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `rates` attribute. - pub fn rates>>( - mut self, - value: ArgType, - ) -> Self { + pub fn rates>>(mut self, value: ArgType) -> Self { self.rates = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } @@ -29508,58 +35885,79 @@ impl Dilation2D { } /// Builds the `Dilation2D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), filter.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Dilation2D", |nd| { nd.add_input(input); nd.add_input(filter); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.rates { - nd.set_attr_int_list("rates", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.rates { + nd.set_attr_int_list("rates", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Dilation2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Dilation2D", |nd| { + nd.add_input(input); + nd.add_input(filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.rates { + nd.set_attr_int_list("rates", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Dilation2DInst{op}) + } +} +impl Dilation2DInst { + /// Returns the 'output' output of this 'Dilation2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Dilation2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Dilation2D::new().build(input, filter, scope)`. -pub fn dilation2_d< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - filter: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dilation2_d, O1: ::std::convert::Into>(input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { Dilation2D::new().build(input, filter, scope) } + /// Builder for the `Dilation2DBackpropFilter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Dilation2DBackpropFilter { @@ -29569,6 +35967,12 @@ pub struct Dilation2DBackpropFilter { padding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Dilation2DBackpropFilter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Dilation2DBackpropFilterInst { + /// An instance of a fully built Dilation2DBackpropFilter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Dilation2DBackpropFilter { /// Creates a new `Dilation2DBackpropFilter`. @@ -29583,28 +35987,19 @@ impl Dilation2DBackpropFilter { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `rates` attribute. - pub fn rates>>( - mut self, - value: ArgType, - ) -> Self { + pub fn rates>>(mut self, value: ArgType) -> Self { self.rates = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } @@ -29616,27 +36011,10 @@ impl Dilation2DBackpropFilter { } /// Builds the `Dilation2DBackpropFilter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), filter.into(), out_backprop.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Dilation2DBackpropFilter", |nd| { nd.add_input(input); nd.add_input(filter); @@ -29644,36 +36022,70 @@ impl Dilation2DBackpropFilter { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.rates { - nd.set_attr_int_list("rates", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.rates { + nd.set_attr_int_list("rates", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Dilation2DBackpropFilter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), out_backprop.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Dilation2DBackpropFilter", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.rates { + nd.set_attr_int_list("rates", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Dilation2DBackpropFilterInst{op}) + } +} +impl Dilation2DBackpropFilterInst { + /// Returns the 'filter_backprop' output of this 'Dilation2DBackpropFilter' operation. + pub fn filter_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Dilation2DBackpropFilterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Dilation2DBackpropFilter::new().build(input, filter, out_backprop, scope)`. -pub fn dilation2_dbackprop_filter< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dilation2_dbackprop_filter, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { Dilation2DBackpropFilter::new().build(input, filter, out_backprop, scope) } + /// Builder for the `Dilation2DBackpropInput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Dilation2DBackpropInput { @@ -29683,6 +36095,12 @@ pub struct Dilation2DBackpropInput { padding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Dilation2DBackpropInput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Dilation2DBackpropInputInst { + /// An instance of a fully built Dilation2DBackpropInput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Dilation2DBackpropInput { /// Creates a new `Dilation2DBackpropInput`. @@ -29697,28 +36115,19 @@ impl Dilation2DBackpropInput { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `rates` attribute. - pub fn rates>>( - mut self, - value: ArgType, - ) -> Self { + pub fn rates>>(mut self, value: ArgType) -> Self { self.rates = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } @@ -29730,27 +36139,10 @@ impl Dilation2DBackpropInput { } /// Builds the `Dilation2DBackpropInput` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), filter.into(), out_backprop.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - out_backprop: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Dilation2DBackpropInput", |nd| { nd.add_input(input); nd.add_input(filter); @@ -29758,36 +36150,70 @@ impl Dilation2DBackpropInput { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.rates { - nd.set_attr_int_list("rates", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.rates { + nd.set_attr_int_list("rates", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Dilation2DBackpropInput` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), out_backprop.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, out_backprop: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Dilation2DBackpropInput", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(out_backprop); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.rates { + nd.set_attr_int_list("rates", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Dilation2DBackpropInputInst{op}) + } +} +impl Dilation2DBackpropInputInst { + /// Returns the 'in_backprop' output of this 'Dilation2DBackpropInput' operation. + pub fn in_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Dilation2DBackpropInputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Dilation2DBackpropInput::new().build(input, filter, out_backprop, scope)`. -pub fn dilation2_dbackprop_input< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - filter: O1, - out_backprop: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dilation2_dbackprop_input, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, filter: O1, out_backprop: O2, scope: &mut crate::Scope) -> crate::Result { Dilation2DBackpropInput::new().build(input, filter, out_backprop, scope) } + /// Builder for the `DirectedInterleaveDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DirectedInterleaveDataset { @@ -29797,6 +36223,12 @@ pub struct DirectedInterleaveDataset { stop_on_empty_dataset: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DirectedInterleaveDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DirectedInterleaveDatasetInst { + /// An instance of a fully built DirectedInterleaveDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DirectedInterleaveDataset { /// Creates a new `DirectedInterleaveDataset`. @@ -29805,19 +36237,13 @@ impl DirectedInterleaveDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -29829,10 +36255,7 @@ impl DirectedInterleaveDataset { } /// Sets the `stop_on_empty_dataset` attribute. - pub fn stop_on_empty_dataset>( - mut self, - value: ArgType, - ) -> Self { + pub fn stop_on_empty_dataset>(mut self, value: ArgType) -> Self { self.stop_on_empty_dataset = ::std::option::Option::Some(value.into()); self } @@ -29844,68 +36267,156 @@ impl DirectedInterleaveDataset { } /// Builds the `DirectedInterleaveDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - selector_input_dataset: O0, - data_input_datasets: O1, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - selector_input_dataset.into(), - data_input_datasets.into(), - scope, - ) - } - - fn build_impl( - &self, - selector_input_dataset: crate::Output, - data_input_datasets: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, selector_input_dataset: O0, data_input_datasets: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(selector_input_dataset.into(), data_input_datasets.into(), scope) + } + fn build_impl(&self, selector_input_dataset: crate::Output, data_input_datasets: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DirectedInterleaveDataset", |nd| { nd.add_input(selector_input_dataset); nd.add_input(data_input_datasets); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.stop_on_empty_dataset { - nd.set_attr_bool("stop_on_empty_dataset", *value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.stop_on_empty_dataset { + nd.set_attr_bool("stop_on_empty_dataset", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DirectedInterleaveDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, selector_input_dataset: O0, data_input_datasets: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(selector_input_dataset.into(), data_input_datasets.into(), scope) + } + fn build_instance_impl(&self, selector_input_dataset: crate::Output, data_input_datasets: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DirectedInterleaveDataset", |nd| { + nd.add_input(selector_input_dataset); + nd.add_input(data_input_datasets); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.stop_on_empty_dataset { + nd.set_attr_bool("stop_on_empty_dataset", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DirectedInterleaveDatasetInst{op}) + } +} +impl DirectedInterleaveDatasetInst { + /// Returns the 'handle' output of this 'DirectedInterleaveDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DirectedInterleaveDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DirectedInterleaveDataset::new().build(selector_input_dataset, data_input_datasets, scope)`. -pub fn directed_interleave_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - selector_input_dataset: O0, - data_input_datasets: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn directed_interleave_dataset, O1: ::std::convert::Into>(selector_input_dataset: O0, data_input_datasets: O1, scope: &mut crate::Scope) -> crate::Result { DirectedInterleaveDataset::new().build(selector_input_dataset, data_input_datasets, scope) } + +/// Builder for the `DisableCopyOnRead` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct DisableCopyOnRead { + control_inputs: ::std::vec::Vec, +} +/// An instance of 'DisableCopyOnRead' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DisableCopyOnReadInst { + /// An instance of a fully built DisableCopyOnRead Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl DisableCopyOnRead { + /// Creates a new `DisableCopyOnRead`. + pub fn new() -> Self { + Self::default() + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `DisableCopyOnRead` operation. + pub fn build>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(resource.into(), scope) + } + fn build_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("DisableCopyOnRead", |nd| { + nd.add_input(resource); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `DisableCopyOnRead` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DisableCopyOnRead", |nd| { + nd.add_input(resource); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DisableCopyOnReadInst{op}) + } +} +impl DisableCopyOnReadInst { +} +impl Into for DisableCopyOnReadInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `DisableCopyOnRead::new().build(resource, scope)`. +pub fn disable_copy_on_read>(resource: O0, scope: &mut crate::Scope) -> crate::Result { + DisableCopyOnRead::new().build(resource, scope) +} + /// Builder for the `Div` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Div { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Div' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DivInst { + /// An instance of a fully built Div Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Div { /// Creates a new `Div`. @@ -29926,52 +36437,73 @@ impl Div { } /// Builds the `Div` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Div", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Div` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Div", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DivInst{op}) + } +} +impl DivInst { + /// Returns the 'z' output of this 'Div' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DivInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Div::new().build(x, y, scope)`. -pub fn div, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn div, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Div::new().build(x, y, scope) } + /// Builder for the `DivNoNan` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DivNoNan { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DivNoNan' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DivNoNanInst { + /// An instance of a fully built DivNoNan Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DivNoNan { /// Creates a new `DivNoNan`. @@ -29992,55 +36524,73 @@ impl DivNoNan { } /// Builds the `DivNoNan` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DivNoNan", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DivNoNan` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DivNoNan", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DivNoNanInst{op}) + } +} +impl DivNoNanInst { + /// Returns the 'z' output of this 'DivNoNan' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DivNoNanInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DivNoNan::new().build(x, y, scope)`. -pub fn div_no_nan< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn div_no_nan, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { DivNoNan::new().build(x, y, scope) } + /// Builder for the `DrawBoundingBoxes` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DrawBoundingBoxes { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DrawBoundingBoxes' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DrawBoundingBoxesInst { + /// An instance of a fully built DrawBoundingBoxes Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DrawBoundingBoxes { /// Creates a new `DrawBoundingBoxes`. @@ -30061,55 +36611,73 @@ impl DrawBoundingBoxes { } /// Builds the `DrawBoundingBoxes` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - images: O0, - boxes: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, images: O0, boxes: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), boxes.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - boxes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, boxes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DrawBoundingBoxes", |nd| { nd.add_input(images); nd.add_input(boxes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DrawBoundingBoxes` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, images: O0, boxes: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), boxes.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, boxes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DrawBoundingBoxes", |nd| { + nd.add_input(images); + nd.add_input(boxes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DrawBoundingBoxesInst{op}) + } +} +impl DrawBoundingBoxesInst { + /// Returns the 'output' output of this 'DrawBoundingBoxes' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DrawBoundingBoxesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DrawBoundingBoxes::new().build(images, boxes, scope)`. -pub fn draw_bounding_boxes< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - images: O0, - boxes: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn draw_bounding_boxes, O1: ::std::convert::Into>(images: O0, boxes: O1, scope: &mut crate::Scope) -> crate::Result { DrawBoundingBoxes::new().build(images, boxes, scope) } + /// Builder for the `DrawBoundingBoxesV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DrawBoundingBoxesV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DrawBoundingBoxesV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DrawBoundingBoxesV2Inst { + /// An instance of a fully built DrawBoundingBoxesV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DrawBoundingBoxesV2 { /// Creates a new `DrawBoundingBoxesV2`. @@ -30130,27 +36698,10 @@ impl DrawBoundingBoxesV2 { } /// Builds the `DrawBoundingBoxesV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - images: O0, - boxes: O1, - colors: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, images: O0, boxes: O1, colors: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), boxes.into(), colors.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - boxes: crate::Output, - colors: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, boxes: crate::Output, colors: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DrawBoundingBoxesV2", |nd| { nd.add_input(images); nd.add_input(boxes); @@ -30158,32 +36709,63 @@ impl DrawBoundingBoxesV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DrawBoundingBoxesV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, images: O0, boxes: O1, colors: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), boxes.into(), colors.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, boxes: crate::Output, colors: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DrawBoundingBoxesV2", |nd| { + nd.add_input(images); + nd.add_input(boxes); + nd.add_input(colors); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DrawBoundingBoxesV2Inst{op}) + } +} +impl DrawBoundingBoxesV2Inst { + /// Returns the 'output' output of this 'DrawBoundingBoxesV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DrawBoundingBoxesV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DrawBoundingBoxesV2::new().build(images, boxes, colors, scope)`. -pub fn draw_bounding_boxes_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - images: O0, - boxes: O1, - colors: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn draw_bounding_boxes_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(images: O0, boxes: O1, colors: O2, scope: &mut crate::Scope) -> crate::Result { DrawBoundingBoxesV2::new().build(images, boxes, colors, scope) } + /// Builder for the `DummyIterationCounter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DummyIterationCounter { control_inputs: ::std::vec::Vec, } +/// An instance of 'DummyIterationCounter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DummyIterationCounterInst { + /// An instance of a fully built DummyIterationCounter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DummyIterationCounter { /// Creates a new `DummyIterationCounter`. @@ -30198,10 +36780,9 @@ impl DummyIterationCounter { } /// Builds the `DummyIterationCounter` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DummyIterationCounter", |nd| { for op in &self.control_inputs { @@ -30210,17 +36791,51 @@ impl DummyIterationCounter { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DummyIterationCounter` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DummyIterationCounter", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DummyIterationCounterInst{op}) + } +} +impl DummyIterationCounterInst { + /// Returns the 'handle' output of this 'DummyIterationCounter' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DummyIterationCounterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DummyIterationCounter::new().build(scope)`. -pub fn dummy_iteration_counter(scope: &mut crate::Scope) -> crate::Result { +pub fn dummy_iteration_counter<>(scope: &mut crate::Scope) -> crate::Result { DummyIterationCounter::new().build(scope) } + /// Builder for the `DummyMemoryCache` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DummyMemoryCache { control_inputs: ::std::vec::Vec, } +/// An instance of 'DummyMemoryCache' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DummyMemoryCacheInst { + /// An instance of a fully built DummyMemoryCache Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DummyMemoryCache { /// Creates a new `DummyMemoryCache`. @@ -30235,10 +36850,9 @@ impl DummyMemoryCache { } /// Builds the `DummyMemoryCache` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DummyMemoryCache", |nd| { for op in &self.control_inputs { @@ -30247,17 +36861,51 @@ impl DummyMemoryCache { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DummyMemoryCache` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DummyMemoryCache", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DummyMemoryCacheInst{op}) + } +} +impl DummyMemoryCacheInst { + /// Returns the 'handle' output of this 'DummyMemoryCache' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DummyMemoryCacheInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DummyMemoryCache::new().build(scope)`. -pub fn dummy_memory_cache(scope: &mut crate::Scope) -> crate::Result { +pub fn dummy_memory_cache<>(scope: &mut crate::Scope) -> crate::Result { DummyMemoryCache::new().build(scope) } + /// Builder for the `DummySeedGenerator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DummySeedGenerator { control_inputs: ::std::vec::Vec, } +/// An instance of 'DummySeedGenerator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DummySeedGeneratorInst { + /// An instance of a fully built DummySeedGenerator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DummySeedGenerator { /// Creates a new `DummySeedGenerator`. @@ -30272,10 +36920,9 @@ impl DummySeedGenerator { } /// Builds the `DummySeedGenerator` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DummySeedGenerator", |nd| { for op in &self.control_inputs { @@ -30284,12 +36931,40 @@ impl DummySeedGenerator { ::std::result::Result::Ok(()) }) } -} + /// Builds the `DummySeedGenerator` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DummySeedGenerator", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(DummySeedGeneratorInst{op}) + } +} +impl DummySeedGeneratorInst { + /// Returns the 'handle' output of this 'DummySeedGenerator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DummySeedGeneratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DummySeedGenerator::new().build(scope)`. -pub fn dummy_seed_generator(scope: &mut crate::Scope) -> crate::Result { +pub fn dummy_seed_generator<>(scope: &mut crate::Scope) -> crate::Result { DummySeedGenerator::new().build(scope) } + /// Builder for the `DynamicEnqueueTPUEmbeddingArbitraryTensorBatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DynamicEnqueueTPUEmbeddingArbitraryTensorBatch { @@ -30300,6 +36975,12 @@ pub struct DynamicEnqueueTPUEmbeddingArbitraryTensorBatch { combiners: ::std::option::Option<::std::vec::Vec<::std::string::String>>, control_inputs: ::std::vec::Vec, } +/// An instance of 'DynamicEnqueueTPUEmbeddingArbitraryTensorBatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DynamicEnqueueTPUEmbeddingArbitraryTensorBatchInst { + /// An instance of a fully built DynamicEnqueueTPUEmbeddingArbitraryTensorBatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DynamicEnqueueTPUEmbeddingArbitraryTensorBatch { /// Creates a new `DynamicEnqueueTPUEmbeddingArbitraryTensorBatch`. @@ -30332,10 +37013,7 @@ impl DynamicEnqueueTPUEmbeddingArbitraryTensorBatch { } /// Sets the `combiners` attribute. - pub fn combiners>>( - mut self, - value: ArgType, - ) -> Self { + pub fn combiners>>(mut self, value: ArgType) -> Self { self.combiners = ::std::option::Option::Some(value.into()); self } @@ -30347,42 +37025,12 @@ impl DynamicEnqueueTPUEmbeddingArbitraryTensorBatch { } /// Builds the `DynamicEnqueueTPUEmbeddingArbitraryTensorBatch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - sample_indices_or_row_lengths: O0, - embedding_indices: O1, - aggregation_weights: O2, - mode_override: O3, - device_ordinal: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sample_indices_or_row_lengths.into(), - embedding_indices.into(), - aggregation_weights.into(), - mode_override.into(), - device_ordinal.into(), - scope, - ) - } - - fn build_impl( - &self, - sample_indices_or_row_lengths: crate::Output, - embedding_indices: crate::Output, - aggregation_weights: crate::Output, - mode_override: crate::Output, - device_ordinal: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, sample_indices_or_row_splits: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, device_ordinal: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sample_indices_or_row_splits.into(), embedding_indices.into(), aggregation_weights.into(), mode_override.into(), device_ordinal.into(), scope) + } + fn build_impl(&self, sample_indices_or_row_splits: crate::Output, embedding_indices: crate::Output, aggregation_weights: crate::Output, mode_override: crate::Output, device_ordinal: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DynamicEnqueueTPUEmbeddingArbitraryTensorBatch", |nd| { - nd.add_input(sample_indices_or_row_lengths); + nd.add_input(sample_indices_or_row_splits); nd.add_input(embedding_indices); nd.add_input(aggregation_weights); nd.add_input(mode_override); @@ -30390,50 +37038,71 @@ impl DynamicEnqueueTPUEmbeddingArbitraryTensorBatch { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T3 { - nd.set_attr_type("T3", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.combiners { - nd.set_attr_string_list("combiners", value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T3 { + nd.set_attr_type("T3", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } ::std::result::Result::Ok(()) }) } -} -/// Shorthand for `DynamicEnqueueTPUEmbeddingArbitraryTensorBatch::new().build(sample_indices_or_row_lengths, embedding_indices, aggregation_weights, mode_override, device_ordinal, scope)`. -pub fn dynamic_enqueue_tpuembedding_arbitrary_tensor_batch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - sample_indices_or_row_lengths: O0, - embedding_indices: O1, - aggregation_weights: O2, - mode_override: O3, - device_ordinal: O4, - scope: &mut crate::Scope, -) -> crate::Result { - DynamicEnqueueTPUEmbeddingArbitraryTensorBatch::new().build( - sample_indices_or_row_lengths, - embedding_indices, - aggregation_weights, - mode_override, - device_ordinal, - scope, - ) + /// Builds the `DynamicEnqueueTPUEmbeddingArbitraryTensorBatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, sample_indices_or_row_splits: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, device_ordinal: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sample_indices_or_row_splits.into(), embedding_indices.into(), aggregation_weights.into(), mode_override.into(), device_ordinal.into(), scope) + } + fn build_instance_impl(&self, sample_indices_or_row_splits: crate::Output, embedding_indices: crate::Output, aggregation_weights: crate::Output, mode_override: crate::Output, device_ordinal: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DynamicEnqueueTPUEmbeddingArbitraryTensorBatch", |nd| { + nd.add_input(sample_indices_or_row_splits); + nd.add_input(embedding_indices); + nd.add_input(aggregation_weights); + nd.add_input(mode_override); + nd.add_input(device_ordinal); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T3 { + nd.set_attr_type("T3", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DynamicEnqueueTPUEmbeddingArbitraryTensorBatchInst{op}) + } +} +impl DynamicEnqueueTPUEmbeddingArbitraryTensorBatchInst { } +impl Into for DynamicEnqueueTPUEmbeddingArbitraryTensorBatchInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `DynamicEnqueueTPUEmbeddingArbitraryTensorBatch::new().build(sample_indices_or_row_splits, embedding_indices, aggregation_weights, mode_override, device_ordinal, scope)`. +pub fn dynamic_enqueue_tpuembedding_arbitrary_tensor_batch, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(sample_indices_or_row_splits: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, device_ordinal: O4, scope: &mut crate::Scope) -> crate::Result { + DynamicEnqueueTPUEmbeddingArbitraryTensorBatch::new().build(sample_indices_or_row_splits, embedding_indices, aggregation_weights, mode_override, device_ordinal, scope) +} + /// Builder for the `DynamicPartition` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DynamicPartition { @@ -30441,6 +37110,12 @@ pub struct DynamicPartition { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DynamicPartition' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DynamicPartitionInst { + /// An instance of a fully built DynamicPartition Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DynamicPartition { /// Creates a new `DynamicPartition`. @@ -30467,52 +37142,72 @@ impl DynamicPartition { } /// Builds the `DynamicPartition` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - data: O0, - partitions: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, data: O0, partitions: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), partitions.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - partitions: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, partitions: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DynamicPartition", |nd| { nd.add_input(data); nd.add_input(partitions); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_partitions { - nd.set_attr_int("num_partitions", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_partitions { + nd.set_attr_int("num_partitions", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DynamicPartition` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, data: O0, partitions: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), partitions.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, partitions: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DynamicPartition", |nd| { + nd.add_input(data); + nd.add_input(partitions); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_partitions { + nd.set_attr_int("num_partitions", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DynamicPartitionInst{op}) + } +} +impl DynamicPartitionInst { + /// Returns a Vector of Outputs for 'outputs' output of this DynamicPartition operation. + pub fn outputs(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_partitions")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for DynamicPartitionInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DynamicPartition::new().build(data, partitions, scope)`. -pub fn dynamic_partition< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - data: O0, - partitions: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dynamic_partition, O1: ::std::convert::Into>(data: O0, partitions: O1, scope: &mut crate::Scope) -> crate::Result { DynamicPartition::new().build(data, partitions, scope) } + /// Builder for the `DynamicStitch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct DynamicStitch { @@ -30520,6 +37215,12 @@ pub struct DynamicStitch { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'DynamicStitch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct DynamicStitchInst { + /// An instance of a fully built DynamicStitch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl DynamicStitch { /// Creates a new `DynamicStitch`. @@ -30546,52 +37247,67 @@ impl DynamicStitch { } /// Builds the `DynamicStitch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - indices: O0, - data: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, indices: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(indices.into(), data.into(), scope) } - - fn build_impl( - &self, - indices: crate::Output, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, indices: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("DynamicStitch", |nd| { nd.add_input(indices); nd.add_input(data); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `DynamicStitch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, indices: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), data.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("DynamicStitch", |nd| { + nd.add_input(indices); + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(DynamicStitchInst{op}) + } +} +impl DynamicStitchInst { + /// Returns the 'merged' output of this 'DynamicStitch' operation. + pub fn merged(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for DynamicStitchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `DynamicStitch::new().build(indices, data, scope)`. -pub fn dynamic_stitch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - indices: O0, - data: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn dynamic_stitch, O1: ::std::convert::Into>(indices: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { DynamicStitch::new().build(indices, data, scope) } + /// Builder for the `EagerPyFunc` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EagerPyFunc { @@ -30601,6 +37317,12 @@ pub struct EagerPyFunc { Tout: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'EagerPyFunc' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EagerPyFuncInst { + /// An instance of a fully built EagerPyFunc Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EagerPyFunc { /// Creates a new `EagerPyFunc`. @@ -30609,10 +37331,7 @@ impl EagerPyFunc { } /// Sets the `token` attribute. - pub fn token>( - mut self, - value: ArgType, - ) -> Self { + pub fn token>(mut self, value: ArgType) -> Self { self.token = ::std::option::Option::Some(value.into()); self } @@ -30624,19 +37343,13 @@ impl EagerPyFunc { } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } @@ -30648,48 +37361,77 @@ impl EagerPyFunc { } /// Builds the `EagerPyFunc` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EagerPyFunc", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.token { - nd.set_attr_string("token", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_async { - nd.set_attr_bool("is_async", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } + if let ::std::option::Option::Some(value) = &self.token { + nd.set_attr_string("token", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_async { + nd.set_attr_bool("is_async", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EagerPyFunc` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EagerPyFunc", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.token { + nd.set_attr_string("token", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_async { + nd.set_attr_bool("is_async", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EagerPyFuncInst{op}) + } +} +impl EagerPyFuncInst { + /// Returns the 'output' output of this 'EagerPyFunc' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EagerPyFuncInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EagerPyFunc::new().build(input, scope)`. -pub fn eager_py_func>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn eager_py_func>(input: O0, scope: &mut crate::Scope) -> crate::Result { EagerPyFunc::new().build(input, scope) } + /// Builder for the `EditDistance` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EditDistance { @@ -30697,6 +37439,12 @@ pub struct EditDistance { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'EditDistance' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EditDistanceInst { + /// An instance of a fully built EditDistance Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EditDistance { /// Creates a new `EditDistance`. @@ -30723,44 +37471,10 @@ impl EditDistance { } /// Builds the `EditDistance` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - hypothesis_indices: O0, - hypothesis_values: O1, - hypothesis_shape: O2, - truth_indices: O3, - truth_values: O4, - truth_shape: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - hypothesis_indices.into(), - hypothesis_values.into(), - hypothesis_shape.into(), - truth_indices.into(), - truth_values.into(), - truth_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - hypothesis_indices: crate::Output, - hypothesis_values: crate::Output, - hypothesis_shape: crate::Output, - truth_indices: crate::Output, - truth_values: crate::Output, - truth_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, hypothesis_indices: O0, hypothesis_values: O1, hypothesis_shape: O2, truth_indices: O3, truth_values: O4, truth_shape: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(hypothesis_indices.into(), hypothesis_values.into(), hypothesis_shape.into(), truth_indices.into(), truth_values.into(), truth_shape.into(), scope) + } + fn build_impl(&self, hypothesis_indices: crate::Output, hypothesis_values: crate::Output, hypothesis_shape: crate::Output, truth_indices: crate::Output, truth_values: crate::Output, truth_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EditDistance", |nd| { nd.add_input(hypothesis_indices); nd.add_input(hypothesis_values); @@ -30771,44 +37485,61 @@ impl EditDistance { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.normalize { - nd.set_attr_bool("normalize", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.normalize { + nd.set_attr_bool("normalize", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EditDistance` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, hypothesis_indices: O0, hypothesis_values: O1, hypothesis_shape: O2, truth_indices: O3, truth_values: O4, truth_shape: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(hypothesis_indices.into(), hypothesis_values.into(), hypothesis_shape.into(), truth_indices.into(), truth_values.into(), truth_shape.into(), scope) + } + fn build_instance_impl(&self, hypothesis_indices: crate::Output, hypothesis_values: crate::Output, hypothesis_shape: crate::Output, truth_indices: crate::Output, truth_values: crate::Output, truth_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EditDistance", |nd| { + nd.add_input(hypothesis_indices); + nd.add_input(hypothesis_values); + nd.add_input(hypothesis_shape); + nd.add_input(truth_indices); + nd.add_input(truth_values); + nd.add_input(truth_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.normalize { + nd.set_attr_bool("normalize", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EditDistanceInst{op}) + } +} +impl EditDistanceInst { + /// Returns the 'output' output of this 'EditDistance' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EditDistanceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EditDistance::new().build(hypothesis_indices, hypothesis_values, hypothesis_shape, truth_indices, truth_values, truth_shape, scope)`. -pub fn edit_distance< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - hypothesis_indices: O0, - hypothesis_values: O1, - hypothesis_shape: O2, - truth_indices: O3, - truth_values: O4, - truth_shape: O5, - scope: &mut crate::Scope, -) -> crate::Result { - EditDistance::new().build( - hypothesis_indices, - hypothesis_values, - hypothesis_shape, - truth_indices, - truth_values, - truth_shape, - scope, - ) +pub fn edit_distance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(hypothesis_indices: O0, hypothesis_values: O1, hypothesis_shape: O2, truth_indices: O3, truth_values: O4, truth_shape: O5, scope: &mut crate::Scope) -> crate::Result { + EditDistance::new().build(hypothesis_indices, hypothesis_values, hypothesis_shape, truth_indices, truth_values, truth_shape, scope) } + /// Builder for the `Eig` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Eig { @@ -30817,6 +37548,12 @@ pub struct Eig { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Eig' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EigInst { + /// An instance of a fully built Eig Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Eig { /// Creates a new `Eig`. @@ -30849,45 +37586,78 @@ impl Eig { } /// Builds the `Eig` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Eig", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.compute_v { - nd.set_attr_bool("compute_v", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.compute_v { + nd.set_attr_bool("compute_v", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Eig` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Eig", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.compute_v { + nd.set_attr_bool("compute_v", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EigInst{op}) + } +} +impl EigInst { + /// Returns the 'e' output of this 'Eig' operation. + pub fn e(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'v' output of this 'Eig' operation. + pub fn v(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for EigInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Eig::new().build(input, scope)`. -pub fn eig>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn eig>(input: O0, scope: &mut crate::Scope) -> crate::Result { Eig::new().build(input, scope) } + /// Builder for the `Einsum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Einsum { @@ -30896,6 +37666,12 @@ pub struct Einsum { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Einsum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EinsumInst { + /// An instance of a fully built Einsum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Einsum { /// Creates a new `Einsum`. @@ -30904,10 +37680,7 @@ impl Einsum { } /// Sets the `equation` attribute. - pub fn equation>( - mut self, - value: ArgType, - ) -> Self { + pub fn equation>(mut self, value: ArgType) -> Self { self.equation = ::std::option::Option::Some(value.into()); self } @@ -30931,51 +37704,83 @@ impl Einsum { } /// Builds the `Einsum` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Einsum", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.equation { - nd.set_attr_string("equation", value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.equation { + nd.set_attr_string("equation", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Einsum` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Einsum", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.equation { + nd.set_attr_string("equation", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EinsumInst{op}) + } +} +impl EinsumInst { + /// Returns the 'output' output of this 'Einsum' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EinsumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Einsum::new().build(inputs, scope)`. -pub fn einsum>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn einsum>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { Einsum::new().build(inputs, scope) } + /// Builder for the `Elu` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Elu { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Elu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EluInst { + /// An instance of a fully built Elu Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Elu { /// Creates a new `Elu`. @@ -30996,45 +37801,71 @@ impl Elu { } /// Builds the `Elu` operation. - pub fn build>( - &self, - features: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(features.into(), scope) } - - fn build_impl( - &self, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Elu", |nd| { nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Elu` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Elu", |nd| { + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EluInst{op}) + } +} +impl EluInst { + /// Returns the 'activations' output of this 'Elu' operation. + pub fn activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EluInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Elu::new().build(features, scope)`. -pub fn elu>( - features: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn elu>(features: O0, scope: &mut crate::Scope) -> crate::Result { Elu::new().build(features, scope) } + /// Builder for the `EluGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EluGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'EluGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EluGradInst { + /// An instance of a fully built EluGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EluGrad { /// Creates a new `EluGrad`. @@ -31055,49 +37886,61 @@ impl EluGrad { } /// Builds the `EluGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - gradients: O0, - outputs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, gradients: O0, outputs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(gradients.into(), outputs.into(), scope) } - - fn build_impl( - &self, - gradients: crate::Output, - outputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, gradients: crate::Output, outputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EluGrad", |nd| { nd.add_input(gradients); nd.add_input(outputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EluGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, gradients: O0, outputs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), outputs.into(), scope) + } + fn build_instance_impl(&self, gradients: crate::Output, outputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EluGrad", |nd| { + nd.add_input(gradients); + nd.add_input(outputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EluGradInst{op}) + } +} +impl EluGradInst { + /// Returns the 'backprops' output of this 'EluGrad' operation. + pub fn backprops(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EluGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EluGrad::new().build(gradients, outputs, scope)`. -pub fn elu_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - gradients: O0, - outputs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn elu_grad, O1: ::std::convert::Into>(gradients: O0, outputs: O1, scope: &mut crate::Scope) -> crate::Result { EluGrad::new().build(gradients, outputs, scope) } + /// Builder for the `Empty` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Empty { @@ -31105,6 +37948,12 @@ pub struct Empty { init: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Empty' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EmptyInst { + /// An instance of a fully built Empty Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Empty { /// Creates a new `Empty`. @@ -31131,42 +37980,65 @@ impl Empty { } /// Builds the `Empty` operation. - pub fn build>( - &self, - shape: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Empty", |nd| { nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.init { - nd.set_attr_bool("init", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.init { + nd.set_attr_bool("init", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Empty` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Empty", |nd| { + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.init { + nd.set_attr_bool("init", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EmptyInst{op}) + } +} +impl EmptyInst { + /// Returns the 'output' output of this 'Empty' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EmptyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Empty::new().build(shape, scope)`. -pub fn empty>( - shape: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn empty>(shape: O0, scope: &mut crate::Scope) -> crate::Result { Empty::new().build(shape, scope) } + /// Builder for the `EmptyTensorList` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EmptyTensorList { @@ -31174,6 +38046,12 @@ pub struct EmptyTensorList { shape_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'EmptyTensorList' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EmptyTensorListInst { + /// An instance of a fully built EmptyTensorList Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EmptyTensorList { /// Creates a new `EmptyTensorList`. @@ -31182,19 +38060,13 @@ impl EmptyTensorList { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `shape_type` attribute. - pub fn shape_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_type>(mut self, value: ArgType) -> Self { self.shape_type = ::std::option::Option::Some(value.into()); self } @@ -31206,57 +38078,78 @@ impl EmptyTensorList { } /// Builds the `EmptyTensorList` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - element_shape: O0, - max_num_elements: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, element_shape: O0, max_num_elements: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(element_shape.into(), max_num_elements.into(), scope) } - - fn build_impl( - &self, - element_shape: crate::Output, - max_num_elements: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, element_shape: crate::Output, max_num_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EmptyTensorList", |nd| { nd.add_input(element_shape); nd.add_input(max_num_elements); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_type { - nd.set_attr_type("shape_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EmptyTensorList` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, element_shape: O0, max_num_elements: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(element_shape.into(), max_num_elements.into(), scope) + } + fn build_instance_impl(&self, element_shape: crate::Output, max_num_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EmptyTensorList", |nd| { + nd.add_input(element_shape); + nd.add_input(max_num_elements); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EmptyTensorListInst{op}) + } +} +impl EmptyTensorListInst { + /// Returns the 'handle' output of this 'EmptyTensorList' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EmptyTensorListInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EmptyTensorList::new().build(element_shape, max_num_elements, scope)`. -pub fn empty_tensor_list< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - element_shape: O0, - max_num_elements: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn empty_tensor_list, O1: ::std::convert::Into>(element_shape: O0, max_num_elements: O1, scope: &mut crate::Scope) -> crate::Result { EmptyTensorList::new().build(element_shape, max_num_elements, scope) } + /// Builder for the `EmptyTensorMap` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EmptyTensorMap { control_inputs: ::std::vec::Vec, } +/// An instance of 'EmptyTensorMap' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EmptyTensorMapInst { + /// An instance of a fully built EmptyTensorMap Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EmptyTensorMap { /// Creates a new `EmptyTensorMap`. @@ -31271,10 +38164,9 @@ impl EmptyTensorMap { } /// Builds the `EmptyTensorMap` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EmptyTensorMap", |nd| { for op in &self.control_inputs { @@ -31283,18 +38175,52 @@ impl EmptyTensorMap { ::std::result::Result::Ok(()) }) } -} + /// Builds the `EmptyTensorMap` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EmptyTensorMap", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(EmptyTensorMapInst{op}) + } +} +impl EmptyTensorMapInst { + /// Returns the 'handle' output of this 'EmptyTensorMap' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EmptyTensorMapInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EmptyTensorMap::new().build(scope)`. -pub fn empty_tensor_map(scope: &mut crate::Scope) -> crate::Result { +pub fn empty_tensor_map<>(scope: &mut crate::Scope) -> crate::Result { EmptyTensorMap::new().build(scope) } + /// Builder for the `EncodeBase64` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EncodeBase64 { pad: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'EncodeBase64' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EncodeBase64Inst { + /// An instance of a fully built EncodeBase64 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EncodeBase64 { /// Creates a new `EncodeBase64`. @@ -31315,39 +38241,59 @@ impl EncodeBase64 { } /// Builds the `EncodeBase64` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EncodeBase64", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.pad { - nd.set_attr_bool("pad", *value)?; - } + if let ::std::option::Option::Some(value) = &self.pad { + nd.set_attr_bool("pad", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EncodeBase64` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EncodeBase64", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.pad { + nd.set_attr_bool("pad", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EncodeBase64Inst{op}) + } +} +impl EncodeBase64Inst { + /// Returns the 'output' output of this 'EncodeBase64' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EncodeBase64Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EncodeBase64::new().build(input, scope)`. -pub fn encode_base64>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn encode_base64>(input: O0, scope: &mut crate::Scope) -> crate::Result { EncodeBase64::new().build(input, scope) } + /// Builder for the `EncodeJpeg` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EncodeJpeg { @@ -31362,6 +38308,12 @@ pub struct EncodeJpeg { xmp_metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'EncodeJpeg' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EncodeJpegInst { + /// An instance of a fully built EncodeJpeg Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EncodeJpeg { /// Creates a new `EncodeJpeg`. @@ -31370,10 +38322,7 @@ impl EncodeJpeg { } /// Sets the `format` attribute. - pub fn format>( - mut self, - value: ArgType, - ) -> Self { + pub fn format>(mut self, value: ArgType) -> Self { self.format = ::std::option::Option::Some(value.into()); self } @@ -31397,19 +38346,13 @@ impl EncodeJpeg { } /// Sets the `chroma_downsampling` attribute. - pub fn chroma_downsampling>( - mut self, - value: ArgType, - ) -> Self { + pub fn chroma_downsampling>(mut self, value: ArgType) -> Self { self.chroma_downsampling = ::std::option::Option::Some(value.into()); self } /// Sets the `density_unit` attribute. - pub fn density_unit>( - mut self, - value: ArgType, - ) -> Self { + pub fn density_unit>(mut self, value: ArgType) -> Self { self.density_unit = ::std::option::Option::Some(value.into()); self } @@ -31427,10 +38370,7 @@ impl EncodeJpeg { } /// Sets the `xmp_metadata` attribute. - pub fn xmp_metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn xmp_metadata>(mut self, value: ArgType) -> Self { self.xmp_metadata = ::std::option::Option::Some(value.into()); self } @@ -31442,68 +38382,118 @@ impl EncodeJpeg { } /// Builds the `EncodeJpeg` operation. - pub fn build>( - &self, - image: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, image: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(image.into(), scope) } - - fn build_impl( - &self, - image: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, image: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EncodeJpeg", |nd| { nd.add_input(image); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.format { - nd.set_attr_string("format", value)?; - } - if let ::std::option::Option::Some(value) = &self.quality { - nd.set_attr_int("quality", *value)?; - } - if let ::std::option::Option::Some(value) = &self.progressive { - nd.set_attr_bool("progressive", *value)?; - } - if let ::std::option::Option::Some(value) = &self.optimize_size { - nd.set_attr_bool("optimize_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.chroma_downsampling { - nd.set_attr_bool("chroma_downsampling", *value)?; - } - if let ::std::option::Option::Some(value) = &self.density_unit { - nd.set_attr_string("density_unit", value)?; - } - if let ::std::option::Option::Some(value) = &self.x_density { - nd.set_attr_int("x_density", *value)?; - } - if let ::std::option::Option::Some(value) = &self.y_density { - nd.set_attr_int("y_density", *value)?; - } - if let ::std::option::Option::Some(value) = &self.xmp_metadata { - nd.set_attr_string("xmp_metadata", value)?; + if let ::std::option::Option::Some(value) = &self.format { + nd.set_attr_string("format", value)?; + } + if let ::std::option::Option::Some(value) = &self.quality { + nd.set_attr_int("quality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.progressive { + nd.set_attr_bool("progressive", *value)?; + } + if let ::std::option::Option::Some(value) = &self.optimize_size { + nd.set_attr_bool("optimize_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.chroma_downsampling { + nd.set_attr_bool("chroma_downsampling", *value)?; + } + if let ::std::option::Option::Some(value) = &self.density_unit { + nd.set_attr_string("density_unit", value)?; + } + if let ::std::option::Option::Some(value) = &self.x_density { + nd.set_attr_int("x_density", *value)?; + } + if let ::std::option::Option::Some(value) = &self.y_density { + nd.set_attr_int("y_density", *value)?; + } + if let ::std::option::Option::Some(value) = &self.xmp_metadata { + nd.set_attr_string("xmp_metadata", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `EncodeJpeg` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, image: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(image.into(), scope) + } + fn build_instance_impl(&self, image: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EncodeJpeg", |nd| { + nd.add_input(image); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.format { + nd.set_attr_string("format", value)?; + } + if let ::std::option::Option::Some(value) = &self.quality { + nd.set_attr_int("quality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.progressive { + nd.set_attr_bool("progressive", *value)?; + } + if let ::std::option::Option::Some(value) = &self.optimize_size { + nd.set_attr_bool("optimize_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.chroma_downsampling { + nd.set_attr_bool("chroma_downsampling", *value)?; + } + if let ::std::option::Option::Some(value) = &self.density_unit { + nd.set_attr_string("density_unit", value)?; + } + if let ::std::option::Option::Some(value) = &self.x_density { + nd.set_attr_int("x_density", *value)?; + } + if let ::std::option::Option::Some(value) = &self.y_density { + nd.set_attr_int("y_density", *value)?; + } + if let ::std::option::Option::Some(value) = &self.xmp_metadata { + nd.set_attr_string("xmp_metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EncodeJpegInst{op}) + } +} +impl EncodeJpegInst { + /// Returns the 'contents' output of this 'EncodeJpeg' operation. + pub fn contents(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EncodeJpegInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `EncodeJpeg::new().build(image, scope)`. -pub fn encode_jpeg>( - image: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn encode_jpeg>(image: O0, scope: &mut crate::Scope) -> crate::Result { EncodeJpeg::new().build(image, scope) } + /// Builder for the `EncodeJpegVariableQuality` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EncodeJpegVariableQuality { control_inputs: ::std::vec::Vec, } +/// An instance of 'EncodeJpegVariableQuality' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EncodeJpegVariableQualityInst { + /// An instance of a fully built EncodeJpegVariableQuality Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EncodeJpegVariableQuality { /// Creates a new `EncodeJpegVariableQuality`. @@ -31518,24 +38508,10 @@ impl EncodeJpegVariableQuality { } /// Builds the `EncodeJpegVariableQuality` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - images: O0, - quality: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, images: O0, quality: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), quality.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - quality: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, quality: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EncodeJpegVariableQuality", |nd| { nd.add_input(images); nd.add_input(quality); @@ -31545,19 +38521,42 @@ impl EncodeJpegVariableQuality { ::std::result::Result::Ok(()) }) } -} + /// Builds the `EncodeJpegVariableQuality` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, images: O0, quality: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), quality.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, quality: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EncodeJpegVariableQuality", |nd| { + nd.add_input(images); + nd.add_input(quality); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(EncodeJpegVariableQualityInst{op}) + } +} +impl EncodeJpegVariableQualityInst { + /// Returns the 'contents' output of this 'EncodeJpegVariableQuality' operation. + pub fn contents(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EncodeJpegVariableQualityInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EncodeJpegVariableQuality::new().build(images, quality, scope)`. -pub fn encode_jpeg_variable_quality< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - images: O0, - quality: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn encode_jpeg_variable_quality, O1: ::std::convert::Into>(images: O0, quality: O1, scope: &mut crate::Scope) -> crate::Result { EncodeJpegVariableQuality::new().build(images, quality, scope) } + /// Builder for the `EncodePng` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EncodePng { @@ -31565,6 +38564,12 @@ pub struct EncodePng { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'EncodePng' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EncodePngInst { + /// An instance of a fully built EncodePng Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EncodePng { /// Creates a new `EncodePng`. @@ -31591,42 +38596,65 @@ impl EncodePng { } /// Builds the `EncodePng` operation. - pub fn build>( - &self, - image: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, image: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(image.into(), scope) } - - fn build_impl( - &self, - image: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, image: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EncodePng", |nd| { nd.add_input(image); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.compression { - nd.set_attr_int("compression", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_int("compression", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EncodePng` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, image: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(image.into(), scope) + } + fn build_instance_impl(&self, image: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EncodePng", |nd| { + nd.add_input(image); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_int("compression", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EncodePngInst{op}) + } +} +impl EncodePngInst { + /// Returns the 'contents' output of this 'EncodePng' operation. + pub fn contents(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EncodePngInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EncodePng::new().build(image, scope)`. -pub fn encode_png>( - image: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn encode_png>(image: O0, scope: &mut crate::Scope) -> crate::Result { EncodePng::new().build(image, scope) } + /// Builder for the `EncodeProto` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EncodeProto { @@ -31636,6 +38664,12 @@ pub struct EncodeProto { Tinput_types: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'EncodeProto' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EncodeProtoInst { + /// An instance of a fully built EncodeProto Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EncodeProto { /// Creates a new `EncodeProto`. @@ -31644,37 +38678,25 @@ impl EncodeProto { } /// Sets the `field_names` attribute. - pub fn field_names>>( - mut self, - value: ArgType, - ) -> Self { + pub fn field_names>>(mut self, value: ArgType) -> Self { self.field_names = ::std::option::Option::Some(value.into()); self } /// Sets the `message_type` attribute. - pub fn message_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn message_type>(mut self, value: ArgType) -> Self { self.message_type = ::std::option::Option::Some(value.into()); self } /// Sets the `descriptor_source` attribute. - pub fn descriptor_source>( - mut self, - value: ArgType, - ) -> Self { + pub fn descriptor_source>(mut self, value: ArgType) -> Self { self.descriptor_source = ::std::option::Option::Some(value.into()); self } /// Sets the `Tinput_types` attribute. - pub fn Tinput_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput_types>>(mut self, value: ArgType) -> Self { self.Tinput_types = ::std::option::Option::Some(value.into()); self } @@ -31686,63 +38708,90 @@ impl EncodeProto { } /// Builds the `EncodeProto` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - sizes: O0, - values: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, sizes: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(sizes.into(), values.into(), scope) } - - fn build_impl( - &self, - sizes: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, sizes: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EncodeProto", |nd| { nd.add_input(sizes); nd.add_input(values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.field_names { - nd.set_attr_string_list("field_names", value)?; - } - if let ::std::option::Option::Some(value) = &self.message_type { - nd.set_attr_string("message_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.descriptor_source { - nd.set_attr_string("descriptor_source", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tinput_types { - nd.set_attr_type_list("Tinput_types", value)?; - } + if let ::std::option::Option::Some(value) = &self.field_names { + nd.set_attr_string_list("field_names", value)?; + } + if let ::std::option::Option::Some(value) = &self.message_type { + nd.set_attr_string("message_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.descriptor_source { + nd.set_attr_string("descriptor_source", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinput_types { + nd.set_attr_type_list("Tinput_types", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EncodeProto` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, sizes: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sizes.into(), values.into(), scope) + } + fn build_instance_impl(&self, sizes: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EncodeProto", |nd| { + nd.add_input(sizes); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.field_names { + nd.set_attr_string_list("field_names", value)?; + } + if let ::std::option::Option::Some(value) = &self.message_type { + nd.set_attr_string("message_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.descriptor_source { + nd.set_attr_string("descriptor_source", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinput_types { + nd.set_attr_type_list("Tinput_types", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EncodeProtoInst{op}) + } +} +impl EncodeProtoInst { + /// Returns the 'bytes' output of this 'EncodeProto' operation. + pub fn bytes(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EncodeProtoInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EncodeProto::new().build(sizes, values, scope)`. -pub fn encode_proto< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - sizes: O0, - values: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn encode_proto, O1: ::std::convert::Into>(sizes: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { EncodeProto::new().build(sizes, values, scope) } + /// Builder for the `EncodeWav` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EncodeWav { control_inputs: ::std::vec::Vec, } +/// An instance of 'EncodeWav' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EncodeWavInst { + /// An instance of a fully built EncodeWav Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EncodeWav { /// Creates a new `EncodeWav`. @@ -31757,24 +38806,10 @@ impl EncodeWav { } /// Builds the `EncodeWav` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - audio: O0, - sample_rate: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, audio: O0, sample_rate: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(audio.into(), sample_rate.into(), scope) } - - fn build_impl( - &self, - audio: crate::Output, - sample_rate: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, audio: crate::Output, sample_rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EncodeWav", |nd| { nd.add_input(audio); nd.add_input(sample_rate); @@ -31784,19 +38819,42 @@ impl EncodeWav { ::std::result::Result::Ok(()) }) } -} + /// Builds the `EncodeWav` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, audio: O0, sample_rate: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(audio.into(), sample_rate.into(), scope) + } + fn build_instance_impl(&self, audio: crate::Output, sample_rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EncodeWav", |nd| { + nd.add_input(audio); + nd.add_input(sample_rate); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(EncodeWavInst{op}) + } +} +impl EncodeWavInst { + /// Returns the 'contents' output of this 'EncodeWav' operation. + pub fn contents(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EncodeWavInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EncodeWav::new().build(audio, sample_rate, scope)`. -pub fn encode_wav< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - audio: O0, - sample_rate: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn encode_wav, O1: ::std::convert::Into>(audio: O0, sample_rate: O1, scope: &mut crate::Scope) -> crate::Result { EncodeWav::new().build(audio, sample_rate, scope) } + /// Builder for the `EnqueueTPUEmbeddingArbitraryTensorBatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EnqueueTPUEmbeddingArbitraryTensorBatch { @@ -31808,6 +38866,12 @@ pub struct EnqueueTPUEmbeddingArbitraryTensorBatch { combiners: ::std::option::Option<::std::vec::Vec<::std::string::String>>, control_inputs: ::std::vec::Vec, } +/// An instance of 'EnqueueTPUEmbeddingArbitraryTensorBatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EnqueueTPUEmbeddingArbitraryTensorBatchInst { + /// An instance of a fully built EnqueueTPUEmbeddingArbitraryTensorBatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EnqueueTPUEmbeddingArbitraryTensorBatch { /// Creates a new `EnqueueTPUEmbeddingArbitraryTensorBatch`. @@ -31846,10 +38910,7 @@ impl EnqueueTPUEmbeddingArbitraryTensorBatch { } /// Sets the `combiners` attribute. - pub fn combiners>>( - mut self, - value: ArgType, - ) -> Self { + pub fn combiners>>(mut self, value: ArgType) -> Self { self.combiners = ::std::option::Option::Some(value.into()); self } @@ -31861,88 +38922,194 @@ impl EnqueueTPUEmbeddingArbitraryTensorBatch { } /// Builds the `EnqueueTPUEmbeddingArbitraryTensorBatch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - sample_indices_or_row_lengths: O0, - embedding_indices: O1, - aggregation_weights: O2, - mode_override: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sample_indices_or_row_lengths.into(), - embedding_indices.into(), - aggregation_weights.into(), - mode_override.into(), - scope, - ) - } - - fn build_impl( - &self, - sample_indices_or_row_lengths: crate::Output, - embedding_indices: crate::Output, - aggregation_weights: crate::Output, - mode_override: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sample_indices_or_row_splits: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sample_indices_or_row_splits.into(), embedding_indices.into(), aggregation_weights.into(), mode_override.into(), scope) + } + fn build_impl(&self, sample_indices_or_row_splits: crate::Output, embedding_indices: crate::Output, aggregation_weights: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EnqueueTPUEmbeddingArbitraryTensorBatch", |nd| { - nd.add_input(sample_indices_or_row_lengths); + nd.add_input(sample_indices_or_row_splits); nd.add_input(embedding_indices); nd.add_input(aggregation_weights); nd.add_input(mode_override); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T3 { - nd.set_attr_type("T3", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.device_ordinal { - nd.set_attr_int("device_ordinal", *value)?; + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T3 { + nd.set_attr_type("T3", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `EnqueueTPUEmbeddingArbitraryTensorBatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sample_indices_or_row_splits: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sample_indices_or_row_splits.into(), embedding_indices.into(), aggregation_weights.into(), mode_override.into(), scope) + } + fn build_instance_impl(&self, sample_indices_or_row_splits: crate::Output, embedding_indices: crate::Output, aggregation_weights: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EnqueueTPUEmbeddingArbitraryTensorBatch", |nd| { + nd.add_input(sample_indices_or_row_splits); + nd.add_input(embedding_indices); + nd.add_input(aggregation_weights); + nd.add_input(mode_override); + for op in &self.control_inputs { + nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.combiners { - nd.set_attr_string_list("combiners", value)?; + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T3 { + nd.set_attr_type("T3", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EnqueueTPUEmbeddingArbitraryTensorBatchInst{op}) + } +} +impl EnqueueTPUEmbeddingArbitraryTensorBatchInst { +} +impl Into for EnqueueTPUEmbeddingArbitraryTensorBatchInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `EnqueueTPUEmbeddingArbitraryTensorBatch::new().build(sample_indices_or_row_splits, embedding_indices, aggregation_weights, mode_override, scope)`. +pub fn enqueue_tpuembedding_arbitrary_tensor_batch, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(sample_indices_or_row_splits: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + EnqueueTPUEmbeddingArbitraryTensorBatch::new().build(sample_indices_or_row_splits, embedding_indices, aggregation_weights, mode_override, scope) +} + +/// Builder for the `EnqueueTPUEmbeddingBatch` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct EnqueueTPUEmbeddingBatch { + N: ::std::option::Option, + device_ordinal: ::std::option::Option, + combiners: ::std::option::Option<::std::vec::Vec<::std::string::String>>, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'EnqueueTPUEmbeddingBatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EnqueueTPUEmbeddingBatchInst { + /// An instance of a fully built EnqueueTPUEmbeddingBatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl EnqueueTPUEmbeddingBatch { + /// Creates a new `EnqueueTPUEmbeddingBatch`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `N` attribute. + pub fn N>(mut self, value: ArgType) -> Self { + self.N = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `device_ordinal` attribute. + pub fn device_ordinal>(mut self, value: ArgType) -> Self { + self.device_ordinal = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `combiners` attribute. + pub fn combiners>>(mut self, value: ArgType) -> Self { + self.combiners = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `EnqueueTPUEmbeddingBatch` operation. + pub fn build, O1: ::std::convert::Into>(&self, batch: O0, mode_override: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(batch.into(), mode_override.into(), scope) + } + fn build_impl(&self, batch: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("EnqueueTPUEmbeddingBatch", |nd| { + nd.add_input(batch); + nd.add_input(mode_override); + for op in &self.control_inputs { + nd.add_control_input(op); } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } ::std::result::Result::Ok(()) }) } -} -/// Shorthand for `EnqueueTPUEmbeddingArbitraryTensorBatch::new().build(sample_indices_or_row_lengths, embedding_indices, aggregation_weights, mode_override, scope)`. -pub fn enqueue_tpuembedding_arbitrary_tensor_batch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - sample_indices_or_row_lengths: O0, - embedding_indices: O1, - aggregation_weights: O2, - mode_override: O3, - scope: &mut crate::Scope, -) -> crate::Result { - EnqueueTPUEmbeddingArbitraryTensorBatch::new().build( - sample_indices_or_row_lengths, - embedding_indices, - aggregation_weights, - mode_override, - scope, - ) + /// Builds the `EnqueueTPUEmbeddingBatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, batch: O0, mode_override: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(batch.into(), mode_override.into(), scope) + } + fn build_instance_impl(&self, batch: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EnqueueTPUEmbeddingBatch", |nd| { + nd.add_input(batch); + nd.add_input(mode_override); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EnqueueTPUEmbeddingBatchInst{op}) + } +} +impl EnqueueTPUEmbeddingBatchInst { +} +impl Into for EnqueueTPUEmbeddingBatchInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `EnqueueTPUEmbeddingBatch::new().build(batch, mode_override, scope)`. +pub fn enqueue_tpuembedding_batch, O1: ::std::convert::Into>(batch: O0, mode_override: O1, scope: &mut crate::Scope) -> crate::Result { + EnqueueTPUEmbeddingBatch::new().build(batch, mode_override, scope) } + /// Builder for the `EnqueueTPUEmbeddingIntegerBatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EnqueueTPUEmbeddingIntegerBatch { @@ -31950,6 +39117,12 @@ pub struct EnqueueTPUEmbeddingIntegerBatch { device_ordinal: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'EnqueueTPUEmbeddingIntegerBatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EnqueueTPUEmbeddingIntegerBatchInst { + /// An instance of a fully built EnqueueTPUEmbeddingIntegerBatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EnqueueTPUEmbeddingIntegerBatch { /// Creates a new `EnqueueTPUEmbeddingIntegerBatch`. @@ -31976,52 +39149,60 @@ impl EnqueueTPUEmbeddingIntegerBatch { } /// Builds the `EnqueueTPUEmbeddingIntegerBatch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - batch: O0, - mode_override: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, batch: O0, mode_override: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(batch.into(), mode_override.into(), scope) } - - fn build_impl( - &self, - batch: crate::Output, - mode_override: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, batch: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EnqueueTPUEmbeddingIntegerBatch", |nd| { nd.add_input(batch); nd.add_input(mode_override); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.device_ordinal { - nd.set_attr_int("device_ordinal", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EnqueueTPUEmbeddingIntegerBatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, batch: O0, mode_override: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(batch.into(), mode_override.into(), scope) + } + fn build_instance_impl(&self, batch: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EnqueueTPUEmbeddingIntegerBatch", |nd| { + nd.add_input(batch); + nd.add_input(mode_override); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EnqueueTPUEmbeddingIntegerBatchInst{op}) + } +} +impl EnqueueTPUEmbeddingIntegerBatchInst { +} +impl Into for EnqueueTPUEmbeddingIntegerBatchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EnqueueTPUEmbeddingIntegerBatch::new().build(batch, mode_override, scope)`. -pub fn enqueue_tpuembedding_integer_batch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - batch: O0, - mode_override: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn enqueue_tpuembedding_integer_batch, O1: ::std::convert::Into>(batch: O0, mode_override: O1, scope: &mut crate::Scope) -> crate::Result { EnqueueTPUEmbeddingIntegerBatch::new().build(batch, mode_override, scope) } + /// Builder for the `EnqueueTPUEmbeddingRaggedTensorBatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EnqueueTPUEmbeddingRaggedTensorBatch { @@ -32036,6 +39217,12 @@ pub struct EnqueueTPUEmbeddingRaggedTensorBatch { num_features: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'EnqueueTPUEmbeddingRaggedTensorBatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EnqueueTPUEmbeddingRaggedTensorBatchInst { + /// An instance of a fully built EnqueueTPUEmbeddingRaggedTensorBatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EnqueueTPUEmbeddingRaggedTensorBatch { /// Creates a new `EnqueueTPUEmbeddingRaggedTensorBatch`. @@ -32074,37 +39261,25 @@ impl EnqueueTPUEmbeddingRaggedTensorBatch { } /// Sets the `combiners` attribute. - pub fn combiners>>( - mut self, - value: ArgType, - ) -> Self { + pub fn combiners>>(mut self, value: ArgType) -> Self { self.combiners = ::std::option::Option::Some(value.into()); self } /// Sets the `table_ids` attribute. - pub fn table_ids>>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_ids>>(mut self, value: ArgType) -> Self { self.table_ids = ::std::option::Option::Some(value.into()); self } /// Sets the `max_sequence_lengths` attribute. - pub fn max_sequence_lengths>>( - mut self, - value: ArgType, - ) -> Self { + pub fn max_sequence_lengths>>(mut self, value: ArgType) -> Self { self.max_sequence_lengths = ::std::option::Option::Some(value.into()); self } /// Sets the `num_features` attribute. - pub fn num_features>>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_features>>(mut self, value: ArgType) -> Self { self.num_features = ::std::option::Option::Some(value.into()); self } @@ -32116,36 +39291,10 @@ impl EnqueueTPUEmbeddingRaggedTensorBatch { } /// Builds the `EnqueueTPUEmbeddingRaggedTensorBatch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - sample_splits: O0, - embedding_indices: O1, - aggregation_weights: O2, - mode_override: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sample_splits.into(), - embedding_indices.into(), - aggregation_weights.into(), - mode_override.into(), - scope, - ) - } - - fn build_impl( - &self, - sample_splits: crate::Output, - embedding_indices: crate::Output, - aggregation_weights: crate::Output, - mode_override: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sample_splits: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sample_splits.into(), embedding_indices.into(), aggregation_weights.into(), mode_override.into(), scope) + } + fn build_impl(&self, sample_splits: crate::Output, embedding_indices: crate::Output, aggregation_weights: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EnqueueTPUEmbeddingRaggedTensorBatch", |nd| { nd.add_input(sample_splits); nd.add_input(embedding_indices); @@ -32154,59 +39303,94 @@ impl EnqueueTPUEmbeddingRaggedTensorBatch { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T3 { - nd.set_attr_type("T3", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.device_ordinal { - nd.set_attr_int("device_ordinal", *value)?; - } - if let ::std::option::Option::Some(value) = &self.combiners { - nd.set_attr_string_list("combiners", value)?; - } - if let ::std::option::Option::Some(value) = &self.table_ids { - nd.set_attr_int_list("table_ids", value)?; - } - if let ::std::option::Option::Some(value) = &self.max_sequence_lengths { - nd.set_attr_int_list("max_sequence_lengths", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int_list("num_features", value)?; + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T3 { + nd.set_attr_type("T3", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } + if let ::std::option::Option::Some(value) = &self.table_ids { + nd.set_attr_int_list("table_ids", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_sequence_lengths { + nd.set_attr_int_list("max_sequence_lengths", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int_list("num_features", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `EnqueueTPUEmbeddingRaggedTensorBatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sample_splits: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sample_splits.into(), embedding_indices.into(), aggregation_weights.into(), mode_override.into(), scope) + } + fn build_instance_impl(&self, sample_splits: crate::Output, embedding_indices: crate::Output, aggregation_weights: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EnqueueTPUEmbeddingRaggedTensorBatch", |nd| { + nd.add_input(sample_splits); + nd.add_input(embedding_indices); + nd.add_input(aggregation_weights); + nd.add_input(mode_override); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T3 { + nd.set_attr_type("T3", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } + if let ::std::option::Option::Some(value) = &self.table_ids { + nd.set_attr_int_list("table_ids", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_sequence_lengths { + nd.set_attr_int_list("max_sequence_lengths", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int_list("num_features", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EnqueueTPUEmbeddingRaggedTensorBatchInst{op}) + } +} +impl EnqueueTPUEmbeddingRaggedTensorBatchInst { +} +impl Into for EnqueueTPUEmbeddingRaggedTensorBatchInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `EnqueueTPUEmbeddingRaggedTensorBatch::new().build(sample_splits, embedding_indices, aggregation_weights, mode_override, scope)`. -pub fn enqueue_tpuembedding_ragged_tensor_batch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - sample_splits: O0, - embedding_indices: O1, - aggregation_weights: O2, - mode_override: O3, - scope: &mut crate::Scope, -) -> crate::Result { - EnqueueTPUEmbeddingRaggedTensorBatch::new().build( - sample_splits, - embedding_indices, - aggregation_weights, - mode_override, - scope, - ) +pub fn enqueue_tpuembedding_ragged_tensor_batch, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(sample_splits: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + EnqueueTPUEmbeddingRaggedTensorBatch::new().build(sample_splits, embedding_indices, aggregation_weights, mode_override, scope) } + /// Builder for the `EnqueueTPUEmbeddingSparseBatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EnqueueTPUEmbeddingSparseBatch { @@ -32218,6 +39402,12 @@ pub struct EnqueueTPUEmbeddingSparseBatch { combiners: ::std::option::Option<::std::vec::Vec<::std::string::String>>, control_inputs: ::std::vec::Vec, } +/// An instance of 'EnqueueTPUEmbeddingSparseBatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EnqueueTPUEmbeddingSparseBatchInst { + /// An instance of a fully built EnqueueTPUEmbeddingSparseBatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EnqueueTPUEmbeddingSparseBatch { /// Creates a new `EnqueueTPUEmbeddingSparseBatch`. @@ -32256,10 +39446,7 @@ impl EnqueueTPUEmbeddingSparseBatch { } /// Sets the `combiners` attribute. - pub fn combiners>>( - mut self, - value: ArgType, - ) -> Self { + pub fn combiners>>(mut self, value: ArgType) -> Self { self.combiners = ::std::option::Option::Some(value.into()); self } @@ -32271,36 +39458,10 @@ impl EnqueueTPUEmbeddingSparseBatch { } /// Builds the `EnqueueTPUEmbeddingSparseBatch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - sample_indices: O0, - embedding_indices: O1, - aggregation_weights: O2, - mode_override: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sample_indices.into(), - embedding_indices.into(), - aggregation_weights.into(), - mode_override.into(), - scope, - ) - } - - fn build_impl( - &self, - sample_indices: crate::Output, - embedding_indices: crate::Output, - aggregation_weights: crate::Output, - mode_override: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sample_indices: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sample_indices.into(), embedding_indices.into(), aggregation_weights.into(), mode_override.into(), scope) + } + fn build_impl(&self, sample_indices: crate::Output, embedding_indices: crate::Output, aggregation_weights: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EnqueueTPUEmbeddingSparseBatch", |nd| { nd.add_input(sample_indices); nd.add_input(embedding_indices); @@ -32309,50 +39470,76 @@ impl EnqueueTPUEmbeddingSparseBatch { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T3 { - nd.set_attr_type("T3", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.device_ordinal { - nd.set_attr_int("device_ordinal", *value)?; - } - if let ::std::option::Option::Some(value) = &self.combiners { - nd.set_attr_string_list("combiners", value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T3 { + nd.set_attr_type("T3", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EnqueueTPUEmbeddingSparseBatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sample_indices: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sample_indices.into(), embedding_indices.into(), aggregation_weights.into(), mode_override.into(), scope) + } + fn build_instance_impl(&self, sample_indices: crate::Output, embedding_indices: crate::Output, aggregation_weights: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EnqueueTPUEmbeddingSparseBatch", |nd| { + nd.add_input(sample_indices); + nd.add_input(embedding_indices); + nd.add_input(aggregation_weights); + nd.add_input(mode_override); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T3 { + nd.set_attr_type("T3", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EnqueueTPUEmbeddingSparseBatchInst{op}) + } +} +impl EnqueueTPUEmbeddingSparseBatchInst { +} +impl Into for EnqueueTPUEmbeddingSparseBatchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EnqueueTPUEmbeddingSparseBatch::new().build(sample_indices, embedding_indices, aggregation_weights, mode_override, scope)`. -pub fn enqueue_tpuembedding_sparse_batch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - sample_indices: O0, - embedding_indices: O1, - aggregation_weights: O2, - mode_override: O3, - scope: &mut crate::Scope, -) -> crate::Result { - EnqueueTPUEmbeddingSparseBatch::new().build( - sample_indices, - embedding_indices, - aggregation_weights, - mode_override, - scope, - ) +pub fn enqueue_tpuembedding_sparse_batch, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(sample_indices: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + EnqueueTPUEmbeddingSparseBatch::new().build(sample_indices, embedding_indices, aggregation_weights, mode_override, scope) } + /// Builder for the `EnqueueTPUEmbeddingSparseTensorBatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EnqueueTPUEmbeddingSparseTensorBatch { @@ -32367,6 +39554,12 @@ pub struct EnqueueTPUEmbeddingSparseTensorBatch { num_features: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'EnqueueTPUEmbeddingSparseTensorBatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EnqueueTPUEmbeddingSparseTensorBatchInst { + /// An instance of a fully built EnqueueTPUEmbeddingSparseTensorBatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EnqueueTPUEmbeddingSparseTensorBatch { /// Creates a new `EnqueueTPUEmbeddingSparseTensorBatch`. @@ -32405,37 +39598,25 @@ impl EnqueueTPUEmbeddingSparseTensorBatch { } /// Sets the `combiners` attribute. - pub fn combiners>>( - mut self, - value: ArgType, - ) -> Self { + pub fn combiners>>(mut self, value: ArgType) -> Self { self.combiners = ::std::option::Option::Some(value.into()); self } /// Sets the `table_ids` attribute. - pub fn table_ids>>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_ids>>(mut self, value: ArgType) -> Self { self.table_ids = ::std::option::Option::Some(value.into()); self } /// Sets the `max_sequence_lengths` attribute. - pub fn max_sequence_lengths>>( - mut self, - value: ArgType, - ) -> Self { + pub fn max_sequence_lengths>>(mut self, value: ArgType) -> Self { self.max_sequence_lengths = ::std::option::Option::Some(value.into()); self } /// Sets the `num_features` attribute. - pub fn num_features>>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_features>>(mut self, value: ArgType) -> Self { self.num_features = ::std::option::Option::Some(value.into()); self } @@ -32447,36 +39628,10 @@ impl EnqueueTPUEmbeddingSparseTensorBatch { } /// Builds the `EnqueueTPUEmbeddingSparseTensorBatch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - sample_indices: O0, - embedding_indices: O1, - aggregation_weights: O2, - mode_override: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sample_indices.into(), - embedding_indices.into(), - aggregation_weights.into(), - mode_override.into(), - scope, - ) - } - - fn build_impl( - &self, - sample_indices: crate::Output, - embedding_indices: crate::Output, - aggregation_weights: crate::Output, - mode_override: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sample_indices: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sample_indices.into(), embedding_indices.into(), aggregation_weights.into(), mode_override.into(), scope) + } + fn build_impl(&self, sample_indices: crate::Output, embedding_indices: crate::Output, aggregation_weights: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EnqueueTPUEmbeddingSparseTensorBatch", |nd| { nd.add_input(sample_indices); nd.add_input(embedding_indices); @@ -32485,59 +39640,94 @@ impl EnqueueTPUEmbeddingSparseTensorBatch { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T3 { - nd.set_attr_type("T3", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.device_ordinal { - nd.set_attr_int("device_ordinal", *value)?; - } - if let ::std::option::Option::Some(value) = &self.combiners { - nd.set_attr_string_list("combiners", value)?; - } - if let ::std::option::Option::Some(value) = &self.table_ids { - nd.set_attr_int_list("table_ids", value)?; - } - if let ::std::option::Option::Some(value) = &self.max_sequence_lengths { - nd.set_attr_int_list("max_sequence_lengths", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int_list("num_features", value)?; + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T3 { + nd.set_attr_type("T3", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } + if let ::std::option::Option::Some(value) = &self.table_ids { + nd.set_attr_int_list("table_ids", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_sequence_lengths { + nd.set_attr_int_list("max_sequence_lengths", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int_list("num_features", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `EnqueueTPUEmbeddingSparseTensorBatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sample_indices: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sample_indices.into(), embedding_indices.into(), aggregation_weights.into(), mode_override.into(), scope) + } + fn build_instance_impl(&self, sample_indices: crate::Output, embedding_indices: crate::Output, aggregation_weights: crate::Output, mode_override: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EnqueueTPUEmbeddingSparseTensorBatch", |nd| { + nd.add_input(sample_indices); + nd.add_input(embedding_indices); + nd.add_input(aggregation_weights); + nd.add_input(mode_override); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T3 { + nd.set_attr_type("T3", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.combiners { + nd.set_attr_string_list("combiners", value)?; + } + if let ::std::option::Option::Some(value) = &self.table_ids { + nd.set_attr_int_list("table_ids", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_sequence_lengths { + nd.set_attr_int_list("max_sequence_lengths", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int_list("num_features", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EnqueueTPUEmbeddingSparseTensorBatchInst{op}) + } +} +impl EnqueueTPUEmbeddingSparseTensorBatchInst { +} +impl Into for EnqueueTPUEmbeddingSparseTensorBatchInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `EnqueueTPUEmbeddingSparseTensorBatch::new().build(sample_indices, embedding_indices, aggregation_weights, mode_override, scope)`. -pub fn enqueue_tpuembedding_sparse_tensor_batch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - sample_indices: O0, - embedding_indices: O1, - aggregation_weights: O2, - mode_override: O3, - scope: &mut crate::Scope, -) -> crate::Result { - EnqueueTPUEmbeddingSparseTensorBatch::new().build( - sample_indices, - embedding_indices, - aggregation_weights, - mode_override, - scope, - ) +pub fn enqueue_tpuembedding_sparse_tensor_batch, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(sample_indices: O0, embedding_indices: O1, aggregation_weights: O2, mode_override: O3, scope: &mut crate::Scope) -> crate::Result { + EnqueueTPUEmbeddingSparseTensorBatch::new().build(sample_indices, embedding_indices, aggregation_weights, mode_override, scope) } + /// Builder for the `EnsureShape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EnsureShape { @@ -32545,6 +39735,12 @@ pub struct EnsureShape { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'EnsureShape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EnsureShapeInst { + /// An instance of a fully built EnsureShape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EnsureShape { /// Creates a new `EnsureShape`. @@ -32571,42 +39767,65 @@ impl EnsureShape { } /// Builds the `EnsureShape` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EnsureShape", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EnsureShape` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EnsureShape", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EnsureShapeInst{op}) + } +} +impl EnsureShapeInst { + /// Returns the 'output' output of this 'EnsureShape' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EnsureShapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EnsureShape::new().build(input, scope)`. -pub fn ensure_shape>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ensure_shape>(input: O0, scope: &mut crate::Scope) -> crate::Result { EnsureShape::new().build(input, scope) } + /// Builder for the `Enter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Enter { @@ -32616,6 +39835,12 @@ pub struct Enter { parallel_iterations: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Enter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EnterInst { + /// An instance of a fully built Enter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Enter { /// Creates a new `Enter`. @@ -32630,10 +39855,7 @@ impl Enter { } /// Sets the `frame_name` attribute. - pub fn frame_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn frame_name>(mut self, value: ArgType) -> Self { self.frame_name = ::std::option::Option::Some(value.into()); self } @@ -32645,10 +39867,7 @@ impl Enter { } /// Sets the `parallel_iterations` attribute. - pub fn parallel_iterations>( - mut self, - value: ArgType, - ) -> Self { + pub fn parallel_iterations>(mut self, value: ArgType) -> Self { self.parallel_iterations = ::std::option::Option::Some(value.into()); self } @@ -32660,48 +39879,77 @@ impl Enter { } /// Builds the `Enter` operation. - pub fn build>( - &self, - data: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Enter", |nd| { nd.add_input(data); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.frame_name { - nd.set_attr_string("frame_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_constant { - nd.set_attr_bool("is_constant", *value)?; - } - if let ::std::option::Option::Some(value) = &self.parallel_iterations { - nd.set_attr_int("parallel_iterations", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.frame_name { + nd.set_attr_string("frame_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_constant { + nd.set_attr_bool("is_constant", *value)?; + } + if let ::std::option::Option::Some(value) = &self.parallel_iterations { + nd.set_attr_int("parallel_iterations", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Enter` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Enter", |nd| { + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.frame_name { + nd.set_attr_string("frame_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_constant { + nd.set_attr_bool("is_constant", *value)?; + } + if let ::std::option::Option::Some(value) = &self.parallel_iterations { + nd.set_attr_int("parallel_iterations", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EnterInst{op}) + } +} +impl EnterInst { + /// Returns the 'output' output of this 'Enter' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EnterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Enter::new().build(data, scope)`. -pub fn enter>( - data: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn enter>(data: O0, scope: &mut crate::Scope) -> crate::Result { Enter::new().build(data, scope) } + /// Builder for the `Equal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Equal { @@ -32709,6 +39957,12 @@ pub struct Equal { incompatible_shape_error: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Equal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EqualInst { + /// An instance of a fully built Equal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Equal { /// Creates a new `Equal`. @@ -32723,10 +39977,7 @@ impl Equal { } /// Sets the `incompatible_shape_error` attribute. - pub fn incompatible_shape_error>( - mut self, - value: ArgType, - ) -> Self { + pub fn incompatible_shape_error>(mut self, value: ArgType) -> Self { self.incompatible_shape_error = ::std::option::Option::Some(value.into()); self } @@ -32738,55 +39989,79 @@ impl Equal { } /// Builds the `Equal` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Equal", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.incompatible_shape_error { - nd.set_attr_bool("incompatible_shape_error", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.incompatible_shape_error { + nd.set_attr_bool("incompatible_shape_error", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Equal` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Equal", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.incompatible_shape_error { + nd.set_attr_bool("incompatible_shape_error", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EqualInst{op}) + } +} +impl EqualInst { + /// Returns the 'z' output of this 'Equal' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EqualInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Equal::new().build(x, y, scope)`. -pub fn equal, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn equal, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Equal::new().build(x, y, scope) } + /// Builder for the `Erf` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Erf { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Erf' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ErfInst { + /// An instance of a fully built Erf Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Erf { /// Creates a new `Erf`. @@ -32807,45 +40082,71 @@ impl Erf { } /// Builds the `Erf` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Erf", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Erf` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Erf", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ErfInst{op}) + } +} +impl ErfInst { + /// Returns the 'y' output of this 'Erf' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ErfInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Erf::new().build(x, scope)`. -pub fn erf>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn erf>(x: O0, scope: &mut crate::Scope) -> crate::Result { Erf::new().build(x, scope) } + /// Builder for the `Erfc` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Erfc { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Erfc' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ErfcInst { + /// An instance of a fully built Erfc Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Erfc { /// Creates a new `Erfc`. @@ -32866,45 +40167,71 @@ impl Erfc { } /// Builds the `Erfc` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Erfc", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Erfc` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Erfc", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ErfcInst{op}) + } +} +impl ErfcInst { + /// Returns the 'y' output of this 'Erfc' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ErfcInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Erfc::new().build(x, scope)`. -pub fn erfc>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn erfc>(x: O0, scope: &mut crate::Scope) -> crate::Result { Erfc::new().build(x, scope) } + /// Builder for the `Erfinv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Erfinv { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Erfinv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ErfinvInst { + /// An instance of a fully built Erfinv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Erfinv { /// Creates a new `Erfinv`. @@ -32925,39 +40252,59 @@ impl Erfinv { } /// Builds the `Erfinv` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Erfinv", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Erfinv` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Erfinv", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ErfinvInst{op}) + } +} +impl ErfinvInst { + /// Returns the 'y' output of this 'Erfinv' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ErfinvInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Erfinv::new().build(x, scope)`. -pub fn erfinv>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn erfinv>(x: O0, scope: &mut crate::Scope) -> crate::Result { Erfinv::new().build(x, scope) } + /// Builder for the `EuclideanNorm` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct EuclideanNorm { @@ -32966,6 +40313,12 @@ pub struct EuclideanNorm { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'EuclideanNorm' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct EuclideanNormInst { + /// An instance of a fully built EuclideanNorm Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl EuclideanNorm { /// Creates a new `EuclideanNorm`. @@ -32998,61 +40351,85 @@ impl EuclideanNorm { } /// Builds the `EuclideanNorm` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), reduction_indices.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - reduction_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("EuclideanNorm", |nd| { nd.add_input(input); nd.add_input(reduction_indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `EuclideanNorm` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), reduction_indices.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("EuclideanNorm", |nd| { + nd.add_input(input); + nd.add_input(reduction_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(EuclideanNormInst{op}) + } +} +impl EuclideanNormInst { + /// Returns the 'output' output of this 'EuclideanNorm' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for EuclideanNormInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `EuclideanNorm::new().build(input, reduction_indices, scope)`. -pub fn euclidean_norm< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn euclidean_norm, O1: ::std::convert::Into>(input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { EuclideanNorm::new().build(input, reduction_indices, scope) } + /// Builder for the `Exit` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Exit { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Exit' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExitInst { + /// An instance of a fully built Exit Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Exit { /// Creates a new `Exit`. @@ -33073,45 +40450,71 @@ impl Exit { } /// Builds the `Exit` operation. - pub fn build>( - &self, - data: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Exit", |nd| { nd.add_input(data); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Exit` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Exit", |nd| { + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExitInst{op}) + } +} +impl ExitInst { + /// Returns the 'output' output of this 'Exit' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExitInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Exit::new().build(data, scope)`. -pub fn exit>( - data: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn exit>(data: O0, scope: &mut crate::Scope) -> crate::Result { Exit::new().build(data, scope) } + /// Builder for the `Exp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Exp { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Exp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExpInst { + /// An instance of a fully built Exp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Exp { /// Creates a new `Exp`. @@ -33132,39 +40535,59 @@ impl Exp { } /// Builds the `Exp` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Exp", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Exp` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Exp", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExpInst{op}) + } +} +impl ExpInst { + /// Returns the 'y' output of this 'Exp' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Exp::new().build(x, scope)`. -pub fn exp>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn exp>(x: O0, scope: &mut crate::Scope) -> crate::Result { Exp::new().build(x, scope) } + /// Builder for the `ExpandDims` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExpandDims { @@ -33172,6 +40595,12 @@ pub struct ExpandDims { Tdim: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExpandDims' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExpandDimsInst { + /// An instance of a fully built ExpandDims Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExpandDims { /// Creates a new `ExpandDims`. @@ -33198,52 +40627,67 @@ impl ExpandDims { } /// Builds the `ExpandDims` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - dim: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, dim: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), dim.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - dim: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, dim: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExpandDims", |nd| { nd.add_input(input); nd.add_input(dim); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tdim { - nd.set_attr_type("Tdim", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdim { + nd.set_attr_type("Tdim", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExpandDims` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, dim: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), dim.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, dim: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExpandDims", |nd| { + nd.add_input(input); + nd.add_input(dim); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdim { + nd.set_attr_type("Tdim", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExpandDimsInst{op}) + } +} +impl ExpandDimsInst { + /// Returns the 'output' output of this 'ExpandDims' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExpandDimsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExpandDims::new().build(input, dim, scope)`. -pub fn expand_dims< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - dim: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn expand_dims, O1: ::std::convert::Into>(input: O0, dim: O1, scope: &mut crate::Scope) -> crate::Result { ExpandDims::new().build(input, dim, scope) } + /// Builder for the `ExperimentalAssertNextDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalAssertNextDataset { @@ -33251,6 +40695,12 @@ pub struct ExperimentalAssertNextDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalAssertNextDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalAssertNextDatasetInst { + /// An instance of a fully built ExperimentalAssertNextDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalAssertNextDataset { /// Creates a new `ExperimentalAssertNextDataset`. @@ -33259,19 +40709,13 @@ impl ExperimentalAssertNextDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -33283,52 +40727,67 @@ impl ExperimentalAssertNextDataset { } /// Builds the `ExperimentalAssertNextDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - transformations: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, transformations: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), transformations.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - transformations: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, transformations: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalAssertNextDataset", |nd| { nd.add_input(input_dataset); nd.add_input(transformations); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalAssertNextDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, transformations: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), transformations.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, transformations: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalAssertNextDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(transformations); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalAssertNextDatasetInst{op}) + } +} +impl ExperimentalAssertNextDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalAssertNextDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalAssertNextDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalAssertNextDataset::new().build(input_dataset, transformations, scope)`. -pub fn experimental_assert_next_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - transformations: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_assert_next_dataset, O1: ::std::convert::Into>(input_dataset: O0, transformations: O1, scope: &mut crate::Scope) -> crate::Result { ExperimentalAssertNextDataset::new().build(input_dataset, transformations, scope) } + /// Builder for the `ExperimentalAutoShardDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalAutoShardDataset { @@ -33337,6 +40796,12 @@ pub struct ExperimentalAutoShardDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalAutoShardDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalAutoShardDatasetInst { + /// An instance of a fully built ExperimentalAutoShardDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalAutoShardDataset { /// Creates a new `ExperimentalAutoShardDataset`. @@ -33351,19 +40816,13 @@ impl ExperimentalAutoShardDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -33375,32 +40834,10 @@ impl ExperimentalAutoShardDataset { } /// Builds the `ExperimentalAutoShardDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - num_workers: O1, - index: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - num_workers.into(), - index.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - num_workers: crate::Output, - index: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_workers: O1, index: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), num_workers.into(), index.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, num_workers: crate::Output, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalAutoShardDataset", |nd| { nd.add_input(input_dataset); nd.add_input(num_workers); @@ -33408,33 +40845,64 @@ impl ExperimentalAutoShardDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.auto_shard_policy { - nd.set_attr_int("auto_shard_policy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.auto_shard_policy { + nd.set_attr_int("auto_shard_policy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalAutoShardDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_workers: O1, index: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), num_workers.into(), index.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, num_workers: crate::Output, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalAutoShardDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(num_workers); + nd.add_input(index); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.auto_shard_policy { + nd.set_attr_int("auto_shard_policy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalAutoShardDatasetInst{op}) + } +} +impl ExperimentalAutoShardDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalAutoShardDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalAutoShardDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalAutoShardDataset::new().build(input_dataset, num_workers, index, scope)`. -pub fn experimental_auto_shard_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - num_workers: O1, - index: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_auto_shard_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, num_workers: O1, index: O2, scope: &mut crate::Scope) -> crate::Result { ExperimentalAutoShardDataset::new().build(input_dataset, num_workers, index, scope) } + /// Builder for the `ExperimentalBytesProducedStatsDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalBytesProducedStatsDataset { @@ -33442,6 +40910,12 @@ pub struct ExperimentalBytesProducedStatsDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalBytesProducedStatsDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalBytesProducedStatsDatasetInst { + /// An instance of a fully built ExperimentalBytesProducedStatsDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalBytesProducedStatsDataset { /// Creates a new `ExperimentalBytesProducedStatsDataset`. @@ -33450,19 +40924,13 @@ impl ExperimentalBytesProducedStatsDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -33474,52 +40942,67 @@ impl ExperimentalBytesProducedStatsDataset { } /// Builds the `ExperimentalBytesProducedStatsDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - tag: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), tag.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - tag: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, tag: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalBytesProducedStatsDataset", |nd| { nd.add_input(input_dataset); nd.add_input(tag); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalBytesProducedStatsDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), tag.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, tag: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalBytesProducedStatsDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(tag); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalBytesProducedStatsDatasetInst{op}) + } +} +impl ExperimentalBytesProducedStatsDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalBytesProducedStatsDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalBytesProducedStatsDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalBytesProducedStatsDataset::new().build(input_dataset, tag, scope)`. -pub fn experimental_bytes_produced_stats_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - tag: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_bytes_produced_stats_dataset, O1: ::std::convert::Into>(input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { ExperimentalBytesProducedStatsDataset::new().build(input_dataset, tag, scope) } + /// Builder for the `ExperimentalCSVDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalCSVDataset { @@ -33527,6 +41010,12 @@ pub struct ExperimentalCSVDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalCSVDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalCSVDatasetInst { + /// An instance of a fully built ExperimentalCSVDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalCSVDataset { /// Creates a new `ExperimentalCSVDataset`. @@ -33535,19 +41024,13 @@ impl ExperimentalCSVDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -33559,56 +41042,10 @@ impl ExperimentalCSVDataset { } /// Builds the `ExperimentalCSVDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - filenames: O0, - compression_type: O1, - buffer_size: O2, - header: O3, - field_delim: O4, - use_quote_delim: O5, - na_value: O6, - select_cols: O7, - record_defaults: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - filenames.into(), - compression_type.into(), - buffer_size.into(), - header.into(), - field_delim.into(), - use_quote_delim.into(), - na_value.into(), - select_cols.into(), - record_defaults.into(), - scope, - ) - } - - fn build_impl( - &self, - filenames: crate::Output, - compression_type: crate::Output, - buffer_size: crate::Output, - header: crate::Output, - field_delim: crate::Output, - use_quote_delim: crate::Output, - na_value: crate::Output, - select_cols: crate::Output, - record_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, filenames: O0, compression_type: O1, buffer_size: O2, header: O3, field_delim: O4, use_quote_delim: O5, na_value: O6, select_cols: O7, record_defaults: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(filenames.into(), compression_type.into(), buffer_size.into(), header.into(), field_delim.into(), use_quote_delim.into(), na_value.into(), select_cols.into(), record_defaults.into(), scope) + } + fn build_impl(&self, filenames: crate::Output, compression_type: crate::Output, buffer_size: crate::Output, header: crate::Output, field_delim: crate::Output, use_quote_delim: crate::Output, na_value: crate::Output, select_cols: crate::Output, record_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalCSVDataset", |nd| { nd.add_input(filenames); nd.add_input(compression_type); @@ -33622,53 +41059,64 @@ impl ExperimentalCSVDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalCSVDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, filenames: O0, compression_type: O1, buffer_size: O2, header: O3, field_delim: O4, use_quote_delim: O5, na_value: O6, select_cols: O7, record_defaults: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filenames.into(), compression_type.into(), buffer_size.into(), header.into(), field_delim.into(), use_quote_delim.into(), na_value.into(), select_cols.into(), record_defaults.into(), scope) + } + fn build_instance_impl(&self, filenames: crate::Output, compression_type: crate::Output, buffer_size: crate::Output, header: crate::Output, field_delim: crate::Output, use_quote_delim: crate::Output, na_value: crate::Output, select_cols: crate::Output, record_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalCSVDataset", |nd| { + nd.add_input(filenames); + nd.add_input(compression_type); + nd.add_input(buffer_size); + nd.add_input(header); + nd.add_input(field_delim); + nd.add_input(use_quote_delim); + nd.add_input(na_value); + nd.add_input(select_cols); + nd.add_input(record_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalCSVDatasetInst{op}) + } +} +impl ExperimentalCSVDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalCSVDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalCSVDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalCSVDataset::new().build(filenames, compression_type, buffer_size, header, field_delim, use_quote_delim, na_value, select_cols, record_defaults, scope)`. -pub fn experimental_csvdataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - filenames: O0, - compression_type: O1, - buffer_size: O2, - header: O3, - field_delim: O4, - use_quote_delim: O5, - na_value: O6, - select_cols: O7, - record_defaults: O8, - scope: &mut crate::Scope, -) -> crate::Result { - ExperimentalCSVDataset::new().build( - filenames, - compression_type, - buffer_size, - header, - field_delim, - use_quote_delim, - na_value, - select_cols, - record_defaults, - scope, - ) +pub fn experimental_csvdataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(filenames: O0, compression_type: O1, buffer_size: O2, header: O3, field_delim: O4, use_quote_delim: O5, na_value: O6, select_cols: O7, record_defaults: O8, scope: &mut crate::Scope) -> crate::Result { + ExperimentalCSVDataset::new().build(filenames, compression_type, buffer_size, header, field_delim, use_quote_delim, na_value, select_cols, record_defaults, scope) } + /// Builder for the `ExperimentalChooseFastestDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalChooseFastestDataset { @@ -33678,6 +41126,12 @@ pub struct ExperimentalChooseFastestDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalChooseFastestDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalChooseFastestDatasetInst { + /// An instance of a fully built ExperimentalChooseFastestDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalChooseFastestDataset { /// Creates a new `ExperimentalChooseFastestDataset`. @@ -33698,19 +41152,13 @@ impl ExperimentalChooseFastestDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -33722,53 +41170,88 @@ impl ExperimentalChooseFastestDataset { } /// Builds the `ExperimentalChooseFastestDataset` operation. - pub fn build>( - &self, - input_datasets: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_datasets: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_datasets.into(), scope) } - - fn build_impl( - &self, - input_datasets: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_datasets: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalChooseFastestDataset", |nd| { nd.add_input(input_datasets); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_experiments { - nd.set_attr_int("num_experiments", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_experiments { + nd.set_attr_int("num_experiments", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalChooseFastestDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_datasets: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_datasets.into(), scope) + } + fn build_instance_impl(&self, input_datasets: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalChooseFastestDataset", |nd| { + nd.add_input(input_datasets); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_experiments { + nd.set_attr_int("num_experiments", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalChooseFastestDatasetInst{op}) + } +} +impl ExperimentalChooseFastestDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalChooseFastestDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalChooseFastestDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalChooseFastestDataset::new().build(input_datasets, scope)`. -pub fn experimental_choose_fastest_dataset>( - input_datasets: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_choose_fastest_dataset>(input_datasets: O0, scope: &mut crate::Scope) -> crate::Result { ExperimentalChooseFastestDataset::new().build(input_datasets, scope) } + /// Builder for the `ExperimentalDatasetCardinality` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalDatasetCardinality { control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalDatasetCardinality' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalDatasetCardinalityInst { + /// An instance of a fully built ExperimentalDatasetCardinality Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalDatasetCardinality { /// Creates a new `ExperimentalDatasetCardinality`. @@ -33783,19 +41266,10 @@ impl ExperimentalDatasetCardinality { } /// Builds the `ExperimentalDatasetCardinality` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalDatasetCardinality", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { @@ -33804,20 +41278,52 @@ impl ExperimentalDatasetCardinality { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalDatasetCardinality` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalDatasetCardinality", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalDatasetCardinalityInst{op}) + } +} +impl ExperimentalDatasetCardinalityInst { + /// Returns the 'cardinality' output of this 'ExperimentalDatasetCardinality' operation. + pub fn cardinality(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalDatasetCardinalityInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalDatasetCardinality::new().build(input_dataset, scope)`. -pub fn experimental_dataset_cardinality>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_dataset_cardinality>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { ExperimentalDatasetCardinality::new().build(input_dataset, scope) } + /// Builder for the `ExperimentalDatasetToTFRecord` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalDatasetToTFRecord { control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalDatasetToTFRecord' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalDatasetToTFRecordInst { + /// An instance of a fully built ExperimentalDatasetToTFRecord Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalDatasetToTFRecord { /// Creates a new `ExperimentalDatasetToTFRecord`. @@ -33832,32 +41338,10 @@ impl ExperimentalDatasetToTFRecord { } /// Builds the `ExperimentalDatasetToTFRecord` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - filename: O1, - compression_type: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - filename.into(), - compression_type.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - filename: crate::Output, - compression_type: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, filename: O1, compression_type: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), filename.into(), compression_type.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, filename: crate::Output, compression_type: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalDatasetToTFRecord", |nd| { nd.add_input(input_dataset); nd.add_input(filename); @@ -33868,21 +41352,36 @@ impl ExperimentalDatasetToTFRecord { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalDatasetToTFRecord` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, filename: O1, compression_type: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), filename.into(), compression_type.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, filename: crate::Output, compression_type: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalDatasetToTFRecord", |nd| { + nd.add_input(input_dataset); + nd.add_input(filename); + nd.add_input(compression_type); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalDatasetToTFRecordInst{op}) + } +} +impl ExperimentalDatasetToTFRecordInst { +} +impl Into for ExperimentalDatasetToTFRecordInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalDatasetToTFRecord::new().build(input_dataset, filename, compression_type, scope)`. -pub fn experimental_dataset_to_tfrecord< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - filename: O1, - compression_type: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_dataset_to_tfrecord, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, filename: O1, compression_type: O2, scope: &mut crate::Scope) -> crate::Result { ExperimentalDatasetToTFRecord::new().build(input_dataset, filename, compression_type, scope) } + /// Builder for the `ExperimentalDenseToSparseBatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalDenseToSparseBatchDataset { @@ -33890,6 +41389,12 @@ pub struct ExperimentalDenseToSparseBatchDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalDenseToSparseBatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalDenseToSparseBatchDatasetInst { + /// An instance of a fully built ExperimentalDenseToSparseBatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalDenseToSparseBatchDataset { /// Creates a new `ExperimentalDenseToSparseBatchDataset`. @@ -33898,19 +41403,13 @@ impl ExperimentalDenseToSparseBatchDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -33922,32 +41421,10 @@ impl ExperimentalDenseToSparseBatchDataset { } /// Builds the `ExperimentalDenseToSparseBatchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - batch_size: O1, - row_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - batch_size.into(), - row_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - batch_size: crate::Output, - row_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, row_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), batch_size.into(), row_shape.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, row_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalDenseToSparseBatchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(batch_size); @@ -33955,30 +41432,58 @@ impl ExperimentalDenseToSparseBatchDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalDenseToSparseBatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, row_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), batch_size.into(), row_shape.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, row_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalDenseToSparseBatchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(batch_size); + nd.add_input(row_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalDenseToSparseBatchDatasetInst{op}) + } +} +impl ExperimentalDenseToSparseBatchDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalDenseToSparseBatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalDenseToSparseBatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalDenseToSparseBatchDataset::new().build(input_dataset, batch_size, row_shape, scope)`. -pub fn experimental_dense_to_sparse_batch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - batch_size: O1, - row_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_dense_to_sparse_batch_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, batch_size: O1, row_shape: O2, scope: &mut crate::Scope) -> crate::Result { ExperimentalDenseToSparseBatchDataset::new().build(input_dataset, batch_size, row_shape, scope) } + /// Builder for the `ExperimentalDirectedInterleaveDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalDirectedInterleaveDataset { @@ -33987,6 +41492,12 @@ pub struct ExperimentalDirectedInterleaveDataset { N: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalDirectedInterleaveDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalDirectedInterleaveDatasetInst { + /// An instance of a fully built ExperimentalDirectedInterleaveDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalDirectedInterleaveDataset { /// Creates a new `ExperimentalDirectedInterleaveDataset`. @@ -33995,19 +41506,13 @@ impl ExperimentalDirectedInterleaveDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -34025,63 +41530,73 @@ impl ExperimentalDirectedInterleaveDataset { } /// Builds the `ExperimentalDirectedInterleaveDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - selector_input_dataset: O0, - data_input_datasets: O1, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - selector_input_dataset.into(), - data_input_datasets.into(), - scope, - ) - } - - fn build_impl( - &self, - selector_input_dataset: crate::Output, - data_input_datasets: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, selector_input_dataset: O0, data_input_datasets: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(selector_input_dataset.into(), data_input_datasets.into(), scope) + } + fn build_impl(&self, selector_input_dataset: crate::Output, data_input_datasets: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalDirectedInterleaveDataset", |nd| { nd.add_input(selector_input_dataset); nd.add_input(data_input_datasets); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalDirectedInterleaveDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, selector_input_dataset: O0, data_input_datasets: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(selector_input_dataset.into(), data_input_datasets.into(), scope) + } + fn build_instance_impl(&self, selector_input_dataset: crate::Output, data_input_datasets: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalDirectedInterleaveDataset", |nd| { + nd.add_input(selector_input_dataset); + nd.add_input(data_input_datasets); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalDirectedInterleaveDatasetInst{op}) + } +} +impl ExperimentalDirectedInterleaveDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalDirectedInterleaveDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalDirectedInterleaveDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalDirectedInterleaveDataset::new().build(selector_input_dataset, data_input_datasets, scope)`. -pub fn experimental_directed_interleave_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - selector_input_dataset: O0, - data_input_datasets: O1, - scope: &mut crate::Scope, -) -> crate::Result { - ExperimentalDirectedInterleaveDataset::new().build( - selector_input_dataset, - data_input_datasets, - scope, - ) +pub fn experimental_directed_interleave_dataset, O1: ::std::convert::Into>(selector_input_dataset: O0, data_input_datasets: O1, scope: &mut crate::Scope) -> crate::Result { + ExperimentalDirectedInterleaveDataset::new().build(selector_input_dataset, data_input_datasets, scope) } + /// Builder for the `ExperimentalGroupByReducerDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalGroupByReducerDataset { @@ -34097,6 +41612,12 @@ pub struct ExperimentalGroupByReducerDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalGroupByReducerDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalGroupByReducerDatasetInst { + /// An instance of a fully built ExperimentalGroupByReducerDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalGroupByReducerDataset { /// Creates a new `ExperimentalGroupByReducerDataset`. @@ -34105,99 +41626,61 @@ impl ExperimentalGroupByReducerDataset { } /// Sets the `key_func` attribute. - pub fn key_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_func>(mut self, value: ArgType) -> Self { self.key_func = ::std::option::Option::Some(value.into()); self } /// Sets the `init_func` attribute. - pub fn init_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn init_func>(mut self, value: ArgType) -> Self { self.init_func = ::std::option::Option::Some(value.into()); self } /// Sets the `reduce_func` attribute. - pub fn reduce_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduce_func>(mut self, value: ArgType) -> Self { self.reduce_func = ::std::option::Option::Some(value.into()); self } /// Sets the `finalize_func` attribute. - pub fn finalize_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn finalize_func>(mut self, value: ArgType) -> Self { self.finalize_func = ::std::option::Option::Some(value.into()); self } /// Sets the `Tkey_func_other_arguments` attribute. - pub fn Tkey_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Tkey_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Tkey_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `Tinit_func_other_arguments` attribute. - pub fn Tinit_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinit_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Tinit_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `Treduce_func_other_arguments` attribute. - pub fn Treduce_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Treduce_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Treduce_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfinalize_func_other_arguments` attribute. - pub fn Tfinalize_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfinalize_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Tfinalize_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -34209,40 +41692,10 @@ impl ExperimentalGroupByReducerDataset { } /// Builds the `ExperimentalGroupByReducerDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input_dataset: O0, - key_func_other_arguments: O1, - init_func_other_arguments: O2, - reduce_func_other_arguments: O3, - finalize_func_other_arguments: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - key_func_other_arguments.into(), - init_func_other_arguments.into(), - reduce_func_other_arguments.into(), - finalize_func_other_arguments.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - key_func_other_arguments: crate::Output, - init_func_other_arguments: crate::Output, - reduce_func_other_arguments: crate::Output, - finalize_func_other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, key_func_other_arguments: O1, init_func_other_arguments: O2, reduce_func_other_arguments: O3, finalize_func_other_arguments: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), key_func_other_arguments.into(), init_func_other_arguments.into(), reduce_func_other_arguments.into(), finalize_func_other_arguments.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, key_func_other_arguments: crate::Output, init_func_other_arguments: crate::Output, reduce_func_other_arguments: crate::Output, finalize_func_other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalGroupByReducerDataset", |nd| { nd.add_input(input_dataset); nd.add_input(key_func_other_arguments); @@ -34252,65 +41705,108 @@ impl ExperimentalGroupByReducerDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_func { - nd.set_attr_string("key_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.init_func { - nd.set_attr_string("init_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.reduce_func { - nd.set_attr_string("reduce_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.finalize_func { - nd.set_attr_string("finalize_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { - nd.set_attr_type_list("Tkey_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tinit_func_other_arguments { - nd.set_attr_type_list("Tinit_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { - nd.set_attr_type_list("Treduce_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfinalize_func_other_arguments { - nd.set_attr_type_list("Tfinalize_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; + if let ::std::option::Option::Some(value) = &self.key_func { + nd.set_attr_string("key_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.init_func { + nd.set_attr_string("init_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduce_func { + nd.set_attr_string("reduce_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.finalize_func { + nd.set_attr_string("finalize_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { + nd.set_attr_type_list("Tkey_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinit_func_other_arguments { + nd.set_attr_type_list("Tinit_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { + nd.set_attr_type_list("Treduce_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfinalize_func_other_arguments { + nd.set_attr_type_list("Tfinalize_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ExperimentalGroupByReducerDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, key_func_other_arguments: O1, init_func_other_arguments: O2, reduce_func_other_arguments: O3, finalize_func_other_arguments: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), key_func_other_arguments.into(), init_func_other_arguments.into(), reduce_func_other_arguments.into(), finalize_func_other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, key_func_other_arguments: crate::Output, init_func_other_arguments: crate::Output, reduce_func_other_arguments: crate::Output, finalize_func_other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalGroupByReducerDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(key_func_other_arguments); + nd.add_input(init_func_other_arguments); + nd.add_input(reduce_func_other_arguments); + nd.add_input(finalize_func_other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.key_func { + nd.set_attr_string("key_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.init_func { + nd.set_attr_string("init_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduce_func { + nd.set_attr_string("reduce_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.finalize_func { + nd.set_attr_string("finalize_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { + nd.set_attr_type_list("Tkey_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinit_func_other_arguments { + nd.set_attr_type_list("Tinit_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { + nd.set_attr_type_list("Treduce_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfinalize_func_other_arguments { + nd.set_attr_type_list("Tfinalize_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalGroupByReducerDatasetInst{op}) + } +} +impl ExperimentalGroupByReducerDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalGroupByReducerDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalGroupByReducerDatasetInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ExperimentalGroupByReducerDataset::new().build(input_dataset, key_func_other_arguments, init_func_other_arguments, reduce_func_other_arguments, finalize_func_other_arguments, scope)`. -pub fn experimental_group_by_reducer_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input_dataset: O0, - key_func_other_arguments: O1, - init_func_other_arguments: O2, - reduce_func_other_arguments: O3, - finalize_func_other_arguments: O4, - scope: &mut crate::Scope, -) -> crate::Result { - ExperimentalGroupByReducerDataset::new().build( - input_dataset, - key_func_other_arguments, - init_func_other_arguments, - reduce_func_other_arguments, - finalize_func_other_arguments, - scope, - ) +pub fn experimental_group_by_reducer_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input_dataset: O0, key_func_other_arguments: O1, init_func_other_arguments: O2, reduce_func_other_arguments: O3, finalize_func_other_arguments: O4, scope: &mut crate::Scope) -> crate::Result { + ExperimentalGroupByReducerDataset::new().build(input_dataset, key_func_other_arguments, init_func_other_arguments, reduce_func_other_arguments, finalize_func_other_arguments, scope) } + /// Builder for the `ExperimentalGroupByWindowDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalGroupByWindowDataset { @@ -34324,6 +41820,12 @@ pub struct ExperimentalGroupByWindowDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalGroupByWindowDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalGroupByWindowDatasetInst { + /// An instance of a fully built ExperimentalGroupByWindowDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalGroupByWindowDataset { /// Creates a new `ExperimentalGroupByWindowDataset`. @@ -34332,79 +41834,49 @@ impl ExperimentalGroupByWindowDataset { } /// Sets the `key_func` attribute. - pub fn key_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_func>(mut self, value: ArgType) -> Self { self.key_func = ::std::option::Option::Some(value.into()); self } /// Sets the `reduce_func` attribute. - pub fn reduce_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduce_func>(mut self, value: ArgType) -> Self { self.reduce_func = ::std::option::Option::Some(value.into()); self } /// Sets the `window_size_func` attribute. - pub fn window_size_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn window_size_func>(mut self, value: ArgType) -> Self { self.window_size_func = ::std::option::Option::Some(value.into()); self } /// Sets the `Tkey_func_other_arguments` attribute. - pub fn Tkey_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Tkey_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Tkey_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `Treduce_func_other_arguments` attribute. - pub fn Treduce_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Treduce_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Treduce_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `Twindow_size_func_other_arguments` attribute. - pub fn Twindow_size_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Twindow_size_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Twindow_size_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -34416,36 +41888,10 @@ impl ExperimentalGroupByWindowDataset { } /// Builds the `ExperimentalGroupByWindowDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - key_func_other_arguments: O1, - reduce_func_other_arguments: O2, - window_size_func_other_arguments: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - key_func_other_arguments.into(), - reduce_func_other_arguments.into(), - window_size_func_other_arguments.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - key_func_other_arguments: crate::Output, - reduce_func_other_arguments: crate::Output, - window_size_func_other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, key_func_other_arguments: O1, reduce_func_other_arguments: O2, window_size_func_other_arguments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), key_func_other_arguments.into(), reduce_func_other_arguments.into(), window_size_func_other_arguments.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, key_func_other_arguments: crate::Output, reduce_func_other_arguments: crate::Output, window_size_func_other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalGroupByWindowDataset", |nd| { nd.add_input(input_dataset); nd.add_input(key_func_other_arguments); @@ -34454,56 +41900,95 @@ impl ExperimentalGroupByWindowDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_func { - nd.set_attr_string("key_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.reduce_func { - nd.set_attr_string("reduce_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.window_size_func { - nd.set_attr_string("window_size_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { - nd.set_attr_type_list("Tkey_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { - nd.set_attr_type_list("Treduce_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Twindow_size_func_other_arguments { - nd.set_attr_type_list("Twindow_size_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; + if let ::std::option::Option::Some(value) = &self.key_func { + nd.set_attr_string("key_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduce_func { + nd.set_attr_string("reduce_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.window_size_func { + nd.set_attr_string("window_size_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { + nd.set_attr_type_list("Tkey_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { + nd.set_attr_type_list("Treduce_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Twindow_size_func_other_arguments { + nd.set_attr_type_list("Twindow_size_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ExperimentalGroupByWindowDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, key_func_other_arguments: O1, reduce_func_other_arguments: O2, window_size_func_other_arguments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), key_func_other_arguments.into(), reduce_func_other_arguments.into(), window_size_func_other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, key_func_other_arguments: crate::Output, reduce_func_other_arguments: crate::Output, window_size_func_other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalGroupByWindowDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(key_func_other_arguments); + nd.add_input(reduce_func_other_arguments); + nd.add_input(window_size_func_other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.key_func { + nd.set_attr_string("key_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduce_func { + nd.set_attr_string("reduce_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.window_size_func { + nd.set_attr_string("window_size_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { + nd.set_attr_type_list("Tkey_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { + nd.set_attr_type_list("Treduce_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Twindow_size_func_other_arguments { + nd.set_attr_type_list("Twindow_size_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalGroupByWindowDatasetInst{op}) + } +} +impl ExperimentalGroupByWindowDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalGroupByWindowDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalGroupByWindowDatasetInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ExperimentalGroupByWindowDataset::new().build(input_dataset, key_func_other_arguments, reduce_func_other_arguments, window_size_func_other_arguments, scope)`. -pub fn experimental_group_by_window_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - key_func_other_arguments: O1, - reduce_func_other_arguments: O2, - window_size_func_other_arguments: O3, - scope: &mut crate::Scope, -) -> crate::Result { - ExperimentalGroupByWindowDataset::new().build( - input_dataset, - key_func_other_arguments, - reduce_func_other_arguments, - window_size_func_other_arguments, - scope, - ) +pub fn experimental_group_by_window_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, key_func_other_arguments: O1, reduce_func_other_arguments: O2, window_size_func_other_arguments: O3, scope: &mut crate::Scope) -> crate::Result { + ExperimentalGroupByWindowDataset::new().build(input_dataset, key_func_other_arguments, reduce_func_other_arguments, window_size_func_other_arguments, scope) } + /// Builder for the `ExperimentalIgnoreErrorsDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalIgnoreErrorsDataset { @@ -34512,6 +41997,12 @@ pub struct ExperimentalIgnoreErrorsDataset { log_warning: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalIgnoreErrorsDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalIgnoreErrorsDatasetInst { + /// An instance of a fully built ExperimentalIgnoreErrorsDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalIgnoreErrorsDataset { /// Creates a new `ExperimentalIgnoreErrorsDataset`. @@ -34520,19 +42011,13 @@ impl ExperimentalIgnoreErrorsDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -34550,50 +42035,82 @@ impl ExperimentalIgnoreErrorsDataset { } /// Builds the `ExperimentalIgnoreErrorsDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalIgnoreErrorsDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.log_warning { - nd.set_attr_bool("log_warning", *value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.log_warning { + nd.set_attr_bool("log_warning", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalIgnoreErrorsDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalIgnoreErrorsDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.log_warning { + nd.set_attr_bool("log_warning", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalIgnoreErrorsDatasetInst{op}) + } +} +impl ExperimentalIgnoreErrorsDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalIgnoreErrorsDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalIgnoreErrorsDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalIgnoreErrorsDataset::new().build(input_dataset, scope)`. -pub fn experimental_ignore_errors_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_ignore_errors_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { ExperimentalIgnoreErrorsDataset::new().build(input_dataset, scope) } + /// Builder for the `ExperimentalIteratorGetDevice` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalIteratorGetDevice { control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalIteratorGetDevice' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalIteratorGetDeviceInst { + /// An instance of a fully built ExperimentalIteratorGetDevice Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalIteratorGetDevice { /// Creates a new `ExperimentalIteratorGetDevice`. @@ -34608,19 +42125,10 @@ impl ExperimentalIteratorGetDevice { } /// Builds the `ExperimentalIteratorGetDevice` operation. - pub fn build>( - &self, - resource: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalIteratorGetDevice", |nd| { nd.add_input(resource); for op in &self.control_inputs { @@ -34629,15 +42137,41 @@ impl ExperimentalIteratorGetDevice { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalIteratorGetDevice` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalIteratorGetDevice", |nd| { + nd.add_input(resource); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalIteratorGetDeviceInst{op}) + } +} +impl ExperimentalIteratorGetDeviceInst { + /// Returns the 'device' output of this 'ExperimentalIteratorGetDevice' operation. + pub fn device(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalIteratorGetDeviceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalIteratorGetDevice::new().build(resource, scope)`. -pub fn experimental_iterator_get_device>( - resource: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_iterator_get_device>(resource: O0, scope: &mut crate::Scope) -> crate::Result { ExperimentalIteratorGetDevice::new().build(resource, scope) } + /// Builder for the `ExperimentalLMDBDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalLMDBDataset { @@ -34645,6 +42179,12 @@ pub struct ExperimentalLMDBDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalLMDBDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalLMDBDatasetInst { + /// An instance of a fully built ExperimentalLMDBDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalLMDBDataset { /// Creates a new `ExperimentalLMDBDataset`. @@ -34653,19 +42193,13 @@ impl ExperimentalLMDBDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -34677,42 +42211,65 @@ impl ExperimentalLMDBDataset { } /// Builds the `ExperimentalLMDBDataset` operation. - pub fn build>( - &self, - filenames: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, filenames: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(filenames.into(), scope) } - - fn build_impl( - &self, - filenames: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, filenames: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalLMDBDataset", |nd| { nd.add_input(filenames); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalLMDBDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, filenames: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filenames.into(), scope) + } + fn build_instance_impl(&self, filenames: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalLMDBDataset", |nd| { + nd.add_input(filenames); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalLMDBDatasetInst{op}) + } +} +impl ExperimentalLMDBDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalLMDBDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalLMDBDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalLMDBDataset::new().build(filenames, scope)`. -pub fn experimental_lmdbdataset>( - filenames: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_lmdbdataset>(filenames: O0, scope: &mut crate::Scope) -> crate::Result { ExperimentalLMDBDataset::new().build(filenames, scope) } + /// Builder for the `ExperimentalLatencyStatsDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalLatencyStatsDataset { @@ -34720,6 +42277,12 @@ pub struct ExperimentalLatencyStatsDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalLatencyStatsDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalLatencyStatsDatasetInst { + /// An instance of a fully built ExperimentalLatencyStatsDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalLatencyStatsDataset { /// Creates a new `ExperimentalLatencyStatsDataset`. @@ -34728,19 +42291,13 @@ impl ExperimentalLatencyStatsDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -34752,52 +42309,67 @@ impl ExperimentalLatencyStatsDataset { } /// Builds the `ExperimentalLatencyStatsDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - tag: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), tag.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - tag: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, tag: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalLatencyStatsDataset", |nd| { nd.add_input(input_dataset); nd.add_input(tag); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalLatencyStatsDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), tag.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, tag: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalLatencyStatsDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(tag); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalLatencyStatsDatasetInst{op}) + } +} +impl ExperimentalLatencyStatsDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalLatencyStatsDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalLatencyStatsDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalLatencyStatsDataset::new().build(input_dataset, tag, scope)`. -pub fn experimental_latency_stats_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - tag: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_latency_stats_dataset, O1: ::std::convert::Into>(input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { ExperimentalLatencyStatsDataset::new().build(input_dataset, tag, scope) } + /// Builder for the `ExperimentalMapAndBatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalMapAndBatchDataset { @@ -34808,6 +42380,12 @@ pub struct ExperimentalMapAndBatchDataset { preserve_cardinality: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalMapAndBatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalMapAndBatchDatasetInst { + /// An instance of a fully built ExperimentalMapAndBatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalMapAndBatchDataset { /// Creates a new `ExperimentalMapAndBatchDataset`. @@ -34816,46 +42394,31 @@ impl ExperimentalMapAndBatchDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `preserve_cardinality` attribute. - pub fn preserve_cardinality>( - mut self, - value: ArgType, - ) -> Self { + pub fn preserve_cardinality>(mut self, value: ArgType) -> Self { self.preserve_cardinality = ::std::option::Option::Some(value.into()); self } @@ -34867,40 +42430,10 @@ impl ExperimentalMapAndBatchDataset { } /// Builds the `ExperimentalMapAndBatchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - batch_size: O2, - num_parallel_calls: O3, - drop_remainder: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - batch_size.into(), - num_parallel_calls.into(), - drop_remainder.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - batch_size: crate::Output, - num_parallel_calls: crate::Output, - drop_remainder: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, batch_size: O2, num_parallel_calls: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), batch_size.into(), num_parallel_calls.into(), drop_remainder.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, batch_size: crate::Output, num_parallel_calls: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalMapAndBatchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -34910,50 +42443,78 @@ impl ExperimentalMapAndBatchDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.preserve_cardinality { - nd.set_attr_bool("preserve_cardinality", *value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalMapAndBatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, batch_size: O2, num_parallel_calls: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), batch_size.into(), num_parallel_calls.into(), drop_remainder.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, batch_size: crate::Output, num_parallel_calls: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalMapAndBatchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(batch_size); + nd.add_input(num_parallel_calls); + nd.add_input(drop_remainder); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalMapAndBatchDatasetInst{op}) + } +} +impl ExperimentalMapAndBatchDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalMapAndBatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalMapAndBatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalMapAndBatchDataset::new().build(input_dataset, other_arguments, batch_size, num_parallel_calls, drop_remainder, scope)`. -pub fn experimental_map_and_batch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - batch_size: O2, - num_parallel_calls: O3, - drop_remainder: O4, - scope: &mut crate::Scope, -) -> crate::Result { - ExperimentalMapAndBatchDataset::new().build( - input_dataset, - other_arguments, - batch_size, - num_parallel_calls, - drop_remainder, - scope, - ) +pub fn experimental_map_and_batch_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, batch_size: O2, num_parallel_calls: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + ExperimentalMapAndBatchDataset::new().build(input_dataset, other_arguments, batch_size, num_parallel_calls, drop_remainder, scope) } + /// Builder for the `ExperimentalMapDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalMapDataset { @@ -34965,6 +42526,12 @@ pub struct ExperimentalMapDataset { preserve_cardinality: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalMapDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalMapDatasetInst { + /// An instance of a fully built ExperimentalMapDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalMapDataset { /// Creates a new `ExperimentalMapDataset`. @@ -34973,55 +42540,37 @@ impl ExperimentalMapDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `use_inter_op_parallelism` attribute. - pub fn use_inter_op_parallelism>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_inter_op_parallelism>(mut self, value: ArgType) -> Self { self.use_inter_op_parallelism = ::std::option::Option::Some(value.into()); self } /// Sets the `preserve_cardinality` attribute. - pub fn preserve_cardinality>( - mut self, - value: ArgType, - ) -> Self { + pub fn preserve_cardinality>(mut self, value: ArgType) -> Self { self.preserve_cardinality = ::std::option::Option::Some(value.into()); self } @@ -35033,69 +42582,102 @@ impl ExperimentalMapDataset { } /// Builds the `ExperimentalMapDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), other_arguments.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalMapDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { - nd.set_attr_bool("use_inter_op_parallelism", *value)?; - } - if let ::std::option::Option::Some(value) = &self.preserve_cardinality { - nd.set_attr_bool("preserve_cardinality", *value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { + nd.set_attr_bool("use_inter_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalMapDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalMapDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { + nd.set_attr_bool("use_inter_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalMapDatasetInst{op}) + } +} +impl ExperimentalMapDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalMapDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalMapDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalMapDataset::new().build(input_dataset, other_arguments, scope)`. -pub fn experimental_map_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_map_dataset, O1: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { ExperimentalMapDataset::new().build(input_dataset, other_arguments, scope) } + /// Builder for the `ExperimentalMatchingFilesDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalMatchingFilesDataset { control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalMatchingFilesDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalMatchingFilesDatasetInst { + /// An instance of a fully built ExperimentalMatchingFilesDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalMatchingFilesDataset { /// Creates a new `ExperimentalMatchingFilesDataset`. @@ -35110,19 +42692,10 @@ impl ExperimentalMatchingFilesDataset { } /// Builds the `ExperimentalMatchingFilesDataset` operation. - pub fn build>( - &self, - patterns: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, patterns: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(patterns.into(), scope) } - - fn build_impl( - &self, - patterns: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, patterns: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalMatchingFilesDataset", |nd| { nd.add_input(patterns); for op in &self.control_inputs { @@ -35131,15 +42704,41 @@ impl ExperimentalMatchingFilesDataset { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalMatchingFilesDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, patterns: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(patterns.into(), scope) + } + fn build_instance_impl(&self, patterns: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalMatchingFilesDataset", |nd| { + nd.add_input(patterns); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalMatchingFilesDatasetInst{op}) + } +} +impl ExperimentalMatchingFilesDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalMatchingFilesDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalMatchingFilesDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalMatchingFilesDataset::new().build(patterns, scope)`. -pub fn experimental_matching_files_dataset>( - patterns: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_matching_files_dataset>(patterns: O0, scope: &mut crate::Scope) -> crate::Result { ExperimentalMatchingFilesDataset::new().build(patterns, scope) } + /// Builder for the `ExperimentalMaxIntraOpParallelismDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalMaxIntraOpParallelismDataset { @@ -35147,6 +42746,12 @@ pub struct ExperimentalMaxIntraOpParallelismDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalMaxIntraOpParallelismDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalMaxIntraOpParallelismDatasetInst { + /// An instance of a fully built ExperimentalMaxIntraOpParallelismDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalMaxIntraOpParallelismDataset { /// Creates a new `ExperimentalMaxIntraOpParallelismDataset`. @@ -35155,19 +42760,13 @@ impl ExperimentalMaxIntraOpParallelismDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -35179,56 +42778,67 @@ impl ExperimentalMaxIntraOpParallelismDataset { } /// Builds the `ExperimentalMaxIntraOpParallelismDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - max_intra_op_parallelism: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, max_intra_op_parallelism: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), max_intra_op_parallelism.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - max_intra_op_parallelism: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, max_intra_op_parallelism: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalMaxIntraOpParallelismDataset", |nd| { nd.add_input(input_dataset); nd.add_input(max_intra_op_parallelism); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalMaxIntraOpParallelismDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, max_intra_op_parallelism: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), max_intra_op_parallelism.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, max_intra_op_parallelism: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalMaxIntraOpParallelismDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(max_intra_op_parallelism); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalMaxIntraOpParallelismDatasetInst{op}) + } +} +impl ExperimentalMaxIntraOpParallelismDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalMaxIntraOpParallelismDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalMaxIntraOpParallelismDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalMaxIntraOpParallelismDataset::new().build(input_dataset, max_intra_op_parallelism, scope)`. -pub fn experimental_max_intra_op_parallelism_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - max_intra_op_parallelism: O1, - scope: &mut crate::Scope, -) -> crate::Result { - ExperimentalMaxIntraOpParallelismDataset::new().build( - input_dataset, - max_intra_op_parallelism, - scope, - ) +pub fn experimental_max_intra_op_parallelism_dataset, O1: ::std::convert::Into>(input_dataset: O0, max_intra_op_parallelism: O1, scope: &mut crate::Scope) -> crate::Result { + ExperimentalMaxIntraOpParallelismDataset::new().build(input_dataset, max_intra_op_parallelism, scope) } + /// Builder for the `ExperimentalNonSerializableDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalNonSerializableDataset { @@ -35236,6 +42846,12 @@ pub struct ExperimentalNonSerializableDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalNonSerializableDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalNonSerializableDatasetInst { + /// An instance of a fully built ExperimentalNonSerializableDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalNonSerializableDataset { /// Creates a new `ExperimentalNonSerializableDataset`. @@ -35244,19 +42860,13 @@ impl ExperimentalNonSerializableDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -35268,42 +42878,65 @@ impl ExperimentalNonSerializableDataset { } /// Builds the `ExperimentalNonSerializableDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalNonSerializableDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalNonSerializableDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalNonSerializableDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalNonSerializableDatasetInst{op}) + } +} +impl ExperimentalNonSerializableDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalNonSerializableDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalNonSerializableDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalNonSerializableDataset::new().build(input_dataset, scope)`. -pub fn experimental_non_serializable_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_non_serializable_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { ExperimentalNonSerializableDataset::new().build(input_dataset, scope) } + /// Builder for the `ExperimentalParallelInterleaveDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalParallelInterleaveDataset { @@ -35313,6 +42946,12 @@ pub struct ExperimentalParallelInterleaveDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalParallelInterleaveDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalParallelInterleaveDatasetInst { + /// An instance of a fully built ExperimentalParallelInterleaveDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalParallelInterleaveDataset { /// Creates a new `ExperimentalParallelInterleaveDataset`. @@ -35321,37 +42960,25 @@ impl ExperimentalParallelInterleaveDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -35363,48 +42990,10 @@ impl ExperimentalParallelInterleaveDataset { } /// Builds the `ExperimentalParallelInterleaveDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - sloppy: O4, - buffer_output_elements: O5, - prefetch_input_elements: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - cycle_length.into(), - block_length.into(), - sloppy.into(), - buffer_output_elements.into(), - prefetch_input_elements.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - cycle_length: crate::Output, - block_length: crate::Output, - sloppy: crate::Output, - buffer_output_elements: crate::Output, - prefetch_input_elements: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, sloppy: O4, buffer_output_elements: O5, prefetch_input_elements: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), sloppy.into(), buffer_output_elements.into(), prefetch_input_elements.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, sloppy: crate::Output, buffer_output_elements: crate::Output, prefetch_input_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalParallelInterleaveDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -35416,53 +43005,74 @@ impl ExperimentalParallelInterleaveDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalParallelInterleaveDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, sloppy: O4, buffer_output_elements: O5, prefetch_input_elements: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), sloppy.into(), buffer_output_elements.into(), prefetch_input_elements.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, sloppy: crate::Output, buffer_output_elements: crate::Output, prefetch_input_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalParallelInterleaveDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(cycle_length); + nd.add_input(block_length); + nd.add_input(sloppy); + nd.add_input(buffer_output_elements); + nd.add_input(prefetch_input_elements); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalParallelInterleaveDatasetInst{op}) + } +} +impl ExperimentalParallelInterleaveDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalParallelInterleaveDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalParallelInterleaveDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalParallelInterleaveDataset::new().build(input_dataset, other_arguments, cycle_length, block_length, sloppy, buffer_output_elements, prefetch_input_elements, scope)`. -pub fn experimental_parallel_interleave_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - sloppy: O4, - buffer_output_elements: O5, - prefetch_input_elements: O6, - scope: &mut crate::Scope, -) -> crate::Result { - ExperimentalParallelInterleaveDataset::new().build( - input_dataset, - other_arguments, - cycle_length, - block_length, - sloppy, - buffer_output_elements, - prefetch_input_elements, - scope, - ) +pub fn experimental_parallel_interleave_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, sloppy: O4, buffer_output_elements: O5, prefetch_input_elements: O6, scope: &mut crate::Scope) -> crate::Result { + ExperimentalParallelInterleaveDataset::new().build(input_dataset, other_arguments, cycle_length, block_length, sloppy, buffer_output_elements, prefetch_input_elements, scope) } + /// Builder for the `ExperimentalParseExampleDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalParseExampleDataset { @@ -35476,6 +43086,12 @@ pub struct ExperimentalParseExampleDataset { sloppy: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalParseExampleDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalParseExampleDatasetInst { + /// An instance of a fully built ExperimentalParseExampleDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalParseExampleDataset { /// Creates a new `ExperimentalParseExampleDataset`. @@ -35484,64 +43100,43 @@ impl ExperimentalParseExampleDataset { } /// Sets the `sparse_keys` attribute. - pub fn sparse_keys>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_keys>>(mut self, value: ArgType) -> Self { self.sparse_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_keys` attribute. - pub fn dense_keys>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_keys>>(mut self, value: ArgType) -> Self { self.dense_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `sparse_types` attribute. - pub fn sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_types>>(mut self, value: ArgType) -> Self { self.sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `Tdense` attribute. - pub fn Tdense>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tdense>>(mut self, value: ArgType) -> Self { self.Tdense = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_shapes` attribute. - pub fn dense_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_shapes>>(mut self, value: ArgType) -> Self { self.dense_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -35559,32 +43154,10 @@ impl ExperimentalParseExampleDataset { } /// Builds the `ExperimentalParseExampleDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - num_parallel_calls: O1, - dense_defaults: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - num_parallel_calls.into(), - dense_defaults.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - num_parallel_calls: crate::Output, - dense_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_parallel_calls: O1, dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), num_parallel_calls.into(), dense_defaults.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, num_parallel_calls: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalParseExampleDataset", |nd| { nd.add_input(input_dataset); nd.add_input(num_parallel_calls); @@ -35592,53 +43165,94 @@ impl ExperimentalParseExampleDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.sparse_keys { - nd.set_attr_string_list("sparse_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_keys { - nd.set_attr_string_list("dense_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_types { - nd.set_attr_type_list("sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tdense { - nd.set_attr_type_list("Tdense", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_shapes { - nd.set_attr_shape_list("dense_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.sloppy { - nd.set_attr_bool("sloppy", *value)?; + if let ::std::option::Option::Some(value) = &self.sparse_keys { + nd.set_attr_string_list("sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_keys { + nd.set_attr_string_list("dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.sloppy { + nd.set_attr_bool("sloppy", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ExperimentalParseExampleDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_parallel_calls: O1, dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), num_parallel_calls.into(), dense_defaults.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, num_parallel_calls: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalParseExampleDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(num_parallel_calls); + nd.add_input(dense_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.sparse_keys { + nd.set_attr_string_list("sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_keys { + nd.set_attr_string_list("dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.sloppy { + nd.set_attr_bool("sloppy", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalParseExampleDatasetInst{op}) + } +} +impl ExperimentalParseExampleDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalParseExampleDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalParseExampleDatasetInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ExperimentalParseExampleDataset::new().build(input_dataset, num_parallel_calls, dense_defaults, scope)`. -pub fn experimental_parse_example_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - num_parallel_calls: O1, - dense_defaults: O2, - scope: &mut crate::Scope, -) -> crate::Result { - ExperimentalParseExampleDataset::new().build( - input_dataset, - num_parallel_calls, - dense_defaults, - scope, - ) +pub fn experimental_parse_example_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, num_parallel_calls: O1, dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { + ExperimentalParseExampleDataset::new().build(input_dataset, num_parallel_calls, dense_defaults, scope) } + /// Builder for the `ExperimentalPrivateThreadPoolDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalPrivateThreadPoolDataset { @@ -35646,6 +43260,12 @@ pub struct ExperimentalPrivateThreadPoolDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalPrivateThreadPoolDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalPrivateThreadPoolDatasetInst { + /// An instance of a fully built ExperimentalPrivateThreadPoolDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalPrivateThreadPoolDataset { /// Creates a new `ExperimentalPrivateThreadPoolDataset`. @@ -35654,19 +43274,13 @@ impl ExperimentalPrivateThreadPoolDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -35678,52 +43292,67 @@ impl ExperimentalPrivateThreadPoolDataset { } /// Builds the `ExperimentalPrivateThreadPoolDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - num_threads: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, num_threads: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), num_threads.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - num_threads: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, num_threads: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalPrivateThreadPoolDataset", |nd| { nd.add_input(input_dataset); nd.add_input(num_threads); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalPrivateThreadPoolDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, num_threads: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), num_threads.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, num_threads: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalPrivateThreadPoolDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(num_threads); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalPrivateThreadPoolDatasetInst{op}) + } +} +impl ExperimentalPrivateThreadPoolDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalPrivateThreadPoolDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalPrivateThreadPoolDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalPrivateThreadPoolDataset::new().build(input_dataset, num_threads, scope)`. -pub fn experimental_private_thread_pool_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - num_threads: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_private_thread_pool_dataset, O1: ::std::convert::Into>(input_dataset: O0, num_threads: O1, scope: &mut crate::Scope) -> crate::Result { ExperimentalPrivateThreadPoolDataset::new().build(input_dataset, num_threads, scope) } + /// Builder for the `ExperimentalRandomDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalRandomDataset { @@ -35731,6 +43360,12 @@ pub struct ExperimentalRandomDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalRandomDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalRandomDatasetInst { + /// An instance of a fully built ExperimentalRandomDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalRandomDataset { /// Creates a new `ExperimentalRandomDataset`. @@ -35739,19 +43374,13 @@ impl ExperimentalRandomDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -35763,52 +43392,67 @@ impl ExperimentalRandomDataset { } /// Builds the `ExperimentalRandomDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - seed: O0, - seed2: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, seed: O0, seed2: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(seed.into(), seed2.into(), scope) } - - fn build_impl( - &self, - seed: crate::Output, - seed2: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, seed: crate::Output, seed2: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalRandomDataset", |nd| { nd.add_input(seed); nd.add_input(seed2); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalRandomDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, seed: O0, seed2: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(seed.into(), seed2.into(), scope) + } + fn build_instance_impl(&self, seed: crate::Output, seed2: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalRandomDataset", |nd| { + nd.add_input(seed); + nd.add_input(seed2); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalRandomDatasetInst{op}) + } +} +impl ExperimentalRandomDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalRandomDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalRandomDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalRandomDataset::new().build(seed, seed2, scope)`. -pub fn experimental_random_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - seed: O0, - seed2: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_random_dataset, O1: ::std::convert::Into>(seed: O0, seed2: O1, scope: &mut crate::Scope) -> crate::Result { ExperimentalRandomDataset::new().build(seed, seed2, scope) } + /// Builder for the `ExperimentalRebatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalRebatchDataset { @@ -35817,6 +43461,12 @@ pub struct ExperimentalRebatchDataset { use_fallback: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalRebatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalRebatchDatasetInst { + /// An instance of a fully built ExperimentalRebatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalRebatchDataset { /// Creates a new `ExperimentalRebatchDataset`. @@ -35825,19 +43475,13 @@ impl ExperimentalRebatchDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -35855,55 +43499,73 @@ impl ExperimentalRebatchDataset { } /// Builds the `ExperimentalRebatchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - num_replicas: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, num_replicas: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), num_replicas.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - num_replicas: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, num_replicas: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalRebatchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(num_replicas); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_fallback { - nd.set_attr_bool("use_fallback", *value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_fallback { + nd.set_attr_bool("use_fallback", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalRebatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, num_replicas: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), num_replicas.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, num_replicas: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalRebatchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(num_replicas); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_fallback { + nd.set_attr_bool("use_fallback", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalRebatchDatasetInst{op}) + } +} +impl ExperimentalRebatchDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalRebatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalRebatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalRebatchDataset::new().build(input_dataset, num_replicas, scope)`. -pub fn experimental_rebatch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - num_replicas: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_rebatch_dataset, O1: ::std::convert::Into>(input_dataset: O0, num_replicas: O1, scope: &mut crate::Scope) -> crate::Result { ExperimentalRebatchDataset::new().build(input_dataset, num_replicas, scope) } + /// Builder for the `ExperimentalScanDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalScanDataset { @@ -35915,6 +43577,12 @@ pub struct ExperimentalScanDataset { preserve_cardinality: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalScanDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalScanDatasetInst { + /// An instance of a fully built ExperimentalScanDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalScanDataset { /// Creates a new `ExperimentalScanDataset`. @@ -35923,55 +43591,37 @@ impl ExperimentalScanDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Tstate` attribute. - pub fn Tstate>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tstate>>(mut self, value: ArgType) -> Self { self.Tstate = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `preserve_cardinality` attribute. - pub fn preserve_cardinality>( - mut self, - value: ArgType, - ) -> Self { + pub fn preserve_cardinality>(mut self, value: ArgType) -> Self { self.preserve_cardinality = ::std::option::Option::Some(value.into()); self } @@ -35983,32 +43633,10 @@ impl ExperimentalScanDataset { } /// Builds the `ExperimentalScanDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - initial_state: O1, - other_arguments: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - initial_state.into(), - other_arguments.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - initial_state: crate::Output, - other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, initial_state: O1, other_arguments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), initial_state.into(), other_arguments.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, initial_state: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalScanDataset", |nd| { nd.add_input(input_dataset); nd.add_input(initial_state); @@ -36016,42 +43644,82 @@ impl ExperimentalScanDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tstate { - nd.set_attr_type_list("Tstate", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.preserve_cardinality { - nd.set_attr_bool("preserve_cardinality", *value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tstate { + nd.set_attr_type_list("Tstate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalScanDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, initial_state: O1, other_arguments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), initial_state.into(), other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, initial_state: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalScanDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(initial_state); + nd.add_input(other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tstate { + nd.set_attr_type_list("Tstate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalScanDatasetInst{op}) + } +} +impl ExperimentalScanDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalScanDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalScanDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalScanDataset::new().build(input_dataset, initial_state, other_arguments, scope)`. -pub fn experimental_scan_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - initial_state: O1, - other_arguments: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_scan_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, initial_state: O1, other_arguments: O2, scope: &mut crate::Scope) -> crate::Result { ExperimentalScanDataset::new().build(input_dataset, initial_state, other_arguments, scope) } + /// Builder for the `ExperimentalSetStatsAggregatorDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalSetStatsAggregatorDataset { @@ -36059,6 +43727,12 @@ pub struct ExperimentalSetStatsAggregatorDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalSetStatsAggregatorDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalSetStatsAggregatorDatasetInst { + /// An instance of a fully built ExperimentalSetStatsAggregatorDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalSetStatsAggregatorDataset { /// Creates a new `ExperimentalSetStatsAggregatorDataset`. @@ -36067,19 +43741,13 @@ impl ExperimentalSetStatsAggregatorDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -36091,36 +43759,10 @@ impl ExperimentalSetStatsAggregatorDataset { } /// Builds the `ExperimentalSetStatsAggregatorDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - stats_aggregator: O1, - tag: O2, - counter_prefix: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - stats_aggregator.into(), - tag.into(), - counter_prefix.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - stats_aggregator: crate::Output, - tag: crate::Output, - counter_prefix: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, stats_aggregator: O1, tag: O2, counter_prefix: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), stats_aggregator.into(), tag.into(), counter_prefix.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, stats_aggregator: crate::Output, tag: crate::Output, counter_prefix: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalSetStatsAggregatorDataset", |nd| { nd.add_input(input_dataset); nd.add_input(stats_aggregator); @@ -36129,38 +43771,59 @@ impl ExperimentalSetStatsAggregatorDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalSetStatsAggregatorDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, stats_aggregator: O1, tag: O2, counter_prefix: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), stats_aggregator.into(), tag.into(), counter_prefix.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, stats_aggregator: crate::Output, tag: crate::Output, counter_prefix: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalSetStatsAggregatorDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(stats_aggregator); + nd.add_input(tag); + nd.add_input(counter_prefix); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalSetStatsAggregatorDatasetInst{op}) + } +} +impl ExperimentalSetStatsAggregatorDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalSetStatsAggregatorDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalSetStatsAggregatorDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalSetStatsAggregatorDataset::new().build(input_dataset, stats_aggregator, tag, counter_prefix, scope)`. -pub fn experimental_set_stats_aggregator_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - stats_aggregator: O1, - tag: O2, - counter_prefix: O3, - scope: &mut crate::Scope, -) -> crate::Result { - ExperimentalSetStatsAggregatorDataset::new().build( - input_dataset, - stats_aggregator, - tag, - counter_prefix, - scope, - ) +pub fn experimental_set_stats_aggregator_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, stats_aggregator: O1, tag: O2, counter_prefix: O3, scope: &mut crate::Scope) -> crate::Result { + ExperimentalSetStatsAggregatorDataset::new().build(input_dataset, stats_aggregator, tag, counter_prefix, scope) } + /// Builder for the `ExperimentalSleepDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalSleepDataset { @@ -36168,6 +43831,12 @@ pub struct ExperimentalSleepDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalSleepDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalSleepDatasetInst { + /// An instance of a fully built ExperimentalSleepDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalSleepDataset { /// Creates a new `ExperimentalSleepDataset`. @@ -36176,19 +43845,13 @@ impl ExperimentalSleepDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -36200,52 +43863,67 @@ impl ExperimentalSleepDataset { } /// Builds the `ExperimentalSleepDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - sleep_microseconds: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, sleep_microseconds: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), sleep_microseconds.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - sleep_microseconds: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, sleep_microseconds: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalSleepDataset", |nd| { nd.add_input(input_dataset); nd.add_input(sleep_microseconds); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalSleepDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, sleep_microseconds: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), sleep_microseconds.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, sleep_microseconds: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalSleepDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(sleep_microseconds); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalSleepDatasetInst{op}) + } +} +impl ExperimentalSleepDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalSleepDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalSleepDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalSleepDataset::new().build(input_dataset, sleep_microseconds, scope)`. -pub fn experimental_sleep_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - sleep_microseconds: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_sleep_dataset, O1: ::std::convert::Into>(input_dataset: O0, sleep_microseconds: O1, scope: &mut crate::Scope) -> crate::Result { ExperimentalSleepDataset::new().build(input_dataset, sleep_microseconds, scope) } + /// Builder for the `ExperimentalSlidingWindowDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalSlidingWindowDataset { @@ -36253,6 +43931,12 @@ pub struct ExperimentalSlidingWindowDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalSlidingWindowDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalSlidingWindowDatasetInst { + /// An instance of a fully built ExperimentalSlidingWindowDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalSlidingWindowDataset { /// Creates a new `ExperimentalSlidingWindowDataset`. @@ -36261,19 +43945,13 @@ impl ExperimentalSlidingWindowDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -36285,36 +43963,10 @@ impl ExperimentalSlidingWindowDataset { } /// Builds the `ExperimentalSlidingWindowDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - window_size: O1, - window_shift: O2, - window_stride: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - window_size.into(), - window_shift.into(), - window_stride.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - window_size: crate::Output, - window_shift: crate::Output, - window_stride: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, window_size: O1, window_shift: O2, window_stride: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), window_size.into(), window_shift.into(), window_stride.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, window_size: crate::Output, window_shift: crate::Output, window_stride: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalSlidingWindowDataset", |nd| { nd.add_input(input_dataset); nd.add_input(window_size); @@ -36323,38 +43975,59 @@ impl ExperimentalSlidingWindowDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalSlidingWindowDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, window_size: O1, window_shift: O2, window_stride: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), window_size.into(), window_shift.into(), window_stride.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, window_size: crate::Output, window_shift: crate::Output, window_stride: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalSlidingWindowDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(window_size); + nd.add_input(window_shift); + nd.add_input(window_stride); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalSlidingWindowDatasetInst{op}) + } +} +impl ExperimentalSlidingWindowDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalSlidingWindowDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalSlidingWindowDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalSlidingWindowDataset::new().build(input_dataset, window_size, window_shift, window_stride, scope)`. -pub fn experimental_sliding_window_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - window_size: O1, - window_shift: O2, - window_stride: O3, - scope: &mut crate::Scope, -) -> crate::Result { - ExperimentalSlidingWindowDataset::new().build( - input_dataset, - window_size, - window_shift, - window_stride, - scope, - ) +pub fn experimental_sliding_window_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, window_size: O1, window_shift: O2, window_stride: O3, scope: &mut crate::Scope) -> crate::Result { + ExperimentalSlidingWindowDataset::new().build(input_dataset, window_size, window_shift, window_stride, scope) } + /// Builder for the `ExperimentalSqlDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalSqlDataset { @@ -36362,6 +44035,12 @@ pub struct ExperimentalSqlDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalSqlDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalSqlDatasetInst { + /// An instance of a fully built ExperimentalSqlDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalSqlDataset { /// Creates a new `ExperimentalSqlDataset`. @@ -36370,19 +44049,13 @@ impl ExperimentalSqlDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -36394,32 +44067,10 @@ impl ExperimentalSqlDataset { } /// Builds the `ExperimentalSqlDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - driver_name: O0, - data_source_name: O1, - query: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - driver_name.into(), - data_source_name.into(), - query.into(), - scope, - ) - } - - fn build_impl( - &self, - driver_name: crate::Output, - data_source_name: crate::Output, - query: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, driver_name: O0, data_source_name: O1, query: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(driver_name.into(), data_source_name.into(), query.into(), scope) + } + fn build_impl(&self, driver_name: crate::Output, data_source_name: crate::Output, query: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalSqlDataset", |nd| { nd.add_input(driver_name); nd.add_input(data_source_name); @@ -36427,30 +44078,58 @@ impl ExperimentalSqlDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalSqlDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, driver_name: O0, data_source_name: O1, query: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(driver_name.into(), data_source_name.into(), query.into(), scope) + } + fn build_instance_impl(&self, driver_name: crate::Output, data_source_name: crate::Output, query: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalSqlDataset", |nd| { + nd.add_input(driver_name); + nd.add_input(data_source_name); + nd.add_input(query); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalSqlDatasetInst{op}) + } +} +impl ExperimentalSqlDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalSqlDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalSqlDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalSqlDataset::new().build(driver_name, data_source_name, query, scope)`. -pub fn experimental_sql_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - driver_name: O0, - data_source_name: O1, - query: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_sql_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(driver_name: O0, data_source_name: O1, query: O2, scope: &mut crate::Scope) -> crate::Result { ExperimentalSqlDataset::new().build(driver_name, data_source_name, query, scope) } + /// Builder for the `ExperimentalStatsAggregatorHandle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalStatsAggregatorHandle { @@ -36458,6 +44137,12 @@ pub struct ExperimentalStatsAggregatorHandle { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalStatsAggregatorHandle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalStatsAggregatorHandleInst { + /// An instance of a fully built ExperimentalStatsAggregatorHandle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalStatsAggregatorHandle { /// Creates a new `ExperimentalStatsAggregatorHandle`. @@ -36466,19 +44151,13 @@ impl ExperimentalStatsAggregatorHandle { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -36490,37 +44169,74 @@ impl ExperimentalStatsAggregatorHandle { } /// Builds the `ExperimentalStatsAggregatorHandle` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalStatsAggregatorHandle", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalStatsAggregatorHandle` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalStatsAggregatorHandle", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalStatsAggregatorHandleInst{op}) + } +} +impl ExperimentalStatsAggregatorHandleInst { + /// Returns the 'handle' output of this 'ExperimentalStatsAggregatorHandle' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalStatsAggregatorHandleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalStatsAggregatorHandle::new().build(scope)`. -pub fn experimental_stats_aggregator_handle( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_stats_aggregator_handle<>(scope: &mut crate::Scope) -> crate::Result { ExperimentalStatsAggregatorHandle::new().build(scope) } + /// Builder for the `ExperimentalStatsAggregatorSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalStatsAggregatorSummary { control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalStatsAggregatorSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalStatsAggregatorSummaryInst { + /// An instance of a fully built ExperimentalStatsAggregatorSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalStatsAggregatorSummary { /// Creates a new `ExperimentalStatsAggregatorSummary`. @@ -36535,19 +44251,10 @@ impl ExperimentalStatsAggregatorSummary { } /// Builds the `ExperimentalStatsAggregatorSummary` operation. - pub fn build>( - &self, - iterator: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, iterator: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(iterator.into(), scope) } - - fn build_impl( - &self, - iterator: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalStatsAggregatorSummary", |nd| { nd.add_input(iterator); for op in &self.control_inputs { @@ -36556,15 +44263,41 @@ impl ExperimentalStatsAggregatorSummary { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalStatsAggregatorSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, iterator: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(iterator.into(), scope) + } + fn build_instance_impl(&self, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalStatsAggregatorSummary", |nd| { + nd.add_input(iterator); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalStatsAggregatorSummaryInst{op}) + } +} +impl ExperimentalStatsAggregatorSummaryInst { + /// Returns the 'summary' output of this 'ExperimentalStatsAggregatorSummary' operation. + pub fn summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalStatsAggregatorSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalStatsAggregatorSummary::new().build(iterator, scope)`. -pub fn experimental_stats_aggregator_summary>( - iterator: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_stats_aggregator_summary>(iterator: O0, scope: &mut crate::Scope) -> crate::Result { ExperimentalStatsAggregatorSummary::new().build(iterator, scope) } + /// Builder for the `ExperimentalTakeWhileDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalTakeWhileDataset { @@ -36574,6 +44307,12 @@ pub struct ExperimentalTakeWhileDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalTakeWhileDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalTakeWhileDatasetInst { + /// An instance of a fully built ExperimentalTakeWhileDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalTakeWhileDataset { /// Creates a new `ExperimentalTakeWhileDataset`. @@ -36582,37 +44321,25 @@ impl ExperimentalTakeWhileDataset { } /// Sets the `predicate` attribute. - pub fn predicate>( - mut self, - value: ArgType, - ) -> Self { + pub fn predicate>(mut self, value: ArgType) -> Self { self.predicate = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -36624,58 +44351,79 @@ impl ExperimentalTakeWhileDataset { } /// Builds the `ExperimentalTakeWhileDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), other_arguments.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalTakeWhileDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.predicate { - nd.set_attr_string("predicate", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.predicate { + nd.set_attr_string("predicate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalTakeWhileDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalTakeWhileDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.predicate { + nd.set_attr_string("predicate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalTakeWhileDatasetInst{op}) + } +} +impl ExperimentalTakeWhileDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalTakeWhileDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalTakeWhileDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalTakeWhileDataset::new().build(input_dataset, other_arguments, scope)`. -pub fn experimental_take_while_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_take_while_dataset, O1: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { ExperimentalTakeWhileDataset::new().build(input_dataset, other_arguments, scope) } + /// Builder for the `ExperimentalThreadPoolDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalThreadPoolDataset { @@ -36683,6 +44431,12 @@ pub struct ExperimentalThreadPoolDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalThreadPoolDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalThreadPoolDatasetInst { + /// An instance of a fully built ExperimentalThreadPoolDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalThreadPoolDataset { /// Creates a new `ExperimentalThreadPoolDataset`. @@ -36691,19 +44445,13 @@ impl ExperimentalThreadPoolDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -36715,52 +44463,67 @@ impl ExperimentalThreadPoolDataset { } /// Builds the `ExperimentalThreadPoolDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - thread_pool: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, thread_pool: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), thread_pool.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - thread_pool: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, thread_pool: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalThreadPoolDataset", |nd| { nd.add_input(input_dataset); nd.add_input(thread_pool); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalThreadPoolDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, thread_pool: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), thread_pool.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, thread_pool: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalThreadPoolDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(thread_pool); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalThreadPoolDatasetInst{op}) + } +} +impl ExperimentalThreadPoolDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalThreadPoolDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalThreadPoolDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalThreadPoolDataset::new().build(input_dataset, thread_pool, scope)`. -pub fn experimental_thread_pool_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - thread_pool: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_thread_pool_dataset, O1: ::std::convert::Into>(input_dataset: O0, thread_pool: O1, scope: &mut crate::Scope) -> crate::Result { ExperimentalThreadPoolDataset::new().build(input_dataset, thread_pool, scope) } + /// Builder for the `ExperimentalThreadPoolHandle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalThreadPoolHandle { @@ -36771,6 +44534,12 @@ pub struct ExperimentalThreadPoolHandle { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalThreadPoolHandle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalThreadPoolHandleInst { + /// An instance of a fully built ExperimentalThreadPoolHandle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalThreadPoolHandle { /// Creates a new `ExperimentalThreadPoolHandle`. @@ -36785,37 +44554,25 @@ impl ExperimentalThreadPoolHandle { } /// Sets the `max_intra_op_parallelism` attribute. - pub fn max_intra_op_parallelism>( - mut self, - value: ArgType, - ) -> Self { + pub fn max_intra_op_parallelism>(mut self, value: ArgType) -> Self { self.max_intra_op_parallelism = ::std::option::Option::Some(value.into()); self } /// Sets the `display_name` attribute. - pub fn display_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn display_name>(mut self, value: ArgType) -> Self { self.display_name = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -36827,41 +44584,81 @@ impl ExperimentalThreadPoolHandle { } /// Builds the `ExperimentalThreadPoolHandle` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalThreadPoolHandle", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_threads { - nd.set_attr_int("num_threads", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_intra_op_parallelism { - nd.set_attr_int("max_intra_op_parallelism", *value)?; - } - if let ::std::option::Option::Some(value) = &self.display_name { - nd.set_attr_string("display_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.num_threads { + nd.set_attr_int("num_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_intra_op_parallelism { + nd.set_attr_int("max_intra_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.display_name { + nd.set_attr_string("display_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalThreadPoolHandle` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalThreadPoolHandle", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_threads { + nd.set_attr_int("num_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_intra_op_parallelism { + nd.set_attr_int("max_intra_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.display_name { + nd.set_attr_string("display_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalThreadPoolHandleInst{op}) + } +} +impl ExperimentalThreadPoolHandleInst { + /// Returns the 'handle' output of this 'ExperimentalThreadPoolHandle' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalThreadPoolHandleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalThreadPoolHandle::new().build(scope)`. -pub fn experimental_thread_pool_handle( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_thread_pool_handle<>(scope: &mut crate::Scope) -> crate::Result { ExperimentalThreadPoolHandle::new().build(scope) } + /// Builder for the `ExperimentalUnbatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalUnbatchDataset { @@ -36869,6 +44666,12 @@ pub struct ExperimentalUnbatchDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalUnbatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalUnbatchDatasetInst { + /// An instance of a fully built ExperimentalUnbatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalUnbatchDataset { /// Creates a new `ExperimentalUnbatchDataset`. @@ -36877,19 +44680,13 @@ impl ExperimentalUnbatchDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -36901,42 +44698,65 @@ impl ExperimentalUnbatchDataset { } /// Builds the `ExperimentalUnbatchDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalUnbatchDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalUnbatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalUnbatchDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalUnbatchDatasetInst{op}) + } +} +impl ExperimentalUnbatchDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalUnbatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalUnbatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalUnbatchDataset::new().build(input_dataset, scope)`. -pub fn experimental_unbatch_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_unbatch_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { ExperimentalUnbatchDataset::new().build(input_dataset, scope) } + /// Builder for the `ExperimentalUniqueDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExperimentalUniqueDataset { @@ -36944,6 +44764,12 @@ pub struct ExperimentalUniqueDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExperimentalUniqueDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExperimentalUniqueDatasetInst { + /// An instance of a fully built ExperimentalUniqueDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExperimentalUniqueDataset { /// Creates a new `ExperimentalUniqueDataset`. @@ -36952,19 +44778,13 @@ impl ExperimentalUniqueDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -36976,48 +44796,77 @@ impl ExperimentalUniqueDataset { } /// Builds the `ExperimentalUniqueDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExperimentalUniqueDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExperimentalUniqueDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExperimentalUniqueDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExperimentalUniqueDatasetInst{op}) + } +} +impl ExperimentalUniqueDatasetInst { + /// Returns the 'handle' output of this 'ExperimentalUniqueDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExperimentalUniqueDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExperimentalUniqueDataset::new().build(input_dataset, scope)`. -pub fn experimental_unique_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn experimental_unique_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { ExperimentalUniqueDataset::new().build(input_dataset, scope) } + /// Builder for the `Expint` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Expint { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Expint' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExpintInst { + /// An instance of a fully built Expint Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Expint { /// Creates a new `Expint`. @@ -37038,45 +44887,71 @@ impl Expint { } /// Builds the `Expint` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Expint", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Expint` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Expint", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExpintInst{op}) + } +} +impl ExpintInst { + /// Returns the 'y' output of this 'Expint' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExpintInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Expint::new().build(x, scope)`. -pub fn expint>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn expint>(x: O0, scope: &mut crate::Scope) -> crate::Result { Expint::new().build(x, scope) } + /// Builder for the `Expm1` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Expm1 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Expm1' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Expm1Inst { + /// An instance of a fully built Expm1 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Expm1 { /// Creates a new `Expm1`. @@ -37097,39 +44972,59 @@ impl Expm1 { } /// Builds the `Expm1` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Expm1", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Expm1` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Expm1", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Expm1Inst{op}) + } +} +impl Expm1Inst { + /// Returns the 'y' output of this 'Expm1' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Expm1Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Expm1::new().build(x, scope)`. -pub fn expm1>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn expm1>(x: O0, scope: &mut crate::Scope) -> crate::Result { Expm1::new().build(x, scope) } + /// Builder for the `ExtractGlimpse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExtractGlimpse { @@ -37139,6 +45034,12 @@ pub struct ExtractGlimpse { noise: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExtractGlimpse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExtractGlimpseInst { + /// An instance of a fully built ExtractGlimpse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExtractGlimpse { /// Creates a new `ExtractGlimpse`. @@ -37165,10 +45066,7 @@ impl ExtractGlimpse { } /// Sets the `noise` attribute. - pub fn noise>( - mut self, - value: ArgType, - ) -> Self { + pub fn noise>(mut self, value: ArgType) -> Self { self.noise = ::std::option::Option::Some(value.into()); self } @@ -37180,27 +45078,10 @@ impl ExtractGlimpse { } /// Builds the `ExtractGlimpse` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - size: O1, - offsets: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, size: O1, offsets: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), size.into(), offsets.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - size: crate::Output, - offsets: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, size: crate::Output, offsets: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExtractGlimpse", |nd| { nd.add_input(input); nd.add_input(size); @@ -37208,36 +45089,70 @@ impl ExtractGlimpse { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.centered { - nd.set_attr_bool("centered", *value)?; - } - if let ::std::option::Option::Some(value) = &self.normalized { - nd.set_attr_bool("normalized", *value)?; - } - if let ::std::option::Option::Some(value) = &self.uniform_noise { - nd.set_attr_bool("uniform_noise", *value)?; - } - if let ::std::option::Option::Some(value) = &self.noise { - nd.set_attr_string("noise", value)?; - } + if let ::std::option::Option::Some(value) = &self.centered { + nd.set_attr_bool("centered", *value)?; + } + if let ::std::option::Option::Some(value) = &self.normalized { + nd.set_attr_bool("normalized", *value)?; + } + if let ::std::option::Option::Some(value) = &self.uniform_noise { + nd.set_attr_bool("uniform_noise", *value)?; + } + if let ::std::option::Option::Some(value) = &self.noise { + nd.set_attr_string("noise", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExtractGlimpse` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, size: O1, offsets: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), size.into(), offsets.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, size: crate::Output, offsets: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExtractGlimpse", |nd| { + nd.add_input(input); + nd.add_input(size); + nd.add_input(offsets); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.centered { + nd.set_attr_bool("centered", *value)?; + } + if let ::std::option::Option::Some(value) = &self.normalized { + nd.set_attr_bool("normalized", *value)?; + } + if let ::std::option::Option::Some(value) = &self.uniform_noise { + nd.set_attr_bool("uniform_noise", *value)?; + } + if let ::std::option::Option::Some(value) = &self.noise { + nd.set_attr_string("noise", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExtractGlimpseInst{op}) + } +} +impl ExtractGlimpseInst { + /// Returns the 'glimpse' output of this 'ExtractGlimpse' operation. + pub fn glimpse(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExtractGlimpseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExtractGlimpse::new().build(input, size, offsets, scope)`. -pub fn extract_glimpse< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - size: O1, - offsets: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn extract_glimpse, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, size: O1, offsets: O2, scope: &mut crate::Scope) -> crate::Result { ExtractGlimpse::new().build(input, size, offsets, scope) } + /// Builder for the `ExtractGlimpseV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExtractGlimpseV2 { @@ -37247,6 +45162,12 @@ pub struct ExtractGlimpseV2 { noise: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExtractGlimpseV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExtractGlimpseV2Inst { + /// An instance of a fully built ExtractGlimpseV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExtractGlimpseV2 { /// Creates a new `ExtractGlimpseV2`. @@ -37273,10 +45194,7 @@ impl ExtractGlimpseV2 { } /// Sets the `noise` attribute. - pub fn noise>( - mut self, - value: ArgType, - ) -> Self { + pub fn noise>(mut self, value: ArgType) -> Self { self.noise = ::std::option::Option::Some(value.into()); self } @@ -37288,27 +45206,10 @@ impl ExtractGlimpseV2 { } /// Builds the `ExtractGlimpseV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - size: O1, - offsets: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, size: O1, offsets: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), size.into(), offsets.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - size: crate::Output, - offsets: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, size: crate::Output, offsets: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExtractGlimpseV2", |nd| { nd.add_input(input); nd.add_input(size); @@ -37316,36 +45217,70 @@ impl ExtractGlimpseV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.centered { - nd.set_attr_bool("centered", *value)?; - } - if let ::std::option::Option::Some(value) = &self.normalized { - nd.set_attr_bool("normalized", *value)?; - } - if let ::std::option::Option::Some(value) = &self.uniform_noise { - nd.set_attr_bool("uniform_noise", *value)?; - } - if let ::std::option::Option::Some(value) = &self.noise { - nd.set_attr_string("noise", value)?; - } + if let ::std::option::Option::Some(value) = &self.centered { + nd.set_attr_bool("centered", *value)?; + } + if let ::std::option::Option::Some(value) = &self.normalized { + nd.set_attr_bool("normalized", *value)?; + } + if let ::std::option::Option::Some(value) = &self.uniform_noise { + nd.set_attr_bool("uniform_noise", *value)?; + } + if let ::std::option::Option::Some(value) = &self.noise { + nd.set_attr_string("noise", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExtractGlimpseV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, size: O1, offsets: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), size.into(), offsets.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, size: crate::Output, offsets: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExtractGlimpseV2", |nd| { + nd.add_input(input); + nd.add_input(size); + nd.add_input(offsets); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.centered { + nd.set_attr_bool("centered", *value)?; + } + if let ::std::option::Option::Some(value) = &self.normalized { + nd.set_attr_bool("normalized", *value)?; + } + if let ::std::option::Option::Some(value) = &self.uniform_noise { + nd.set_attr_bool("uniform_noise", *value)?; + } + if let ::std::option::Option::Some(value) = &self.noise { + nd.set_attr_string("noise", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExtractGlimpseV2Inst{op}) + } +} +impl ExtractGlimpseV2Inst { + /// Returns the 'glimpse' output of this 'ExtractGlimpseV2' operation. + pub fn glimpse(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExtractGlimpseV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExtractGlimpseV2::new().build(input, size, offsets, scope)`. -pub fn extract_glimpse_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - size: O1, - offsets: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn extract_glimpse_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, size: O1, offsets: O2, scope: &mut crate::Scope) -> crate::Result { ExtractGlimpseV2::new().build(input, size, offsets, scope) } + /// Builder for the `ExtractImagePatches` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExtractImagePatches { @@ -37356,6 +45291,12 @@ pub struct ExtractImagePatches { padding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExtractImagePatches' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExtractImagePatchesInst { + /// An instance of a fully built ExtractImagePatches Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExtractImagePatches { /// Creates a new `ExtractImagePatches`. @@ -37364,28 +45305,19 @@ impl ExtractImagePatches { } /// Sets the `ksizes` attribute. - pub fn ksizes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksizes>>(mut self, value: ArgType) -> Self { self.ksizes = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `rates` attribute. - pub fn rates>>( - mut self, - value: ArgType, - ) -> Self { + pub fn rates>>(mut self, value: ArgType) -> Self { self.rates = ::std::option::Option::Some(value.into()); self } @@ -37397,10 +45329,7 @@ impl ExtractImagePatches { } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } @@ -37412,57 +45341,95 @@ impl ExtractImagePatches { } /// Builds the `ExtractImagePatches` operation. - pub fn build>( - &self, - images: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, images: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExtractImagePatches", |nd| { nd.add_input(images); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksizes { - nd.set_attr_int_list("ksizes", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.rates { - nd.set_attr_int_list("rates", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } + if let ::std::option::Option::Some(value) = &self.ksizes { + nd.set_attr_int_list("ksizes", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.rates { + nd.set_attr_int_list("rates", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExtractImagePatches` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, images: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExtractImagePatches", |nd| { + nd.add_input(images); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksizes { + nd.set_attr_int_list("ksizes", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.rates { + nd.set_attr_int_list("rates", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExtractImagePatchesInst{op}) + } +} +impl ExtractImagePatchesInst { + /// Returns the 'patches' output of this 'ExtractImagePatches' operation. + pub fn patches(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExtractImagePatchesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExtractImagePatches::new().build(images, scope)`. -pub fn extract_image_patches>( - images: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn extract_image_patches>(images: O0, scope: &mut crate::Scope) -> crate::Result { ExtractImagePatches::new().build(images, scope) } + /// Builder for the `ExtractJpegShape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExtractJpegShape { output_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExtractJpegShape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExtractJpegShapeInst { + /// An instance of a fully built ExtractJpegShape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExtractJpegShape { /// Creates a new `ExtractJpegShape`. @@ -37471,10 +45438,7 @@ impl ExtractJpegShape { } /// Sets the `output_type` attribute. - pub fn output_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_type>(mut self, value: ArgType) -> Self { self.output_type = ::std::option::Option::Some(value.into()); self } @@ -37486,39 +45450,59 @@ impl ExtractJpegShape { } /// Builds the `ExtractJpegShape` operation. - pub fn build>( - &self, - contents: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(contents.into(), scope) } - - fn build_impl( - &self, - contents: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExtractJpegShape", |nd| { nd.add_input(contents); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_type { - nd.set_attr_type("output_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExtractJpegShape` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, contents: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(contents.into(), scope) + } + fn build_instance_impl(&self, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExtractJpegShape", |nd| { + nd.add_input(contents); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExtractJpegShapeInst{op}) + } +} +impl ExtractJpegShapeInst { + /// Returns the 'image_shape' output of this 'ExtractJpegShape' operation. + pub fn image_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExtractJpegShapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExtractJpegShape::new().build(contents, scope)`. -pub fn extract_jpeg_shape>( - contents: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn extract_jpeg_shape>(contents: O0, scope: &mut crate::Scope) -> crate::Result { ExtractJpegShape::new().build(contents, scope) } + /// Builder for the `ExtractVolumePatches` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ExtractVolumePatches { @@ -37528,6 +45512,12 @@ pub struct ExtractVolumePatches { padding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ExtractVolumePatches' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ExtractVolumePatchesInst { + /// An instance of a fully built ExtractVolumePatches Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ExtractVolumePatches { /// Creates a new `ExtractVolumePatches`. @@ -37536,19 +45526,13 @@ impl ExtractVolumePatches { } /// Sets the `ksizes` attribute. - pub fn ksizes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksizes>>(mut self, value: ArgType) -> Self { self.ksizes = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } @@ -37560,10 +45544,7 @@ impl ExtractVolumePatches { } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } @@ -37575,54 +45556,89 @@ impl ExtractVolumePatches { } /// Builds the `ExtractVolumePatches` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ExtractVolumePatches", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksizes { - nd.set_attr_int_list("ksizes", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } + if let ::std::option::Option::Some(value) = &self.ksizes { + nd.set_attr_int_list("ksizes", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ExtractVolumePatches` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ExtractVolumePatches", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksizes { + nd.set_attr_int_list("ksizes", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ExtractVolumePatchesInst{op}) + } +} +impl ExtractVolumePatchesInst { + /// Returns the 'patches' output of this 'ExtractVolumePatches' operation. + pub fn patches(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ExtractVolumePatchesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ExtractVolumePatches::new().build(input, scope)`. -pub fn extract_volume_patches>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn extract_volume_patches>(input: O0, scope: &mut crate::Scope) -> crate::Result { ExtractVolumePatches::new().build(input, scope) } + /// Builder for the `FFT` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FFT { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FFT' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FFTInst { + /// An instance of a fully built FFT Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FFT { /// Creates a new `FFT`. @@ -37631,10 +45647,7 @@ impl FFT { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -37646,45 +45659,71 @@ impl FFT { } /// Builds the `FFT` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FFT", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FFT` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FFT", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FFTInst{op}) + } +} +impl FFTInst { + /// Returns the 'output' output of this 'FFT' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FFTInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FFT::new().build(input, scope)`. -pub fn fft>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fft>(input: O0, scope: &mut crate::Scope) -> crate::Result { FFT::new().build(input, scope) } + /// Builder for the `FFT2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FFT2D { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FFT2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FFT2DInst { + /// An instance of a fully built FFT2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FFT2D { /// Creates a new `FFT2D`. @@ -37693,10 +45732,7 @@ impl FFT2D { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -37708,45 +45744,71 @@ impl FFT2D { } /// Builds the `FFT2D` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FFT2D", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FFT2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FFT2D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FFT2DInst{op}) + } +} +impl FFT2DInst { + /// Returns the 'output' output of this 'FFT2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FFT2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FFT2D::new().build(input, scope)`. -pub fn fft2_d>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fft2_d>(input: O0, scope: &mut crate::Scope) -> crate::Result { FFT2D::new().build(input, scope) } + /// Builder for the `FFT3D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FFT3D { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FFT3D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FFT3DInst { + /// An instance of a fully built FFT3D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FFT3D { /// Creates a new `FFT3D`. @@ -37755,10 +45817,7 @@ impl FFT3D { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -37770,39 +45829,59 @@ impl FFT3D { } /// Builds the `FFT3D` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FFT3D", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FFT3D` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FFT3D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FFT3DInst{op}) + } +} +impl FFT3DInst { + /// Returns the 'output' output of this 'FFT3D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FFT3DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FFT3D::new().build(input, scope)`. -pub fn fft3_d>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fft3_d>(input: O0, scope: &mut crate::Scope) -> crate::Result { FFT3D::new().build(input, scope) } + /// Builder for the `FIFOQueue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FIFOQueue { @@ -37813,6 +45892,12 @@ pub struct FIFOQueue { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FIFOQueue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FIFOQueueInst { + /// An instance of a fully built FIFOQueue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FIFOQueue { /// Creates a new `FIFOQueue`. @@ -37821,19 +45906,13 @@ impl FIFOQueue { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -37845,19 +45924,13 @@ impl FIFOQueue { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -37869,39 +45942,81 @@ impl FIFOQueue { } /// Builds the `FIFOQueue` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FIFOQueue", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FIFOQueue` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FIFOQueue", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FIFOQueueInst{op}) + } +} +impl FIFOQueueInst { + /// Returns the 'handle' output of this 'FIFOQueue' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FIFOQueueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FIFOQueue::new().build(scope)`. -pub fn fifoqueue(scope: &mut crate::Scope) -> crate::Result { +pub fn fifoqueue<>(scope: &mut crate::Scope) -> crate::Result { FIFOQueue::new().build(scope) } + /// Builder for the `FIFOQueueV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FIFOQueueV2 { @@ -37912,6 +46027,12 @@ pub struct FIFOQueueV2 { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FIFOQueueV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FIFOQueueV2Inst { + /// An instance of a fully built FIFOQueueV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FIFOQueueV2 { /// Creates a new `FIFOQueueV2`. @@ -37920,19 +46041,13 @@ impl FIFOQueueV2 { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -37944,19 +46059,13 @@ impl FIFOQueueV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -37968,44 +46077,92 @@ impl FIFOQueueV2 { } /// Builds the `FIFOQueueV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FIFOQueueV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FIFOQueueV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FIFOQueueV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FIFOQueueV2Inst{op}) + } +} +impl FIFOQueueV2Inst { + /// Returns the 'handle' output of this 'FIFOQueueV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FIFOQueueV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FIFOQueueV2::new().build(scope)`. -pub fn fifoqueue_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn fifoqueue_v2<>(scope: &mut crate::Scope) -> crate::Result { FIFOQueueV2::new().build(scope) } + /// Builder for the `Fact` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Fact { control_inputs: ::std::vec::Vec, } +/// An instance of 'Fact' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FactInst { + /// An instance of a fully built Fact Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Fact { /// Creates a new `Fact`. @@ -38020,10 +46177,9 @@ impl Fact { } /// Builds the `Fact` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Fact", |nd| { for op in &self.control_inputs { @@ -38032,12 +46188,40 @@ impl Fact { ::std::result::Result::Ok(()) }) } -} + /// Builds the `Fact` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Fact", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(FactInst{op}) + } +} +impl FactInst { + /// Returns the 'fact' output of this 'Fact' operation. + pub fn fact(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FactInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Fact::new().build(scope)`. -pub fn fact(scope: &mut crate::Scope) -> crate::Result { +pub fn fact<>(scope: &mut crate::Scope) -> crate::Result { Fact::new().build(scope) } + /// Builder for the `FakeParam` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FakeParam { @@ -38045,6 +46229,12 @@ pub struct FakeParam { shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FakeParam' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FakeParamInst { + /// An instance of a fully built FakeParam Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FakeParam { /// Creates a new `FakeParam`. @@ -38071,30 +46261,63 @@ impl FakeParam { } /// Builds the `FakeParam` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FakeParam", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FakeParam` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FakeParam", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FakeParamInst{op}) + } +} +impl FakeParamInst { + /// Returns the 'output' output of this 'FakeParam' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FakeParamInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FakeParam::new().build(scope)`. -pub fn fake_param(scope: &mut crate::Scope) -> crate::Result { +pub fn fake_param<>(scope: &mut crate::Scope) -> crate::Result { FakeParam::new().build(scope) } + /// Builder for the `FakeQuantWithMinMaxArgs` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FakeQuantWithMinMaxArgs { @@ -38104,6 +46327,12 @@ pub struct FakeQuantWithMinMaxArgs { narrow_range: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FakeQuantWithMinMaxArgs' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FakeQuantWithMinMaxArgsInst { + /// An instance of a fully built FakeQuantWithMinMaxArgs Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FakeQuantWithMinMaxArgs { /// Creates a new `FakeQuantWithMinMaxArgs`. @@ -38142,48 +46371,77 @@ impl FakeQuantWithMinMaxArgs { } /// Builds the `FakeQuantWithMinMaxArgs` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FakeQuantWithMinMaxArgs", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.min { - nd.set_attr_float("min", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max { - nd.set_attr_float("max", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_bits { - nd.set_attr_int("num_bits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } + if let ::std::option::Option::Some(value) = &self.min { + nd.set_attr_float("min", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max { + nd.set_attr_float("max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FakeQuantWithMinMaxArgs` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FakeQuantWithMinMaxArgs", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.min { + nd.set_attr_float("min", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max { + nd.set_attr_float("max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FakeQuantWithMinMaxArgsInst{op}) + } +} +impl FakeQuantWithMinMaxArgsInst { + /// Returns the 'outputs' output of this 'FakeQuantWithMinMaxArgs' operation. + pub fn outputs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FakeQuantWithMinMaxArgsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FakeQuantWithMinMaxArgs::new().build(inputs, scope)`. -pub fn fake_quant_with_min_max_args>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fake_quant_with_min_max_args>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { FakeQuantWithMinMaxArgs::new().build(inputs, scope) } + /// Builder for the `FakeQuantWithMinMaxArgsGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FakeQuantWithMinMaxArgsGradient { @@ -38193,6 +46451,12 @@ pub struct FakeQuantWithMinMaxArgsGradient { narrow_range: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FakeQuantWithMinMaxArgsGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FakeQuantWithMinMaxArgsGradientInst { + /// An instance of a fully built FakeQuantWithMinMaxArgsGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FakeQuantWithMinMaxArgsGradient { /// Creates a new `FakeQuantWithMinMaxArgsGradient`. @@ -38231,58 +46495,79 @@ impl FakeQuantWithMinMaxArgsGradient { } /// Builds the `FakeQuantWithMinMaxArgsGradient` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - gradients: O0, - inputs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, gradients: O0, inputs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(gradients.into(), inputs.into(), scope) } - - fn build_impl( - &self, - gradients: crate::Output, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, gradients: crate::Output, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FakeQuantWithMinMaxArgsGradient", |nd| { nd.add_input(gradients); nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.min { - nd.set_attr_float("min", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max { - nd.set_attr_float("max", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_bits { - nd.set_attr_int("num_bits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } + if let ::std::option::Option::Some(value) = &self.min { + nd.set_attr_float("min", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max { + nd.set_attr_float("max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FakeQuantWithMinMaxArgsGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, gradients: O0, inputs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), inputs.into(), scope) + } + fn build_instance_impl(&self, gradients: crate::Output, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FakeQuantWithMinMaxArgsGradient", |nd| { + nd.add_input(gradients); + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.min { + nd.set_attr_float("min", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max { + nd.set_attr_float("max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FakeQuantWithMinMaxArgsGradientInst{op}) + } +} +impl FakeQuantWithMinMaxArgsGradientInst { + /// Returns the 'backprops' output of this 'FakeQuantWithMinMaxArgsGradient' operation. + pub fn backprops(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FakeQuantWithMinMaxArgsGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FakeQuantWithMinMaxArgsGradient::new().build(gradients, inputs, scope)`. -pub fn fake_quant_with_min_max_args_gradient< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - gradients: O0, - inputs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fake_quant_with_min_max_args_gradient, O1: ::std::convert::Into>(gradients: O0, inputs: O1, scope: &mut crate::Scope) -> crate::Result { FakeQuantWithMinMaxArgsGradient::new().build(gradients, inputs, scope) } + /// Builder for the `FakeQuantWithMinMaxVars` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FakeQuantWithMinMaxVars { @@ -38290,6 +46575,12 @@ pub struct FakeQuantWithMinMaxVars { narrow_range: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FakeQuantWithMinMaxVars' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FakeQuantWithMinMaxVarsInst { + /// An instance of a fully built FakeQuantWithMinMaxVars Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FakeQuantWithMinMaxVars { /// Creates a new `FakeQuantWithMinMaxVars`. @@ -38316,27 +46607,10 @@ impl FakeQuantWithMinMaxVars { } /// Builds the `FakeQuantWithMinMaxVars` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - inputs: O0, - min: O1, - max: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, inputs: O0, min: O1, max: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), min.into(), max.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - min: crate::Output, - max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, min: crate::Output, max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FakeQuantWithMinMaxVars", |nd| { nd.add_input(inputs); nd.add_input(min); @@ -38344,30 +46618,58 @@ impl FakeQuantWithMinMaxVars { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_bits { - nd.set_attr_int("num_bits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FakeQuantWithMinMaxVars` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, inputs: O0, min: O1, max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), min.into(), max.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, min: crate::Output, max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FakeQuantWithMinMaxVars", |nd| { + nd.add_input(inputs); + nd.add_input(min); + nd.add_input(max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FakeQuantWithMinMaxVarsInst{op}) + } +} +impl FakeQuantWithMinMaxVarsInst { + /// Returns the 'outputs' output of this 'FakeQuantWithMinMaxVars' operation. + pub fn outputs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FakeQuantWithMinMaxVarsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FakeQuantWithMinMaxVars::new().build(inputs, min, max, scope)`. -pub fn fake_quant_with_min_max_vars< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - inputs: O0, - min: O1, - max: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fake_quant_with_min_max_vars, O1: ::std::convert::Into, O2: ::std::convert::Into>(inputs: O0, min: O1, max: O2, scope: &mut crate::Scope) -> crate::Result { FakeQuantWithMinMaxVars::new().build(inputs, min, max, scope) } + /// Builder for the `FakeQuantWithMinMaxVarsGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FakeQuantWithMinMaxVarsGradient { @@ -38375,6 +46677,12 @@ pub struct FakeQuantWithMinMaxVarsGradient { narrow_range: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FakeQuantWithMinMaxVarsGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FakeQuantWithMinMaxVarsGradientInst { + /// An instance of a fully built FakeQuantWithMinMaxVarsGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FakeQuantWithMinMaxVarsGradient { /// Creates a new `FakeQuantWithMinMaxVarsGradient`. @@ -38401,36 +46709,10 @@ impl FakeQuantWithMinMaxVarsGradient { } /// Builds the `FakeQuantWithMinMaxVarsGradient` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - gradients: O0, - inputs: O1, - min: O2, - max: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - gradients.into(), - inputs.into(), - min.into(), - max.into(), - scope, - ) - } - - fn build_impl( - &self, - gradients: crate::Output, - inputs: crate::Output, - min: crate::Output, - max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, gradients: O0, inputs: O1, min: O2, max: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(gradients.into(), inputs.into(), min.into(), max.into(), scope) + } + fn build_impl(&self, gradients: crate::Output, inputs: crate::Output, min: crate::Output, max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FakeQuantWithMinMaxVarsGradient", |nd| { nd.add_input(gradients); nd.add_input(inputs); @@ -38439,127 +46721,191 @@ impl FakeQuantWithMinMaxVarsGradient { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_bits { - nd.set_attr_int("num_bits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } ::std::result::Result::Ok(()) }) } -} - -/// Shorthand for `FakeQuantWithMinMaxVarsGradient::new().build(gradients, inputs, min, max, scope)`. -pub fn fake_quant_with_min_max_vars_gradient< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - gradients: O0, - inputs: O1, - min: O2, - max: O3, - scope: &mut crate::Scope, -) -> crate::Result { - FakeQuantWithMinMaxVarsGradient::new().build(gradients, inputs, min, max, scope) -} -/// Builder for the `FakeQuantWithMinMaxVarsPerChannel` operation. -#[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct FakeQuantWithMinMaxVarsPerChannel { - num_bits: ::std::option::Option, - narrow_range: ::std::option::Option, - control_inputs: ::std::vec::Vec, -} - -impl FakeQuantWithMinMaxVarsPerChannel { - /// Creates a new `FakeQuantWithMinMaxVarsPerChannel`. - pub fn new() -> Self { - Self::default() - } - - /// Sets the `num_bits` attribute. - pub fn num_bits>(mut self, value: ArgType) -> Self { - self.num_bits = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `narrow_range` attribute. - pub fn narrow_range>(mut self, value: ArgType) -> Self { - self.narrow_range = ::std::option::Option::Some(value.into()); - self - } - - /// Adds a control input. - pub fn add_control_input(mut self, op: crate::Operation) -> Self { - self.control_inputs.push(op); - self - } - /// Builds the `FakeQuantWithMinMaxVarsPerChannel` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - inputs: O0, - min: O1, - max: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl(inputs.into(), min.into(), max.into(), scope) + /// Builds the `FakeQuantWithMinMaxVarsGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, gradients: O0, inputs: O1, min: O2, max: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), inputs.into(), min.into(), max.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - min: crate::Output, - max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("FakeQuantWithMinMaxVarsPerChannel", |nd| { + fn build_instance_impl(&self, gradients: crate::Output, inputs: crate::Output, min: crate::Output, max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FakeQuantWithMinMaxVarsGradient", |nd| { + nd.add_input(gradients); nd.add_input(inputs); nd.add_input(min); nd.add_input(max); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_bits { - nd.set_attr_int("num_bits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } ::std::result::Result::Ok(()) - }) + })?; + Ok(FakeQuantWithMinMaxVarsGradientInst{op}) } } - -/// Shorthand for `FakeQuantWithMinMaxVarsPerChannel::new().build(inputs, min, max, scope)`. -pub fn fake_quant_with_min_max_vars_per_channel< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - inputs: O0, - min: O1, - max: O2, - scope: &mut crate::Scope, -) -> crate::Result { - FakeQuantWithMinMaxVarsPerChannel::new().build(inputs, min, max, scope) +impl FakeQuantWithMinMaxVarsGradientInst { + /// Returns the 'backprops_wrt_input' output of this 'FakeQuantWithMinMaxVarsGradient' operation. + pub fn backprops_wrt_input(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'backprop_wrt_min' output of this 'FakeQuantWithMinMaxVarsGradient' operation. + pub fn backprop_wrt_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'backprop_wrt_max' output of this 'FakeQuantWithMinMaxVarsGradient' operation. + pub fn backprop_wrt_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } } -/// Builder for the `FakeQuantWithMinMaxVarsPerChannelGradient` operation. +impl Into for FakeQuantWithMinMaxVarsGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `FakeQuantWithMinMaxVarsGradient::new().build(gradients, inputs, min, max, scope)`. +pub fn fake_quant_with_min_max_vars_gradient, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(gradients: O0, inputs: O1, min: O2, max: O3, scope: &mut crate::Scope) -> crate::Result { + FakeQuantWithMinMaxVarsGradient::new().build(gradients, inputs, min, max, scope) +} + +/// Builder for the `FakeQuantWithMinMaxVarsPerChannel` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct FakeQuantWithMinMaxVarsPerChannelGradient { +pub struct FakeQuantWithMinMaxVarsPerChannel { num_bits: ::std::option::Option, narrow_range: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FakeQuantWithMinMaxVarsPerChannel' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FakeQuantWithMinMaxVarsPerChannelInst { + /// An instance of a fully built FakeQuantWithMinMaxVarsPerChannel Operation in a Tensorflow graph. + pub op: crate::Operation, +} -impl FakeQuantWithMinMaxVarsPerChannelGradient { - /// Creates a new `FakeQuantWithMinMaxVarsPerChannelGradient`. +impl FakeQuantWithMinMaxVarsPerChannel { + /// Creates a new `FakeQuantWithMinMaxVarsPerChannel`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `num_bits` attribute. + pub fn num_bits>(mut self, value: ArgType) -> Self { + self.num_bits = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `narrow_range` attribute. + pub fn narrow_range>(mut self, value: ArgType) -> Self { + self.narrow_range = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `FakeQuantWithMinMaxVarsPerChannel` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, inputs: O0, min: O1, max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(inputs.into(), min.into(), max.into(), scope) + } + fn build_impl(&self, inputs: crate::Output, min: crate::Output, max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("FakeQuantWithMinMaxVarsPerChannel", |nd| { + nd.add_input(inputs); + nd.add_input(min); + nd.add_input(max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `FakeQuantWithMinMaxVarsPerChannel` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, inputs: O0, min: O1, max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), min.into(), max.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, min: crate::Output, max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FakeQuantWithMinMaxVarsPerChannel", |nd| { + nd.add_input(inputs); + nd.add_input(min); + nd.add_input(max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FakeQuantWithMinMaxVarsPerChannelInst{op}) + } +} +impl FakeQuantWithMinMaxVarsPerChannelInst { + /// Returns the 'outputs' output of this 'FakeQuantWithMinMaxVarsPerChannel' operation. + pub fn outputs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FakeQuantWithMinMaxVarsPerChannelInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `FakeQuantWithMinMaxVarsPerChannel::new().build(inputs, min, max, scope)`. +pub fn fake_quant_with_min_max_vars_per_channel, O1: ::std::convert::Into, O2: ::std::convert::Into>(inputs: O0, min: O1, max: O2, scope: &mut crate::Scope) -> crate::Result { + FakeQuantWithMinMaxVarsPerChannel::new().build(inputs, min, max, scope) +} + +/// Builder for the `FakeQuantWithMinMaxVarsPerChannelGradient` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct FakeQuantWithMinMaxVarsPerChannelGradient { + num_bits: ::std::option::Option, + narrow_range: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'FakeQuantWithMinMaxVarsPerChannelGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FakeQuantWithMinMaxVarsPerChannelGradientInst { + /// An instance of a fully built FakeQuantWithMinMaxVarsPerChannelGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl FakeQuantWithMinMaxVarsPerChannelGradient { + /// Creates a new `FakeQuantWithMinMaxVarsPerChannelGradient`. pub fn new() -> Self { Self::default() } @@ -38583,36 +46929,10 @@ impl FakeQuantWithMinMaxVarsPerChannelGradient { } /// Builds the `FakeQuantWithMinMaxVarsPerChannelGradient` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - gradients: O0, - inputs: O1, - min: O2, - max: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - gradients.into(), - inputs.into(), - min.into(), - max.into(), - scope, - ) - } - - fn build_impl( - &self, - gradients: crate::Output, - inputs: crate::Output, - min: crate::Output, - max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, gradients: O0, inputs: O1, min: O2, max: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(gradients.into(), inputs.into(), min.into(), max.into(), scope) + } + fn build_impl(&self, gradients: crate::Output, inputs: crate::Output, min: crate::Output, max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FakeQuantWithMinMaxVarsPerChannelGradient", |nd| { nd.add_input(gradients); nd.add_input(inputs); @@ -38621,37 +46941,84 @@ impl FakeQuantWithMinMaxVarsPerChannelGradient { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_bits { - nd.set_attr_int("num_bits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FakeQuantWithMinMaxVarsPerChannelGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, gradients: O0, inputs: O1, min: O2, max: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), inputs.into(), min.into(), max.into(), scope) + } + fn build_instance_impl(&self, gradients: crate::Output, inputs: crate::Output, min: crate::Output, max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FakeQuantWithMinMaxVarsPerChannelGradient", |nd| { + nd.add_input(gradients); + nd.add_input(inputs); + nd.add_input(min); + nd.add_input(max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FakeQuantWithMinMaxVarsPerChannelGradientInst{op}) + } +} +impl FakeQuantWithMinMaxVarsPerChannelGradientInst { + /// Returns the 'backprops_wrt_input' output of this 'FakeQuantWithMinMaxVarsPerChannelGradient' operation. + pub fn backprops_wrt_input(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'backprop_wrt_min' output of this 'FakeQuantWithMinMaxVarsPerChannelGradient' operation. + pub fn backprop_wrt_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'backprop_wrt_max' output of this 'FakeQuantWithMinMaxVarsPerChannelGradient' operation. + pub fn backprop_wrt_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for FakeQuantWithMinMaxVarsPerChannelGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FakeQuantWithMinMaxVarsPerChannelGradient::new().build(gradients, inputs, min, max, scope)`. -pub fn fake_quant_with_min_max_vars_per_channel_gradient< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - gradients: O0, - inputs: O1, - min: O2, - max: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fake_quant_with_min_max_vars_per_channel_gradient, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(gradients: O0, inputs: O1, min: O2, max: O3, scope: &mut crate::Scope) -> crate::Result { FakeQuantWithMinMaxVarsPerChannelGradient::new().build(gradients, inputs, min, max, scope) } + /// Builder for the `FakeQueue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FakeQueue { control_inputs: ::std::vec::Vec, } +/// An instance of 'FakeQueue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FakeQueueInst { + /// An instance of a fully built FakeQueue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FakeQueue { /// Creates a new `FakeQueue`. @@ -38666,19 +47033,10 @@ impl FakeQueue { } /// Builds the `FakeQueue` operation. - pub fn build>( - &self, - resource: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FakeQueue", |nd| { nd.add_input(resource); for op in &self.control_inputs { @@ -38687,20 +47045,52 @@ impl FakeQueue { ::std::result::Result::Ok(()) }) } -} + /// Builds the `FakeQueue` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FakeQueue", |nd| { + nd.add_input(resource); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(FakeQueueInst{op}) + } +} +impl FakeQueueInst { + /// Returns the 'handle' output of this 'FakeQueue' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FakeQueueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FakeQueue::new().build(resource, scope)`. -pub fn fake_queue>( - resource: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fake_queue>(resource: O0, scope: &mut crate::Scope) -> crate::Result { FakeQueue::new().build(resource, scope) } + /// Builder for the `FileSystemSetConfiguration` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FileSystemSetConfiguration { control_inputs: ::std::vec::Vec, } +/// An instance of 'FileSystemSetConfiguration' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FileSystemSetConfigurationInst { + /// An instance of a fully built FileSystemSetConfiguration Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FileSystemSetConfiguration { /// Creates a new `FileSystemSetConfiguration`. @@ -38715,27 +47105,10 @@ impl FileSystemSetConfiguration { } /// Builds the `FileSystemSetConfiguration` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - scheme: O0, - key: O1, - value: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, scheme: O0, key: O1, value: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scheme.into(), key.into(), value.into(), scope) } - - fn build_impl( - &self, - scheme: crate::Output, - key: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, scheme: crate::Output, key: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FileSystemSetConfiguration", |nd| { nd.add_input(scheme); nd.add_input(key); @@ -38746,21 +47119,36 @@ impl FileSystemSetConfiguration { ::std::result::Result::Ok(()) }) } -} + /// Builds the `FileSystemSetConfiguration` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, scheme: O0, key: O1, value: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scheme.into(), key.into(), value.into(), scope) + } + fn build_instance_impl(&self, scheme: crate::Output, key: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FileSystemSetConfiguration", |nd| { + nd.add_input(scheme); + nd.add_input(key); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(FileSystemSetConfigurationInst{op}) + } +} +impl FileSystemSetConfigurationInst { +} +impl Into for FileSystemSetConfigurationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FileSystemSetConfiguration::new().build(scheme, key, value, scope)`. -pub fn file_system_set_configuration< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - scheme: O0, - key: O1, - value: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn file_system_set_configuration, O1: ::std::convert::Into, O2: ::std::convert::Into>(scheme: O0, key: O1, value: O2, scope: &mut crate::Scope) -> crate::Result { FileSystemSetConfiguration::new().build(scheme, key, value, scope) } + /// Builder for the `Fill` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Fill { @@ -38768,6 +47156,12 @@ pub struct Fill { index_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Fill' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FillInst { + /// An instance of a fully built Fill Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Fill { /// Creates a new `Fill`. @@ -38782,10 +47176,7 @@ impl Fill { } /// Sets the `index_type` attribute. - pub fn index_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn index_type>(mut self, value: ArgType) -> Self { self.index_type = ::std::option::Option::Some(value.into()); self } @@ -38797,49 +47188,67 @@ impl Fill { } /// Builds the `Fill` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - dims: O0, - value: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, dims: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(dims.into(), value.into(), scope) } - - fn build_impl( - &self, - dims: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, dims: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Fill", |nd| { nd.add_input(dims); nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.index_type { - nd.set_attr_type("index_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.index_type { + nd.set_attr_type("index_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Fill` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, dims: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dims.into(), value.into(), scope) + } + fn build_instance_impl(&self, dims: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Fill", |nd| { + nd.add_input(dims); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.index_type { + nd.set_attr_type("index_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FillInst{op}) + } +} +impl FillInst { + /// Returns the 'output' output of this 'Fill' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FillInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Fill::new().build(dims, value, scope)`. -pub fn fill, O1: ::std::convert::Into>( - dims: O0, - value: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fill, O1: ::std::convert::Into>(dims: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { Fill::new().build(dims, value, scope) } + /// Builder for the `FilterByLastComponentDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FilterByLastComponentDataset { @@ -38847,6 +47256,12 @@ pub struct FilterByLastComponentDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FilterByLastComponentDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FilterByLastComponentDatasetInst { + /// An instance of a fully built FilterByLastComponentDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FilterByLastComponentDataset { /// Creates a new `FilterByLastComponentDataset`. @@ -38855,19 +47270,13 @@ impl FilterByLastComponentDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -38879,42 +47288,65 @@ impl FilterByLastComponentDataset { } /// Builds the `FilterByLastComponentDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FilterByLastComponentDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FilterByLastComponentDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FilterByLastComponentDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FilterByLastComponentDatasetInst{op}) + } +} +impl FilterByLastComponentDatasetInst { + /// Returns the 'output' output of this 'FilterByLastComponentDataset' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FilterByLastComponentDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FilterByLastComponentDataset::new().build(input_dataset, scope)`. -pub fn filter_by_last_component_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn filter_by_last_component_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { FilterByLastComponentDataset::new().build(input_dataset, scope) } + /// Builder for the `FilterDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FilterDataset { @@ -38925,6 +47357,12 @@ pub struct FilterDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FilterDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FilterDatasetInst { + /// An instance of a fully built FilterDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FilterDataset { /// Creates a new `FilterDataset`. @@ -38933,46 +47371,31 @@ impl FilterDataset { } /// Sets the `predicate` attribute. - pub fn predicate>( - mut self, - value: ArgType, - ) -> Self { + pub fn predicate>(mut self, value: ArgType) -> Self { self.predicate = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -38984,61 +47407,85 @@ impl FilterDataset { } /// Builds the `FilterDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), other_arguments.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FilterDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.predicate { - nd.set_attr_string("predicate", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.predicate { + nd.set_attr_string("predicate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FilterDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FilterDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.predicate { + nd.set_attr_string("predicate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FilterDatasetInst{op}) + } +} +impl FilterDatasetInst { + /// Returns the 'handle' output of this 'FilterDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FilterDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FilterDataset::new().build(input_dataset, other_arguments, scope)`. -pub fn filter_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn filter_dataset, O1: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { FilterDataset::new().build(input_dataset, other_arguments, scope) } + /// Builder for the `FinalizeDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FinalizeDataset { @@ -39047,6 +47494,12 @@ pub struct FinalizeDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FinalizeDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FinalizeDatasetInst { + /// An instance of a fully built FinalizeDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FinalizeDataset { /// Creates a new `FinalizeDataset`. @@ -39061,19 +47514,13 @@ impl FinalizeDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -39085,51 +47532,83 @@ impl FinalizeDataset { } /// Builds the `FinalizeDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FinalizeDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.has_captured_ref { - nd.set_attr_bool("has_captured_ref", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.has_captured_ref { + nd.set_attr_bool("has_captured_ref", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FinalizeDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FinalizeDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.has_captured_ref { + nd.set_attr_bool("has_captured_ref", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FinalizeDatasetInst{op}) + } +} +impl FinalizeDatasetInst { + /// Returns the 'handle' output of this 'FinalizeDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FinalizeDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FinalizeDataset::new().build(input_dataset, scope)`. -pub fn finalize_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn finalize_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { FinalizeDataset::new().build(input_dataset, scope) } + /// Builder for the `Fingerprint` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Fingerprint { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Fingerprint' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FingerprintInst { + /// An instance of a fully built Fingerprint Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Fingerprint { /// Creates a new `Fingerprint`. @@ -39150,55 +47629,73 @@ impl Fingerprint { } /// Builds the `Fingerprint` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - data: O0, - method: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, data: O0, method: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), method.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - method: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, method: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Fingerprint", |nd| { nd.add_input(data); nd.add_input(method); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Fingerprint` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, data: O0, method: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), method.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, method: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Fingerprint", |nd| { + nd.add_input(data); + nd.add_input(method); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FingerprintInst{op}) + } +} +impl FingerprintInst { + /// Returns the 'fingerprint' output of this 'Fingerprint' operation. + pub fn fingerprint(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FingerprintInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Fingerprint::new().build(data, method, scope)`. -pub fn fingerprint< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - data: O0, - method: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fingerprint, O1: ::std::convert::Into>(data: O0, method: O1, scope: &mut crate::Scope) -> crate::Result { Fingerprint::new().build(data, method, scope) } + /// Builder for the `FixedLengthRecordDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FixedLengthRecordDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FixedLengthRecordDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FixedLengthRecordDatasetInst { + /// An instance of a fully built FixedLengthRecordDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FixedLengthRecordDataset { /// Creates a new `FixedLengthRecordDataset`. @@ -39207,10 +47704,7 @@ impl FixedLengthRecordDataset { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -39222,40 +47716,10 @@ impl FixedLengthRecordDataset { } /// Builds the `FixedLengthRecordDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - filenames: O0, - header_bytes: O1, - record_bytes: O2, - footer_bytes: O3, - buffer_size: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - filenames.into(), - header_bytes.into(), - record_bytes.into(), - footer_bytes.into(), - buffer_size.into(), - scope, - ) - } - - fn build_impl( - &self, - filenames: crate::Output, - header_bytes: crate::Output, - record_bytes: crate::Output, - footer_bytes: crate::Output, - buffer_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, filenames: O0, header_bytes: O1, record_bytes: O2, footer_bytes: O3, buffer_size: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(filenames.into(), header_bytes.into(), record_bytes.into(), footer_bytes.into(), buffer_size.into(), scope) + } + fn build_impl(&self, filenames: crate::Output, header_bytes: crate::Output, record_bytes: crate::Output, footer_bytes: crate::Output, buffer_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FixedLengthRecordDataset", |nd| { nd.add_input(filenames); nd.add_input(header_bytes); @@ -39265,44 +47729,66 @@ impl FixedLengthRecordDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FixedLengthRecordDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, filenames: O0, header_bytes: O1, record_bytes: O2, footer_bytes: O3, buffer_size: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filenames.into(), header_bytes.into(), record_bytes.into(), footer_bytes.into(), buffer_size.into(), scope) + } + fn build_instance_impl(&self, filenames: crate::Output, header_bytes: crate::Output, record_bytes: crate::Output, footer_bytes: crate::Output, buffer_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FixedLengthRecordDataset", |nd| { + nd.add_input(filenames); + nd.add_input(header_bytes); + nd.add_input(record_bytes); + nd.add_input(footer_bytes); + nd.add_input(buffer_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FixedLengthRecordDatasetInst{op}) + } +} +impl FixedLengthRecordDatasetInst { + /// Returns the 'handle' output of this 'FixedLengthRecordDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FixedLengthRecordDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FixedLengthRecordDataset::new().build(filenames, header_bytes, record_bytes, footer_bytes, buffer_size, scope)`. -pub fn fixed_length_record_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - filenames: O0, - header_bytes: O1, - record_bytes: O2, - footer_bytes: O3, - buffer_size: O4, - scope: &mut crate::Scope, -) -> crate::Result { - FixedLengthRecordDataset::new().build( - filenames, - header_bytes, - record_bytes, - footer_bytes, - buffer_size, - scope, - ) +pub fn fixed_length_record_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(filenames: O0, header_bytes: O1, record_bytes: O2, footer_bytes: O3, buffer_size: O4, scope: &mut crate::Scope) -> crate::Result { + FixedLengthRecordDataset::new().build(filenames, header_bytes, record_bytes, footer_bytes, buffer_size, scope) } + /// Builder for the `FixedLengthRecordDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FixedLengthRecordDatasetV2 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FixedLengthRecordDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FixedLengthRecordDatasetV2Inst { + /// An instance of a fully built FixedLengthRecordDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FixedLengthRecordDatasetV2 { /// Creates a new `FixedLengthRecordDatasetV2`. @@ -39311,10 +47797,7 @@ impl FixedLengthRecordDatasetV2 { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -39326,44 +47809,10 @@ impl FixedLengthRecordDatasetV2 { } /// Builds the `FixedLengthRecordDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - filenames: O0, - header_bytes: O1, - record_bytes: O2, - footer_bytes: O3, - buffer_size: O4, - compression_type: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - filenames.into(), - header_bytes.into(), - record_bytes.into(), - footer_bytes.into(), - buffer_size.into(), - compression_type.into(), - scope, - ) - } - - fn build_impl( - &self, - filenames: crate::Output, - header_bytes: crate::Output, - record_bytes: crate::Output, - footer_bytes: crate::Output, - buffer_size: crate::Output, - compression_type: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, filenames: O0, header_bytes: O1, record_bytes: O2, footer_bytes: O3, buffer_size: O4, compression_type: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(filenames.into(), header_bytes.into(), record_bytes.into(), footer_bytes.into(), buffer_size.into(), compression_type.into(), scope) + } + fn build_impl(&self, filenames: crate::Output, header_bytes: crate::Output, record_bytes: crate::Output, footer_bytes: crate::Output, buffer_size: crate::Output, compression_type: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FixedLengthRecordDatasetV2", |nd| { nd.add_input(filenames); nd.add_input(header_bytes); @@ -39374,41 +47823,55 @@ impl FixedLengthRecordDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FixedLengthRecordDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, filenames: O0, header_bytes: O1, record_bytes: O2, footer_bytes: O3, buffer_size: O4, compression_type: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filenames.into(), header_bytes.into(), record_bytes.into(), footer_bytes.into(), buffer_size.into(), compression_type.into(), scope) + } + fn build_instance_impl(&self, filenames: crate::Output, header_bytes: crate::Output, record_bytes: crate::Output, footer_bytes: crate::Output, buffer_size: crate::Output, compression_type: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FixedLengthRecordDatasetV2", |nd| { + nd.add_input(filenames); + nd.add_input(header_bytes); + nd.add_input(record_bytes); + nd.add_input(footer_bytes); + nd.add_input(buffer_size); + nd.add_input(compression_type); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FixedLengthRecordDatasetV2Inst{op}) + } +} +impl FixedLengthRecordDatasetV2Inst { + /// Returns the 'handle' output of this 'FixedLengthRecordDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FixedLengthRecordDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FixedLengthRecordDatasetV2::new().build(filenames, header_bytes, record_bytes, footer_bytes, buffer_size, compression_type, scope)`. -pub fn fixed_length_record_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - filenames: O0, - header_bytes: O1, - record_bytes: O2, - footer_bytes: O3, - buffer_size: O4, - compression_type: O5, - scope: &mut crate::Scope, -) -> crate::Result { - FixedLengthRecordDatasetV2::new().build( - filenames, - header_bytes, - record_bytes, - footer_bytes, - buffer_size, - compression_type, - scope, - ) +pub fn fixed_length_record_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(filenames: O0, header_bytes: O1, record_bytes: O2, footer_bytes: O3, buffer_size: O4, compression_type: O5, scope: &mut crate::Scope) -> crate::Result { + FixedLengthRecordDatasetV2::new().build(filenames, header_bytes, record_bytes, footer_bytes, buffer_size, compression_type, scope) } + /// Builder for the `FixedLengthRecordReader` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FixedLengthRecordReader { @@ -39420,6 +47883,12 @@ pub struct FixedLengthRecordReader { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FixedLengthRecordReader' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FixedLengthRecordReaderInst { + /// An instance of a fully built FixedLengthRecordReader Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FixedLengthRecordReader { /// Creates a new `FixedLengthRecordReader`. @@ -39452,19 +47921,13 @@ impl FixedLengthRecordReader { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -39476,42 +47939,87 @@ impl FixedLengthRecordReader { } /// Builds the `FixedLengthRecordReader` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FixedLengthRecordReader", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.header_bytes { - nd.set_attr_int("header_bytes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.record_bytes { - nd.set_attr_int("record_bytes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.footer_bytes { - nd.set_attr_int("footer_bytes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.hop_bytes { - nd.set_attr_int("hop_bytes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.header_bytes { + nd.set_attr_int("header_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.record_bytes { + nd.set_attr_int("record_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.footer_bytes { + nd.set_attr_int("footer_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hop_bytes { + nd.set_attr_int("hop_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FixedLengthRecordReader` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FixedLengthRecordReader", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.header_bytes { + nd.set_attr_int("header_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.record_bytes { + nd.set_attr_int("record_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.footer_bytes { + nd.set_attr_int("footer_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hop_bytes { + nd.set_attr_int("hop_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FixedLengthRecordReaderInst{op}) + } +} +impl FixedLengthRecordReaderInst { + /// Returns the 'reader_handle' output of this 'FixedLengthRecordReader' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FixedLengthRecordReaderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FixedLengthRecordReader::new().build(scope)`. -pub fn fixed_length_record_reader(scope: &mut crate::Scope) -> crate::Result { +pub fn fixed_length_record_reader<>(scope: &mut crate::Scope) -> crate::Result { FixedLengthRecordReader::new().build(scope) } + /// Builder for the `FixedLengthRecordReaderV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FixedLengthRecordReaderV2 { @@ -39524,6 +48032,12 @@ pub struct FixedLengthRecordReaderV2 { encoding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FixedLengthRecordReaderV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FixedLengthRecordReaderV2Inst { + /// An instance of a fully built FixedLengthRecordReaderV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FixedLengthRecordReaderV2 { /// Creates a new `FixedLengthRecordReaderV2`. @@ -39556,28 +48070,19 @@ impl FixedLengthRecordReaderV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `encoding` attribute. - pub fn encoding>( - mut self, - value: ArgType, - ) -> Self { + pub fn encoding>(mut self, value: ArgType) -> Self { self.encoding = ::std::option::Option::Some(value.into()); self } @@ -39589,45 +48094,93 @@ impl FixedLengthRecordReaderV2 { } /// Builds the `FixedLengthRecordReaderV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FixedLengthRecordReaderV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.header_bytes { - nd.set_attr_int("header_bytes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.record_bytes { - nd.set_attr_int("record_bytes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.footer_bytes { - nd.set_attr_int("footer_bytes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.hop_bytes { - nd.set_attr_int("hop_bytes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.encoding { - nd.set_attr_string("encoding", value)?; - } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.header_bytes { + nd.set_attr_int("header_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.record_bytes { + nd.set_attr_int("record_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.footer_bytes { + nd.set_attr_int("footer_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hop_bytes { + nd.set_attr_int("hop_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.encoding { + nd.set_attr_string("encoding", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `FixedLengthRecordReaderV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FixedLengthRecordReaderV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.header_bytes { + nd.set_attr_int("header_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.record_bytes { + nd.set_attr_int("record_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.footer_bytes { + nd.set_attr_int("footer_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hop_bytes { + nd.set_attr_int("hop_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.encoding { + nd.set_attr_string("encoding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FixedLengthRecordReaderV2Inst{op}) + } +} +impl FixedLengthRecordReaderV2Inst { + /// Returns the 'reader_handle' output of this 'FixedLengthRecordReaderV2' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FixedLengthRecordReaderV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `FixedLengthRecordReaderV2::new().build(scope)`. -pub fn fixed_length_record_reader_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn fixed_length_record_reader_v2<>(scope: &mut crate::Scope) -> crate::Result { FixedLengthRecordReaderV2::new().build(scope) } + /// Builder for the `FixedUnigramCandidateSampler` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FixedUnigramCandidateSampler { @@ -39645,6 +48198,12 @@ pub struct FixedUnigramCandidateSampler { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FixedUnigramCandidateSampler' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FixedUnigramCandidateSamplerInst { + /// An instance of a fully built FixedUnigramCandidateSampler Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FixedUnigramCandidateSampler { /// Creates a new `FixedUnigramCandidateSampler`. @@ -39677,10 +48236,7 @@ impl FixedUnigramCandidateSampler { } /// Sets the `vocab_file` attribute. - pub fn vocab_file>( - mut self, - value: ArgType, - ) -> Self { + pub fn vocab_file>(mut self, value: ArgType) -> Self { self.vocab_file = ::std::option::Option::Some(value.into()); self } @@ -39710,10 +48266,7 @@ impl FixedUnigramCandidateSampler { } /// Sets the `unigrams` attribute. - pub fn unigrams>>( - mut self, - value: ArgType, - ) -> Self { + pub fn unigrams>>(mut self, value: ArgType) -> Self { self.unigrams = ::std::option::Option::Some(value.into()); self } @@ -39737,72 +48290,139 @@ impl FixedUnigramCandidateSampler { } /// Builds the `FixedUnigramCandidateSampler` operation. - pub fn build>( - &self, - true_classes: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(true_classes.into(), scope) } - - fn build_impl( - &self, - true_classes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FixedUnigramCandidateSampler", |nd| { nd.add_input(true_classes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_true { - nd.set_attr_int("num_true", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sampled { - nd.set_attr_int("num_sampled", *value)?; - } - if let ::std::option::Option::Some(value) = &self.unique { - nd.set_attr_bool("unique", *value)?; - } - if let ::std::option::Option::Some(value) = &self.range_max { - nd.set_attr_int("range_max", *value)?; - } - if let ::std::option::Option::Some(value) = &self.vocab_file { - nd.set_attr_string("vocab_file", value)?; - } - if let ::std::option::Option::Some(value) = &self.distortion { - nd.set_attr_float("distortion", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_reserved_ids { - nd.set_attr_int("num_reserved_ids", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard { - nd.set_attr_int("shard", *value)?; - } - if let ::std::option::Option::Some(value) = &self.unigrams { - nd.set_attr_float_list("unigrams", value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_max { + nd.set_attr_int("range_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.vocab_file { + nd.set_attr_string("vocab_file", value)?; + } + if let ::std::option::Option::Some(value) = &self.distortion { + nd.set_attr_float("distortion", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_reserved_ids { + nd.set_attr_int("num_reserved_ids", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard { + nd.set_attr_int("shard", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unigrams { + nd.set_attr_float_list("unigrams", value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `FixedUnigramCandidateSampler` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(true_classes.into(), scope) + } + fn build_instance_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FixedUnigramCandidateSampler", |nd| { + nd.add_input(true_classes); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_max { + nd.set_attr_int("range_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.vocab_file { + nd.set_attr_string("vocab_file", value)?; + } + if let ::std::option::Option::Some(value) = &self.distortion { + nd.set_attr_float("distortion", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_reserved_ids { + nd.set_attr_int("num_reserved_ids", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard { + nd.set_attr_int("shard", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unigrams { + nd.set_attr_float_list("unigrams", value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FixedUnigramCandidateSamplerInst{op}) + } +} +impl FixedUnigramCandidateSamplerInst { + /// Returns the 'sampled_candidates' output of this 'FixedUnigramCandidateSampler' operation. + pub fn sampled_candidates(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'true_expected_count' output of this 'FixedUnigramCandidateSampler' operation. + pub fn true_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sampled_expected_count' output of this 'FixedUnigramCandidateSampler' operation. + pub fn sampled_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for FixedUnigramCandidateSamplerInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `FixedUnigramCandidateSampler::new().build(true_classes, scope)`. -pub fn fixed_unigram_candidate_sampler>( - true_classes: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fixed_unigram_candidate_sampler>(true_classes: O0, scope: &mut crate::Scope) -> crate::Result { FixedUnigramCandidateSampler::new().build(true_classes, scope) } + /// Builder for the `FlatMapDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FlatMapDataset { @@ -39813,6 +48433,12 @@ pub struct FlatMapDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FlatMapDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FlatMapDatasetInst { + /// An instance of a fully built FlatMapDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FlatMapDataset { /// Creates a new `FlatMapDataset`. @@ -39821,46 +48447,31 @@ impl FlatMapDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -39872,67 +48483,97 @@ impl FlatMapDataset { } /// Builds the `FlatMapDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), other_arguments.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FlatMapDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FlatMapDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FlatMapDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FlatMapDatasetInst{op}) + } +} +impl FlatMapDatasetInst { + /// Returns the 'handle' output of this 'FlatMapDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FlatMapDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FlatMapDataset::new().build(input_dataset, other_arguments, scope)`. -pub fn flat_map_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn flat_map_dataset, O1: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { FlatMapDataset::new().build(input_dataset, other_arguments, scope) } + /// Builder for the `Floor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Floor { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Floor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FloorInst { + /// An instance of a fully built Floor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Floor { /// Creates a new `Floor`. @@ -39953,45 +48594,71 @@ impl Floor { } /// Builds the `Floor` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Floor", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Floor` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Floor", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FloorInst{op}) + } +} +impl FloorInst { + /// Returns the 'y' output of this 'Floor' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FloorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Floor::new().build(x, scope)`. -pub fn floor>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn floor>(x: O0, scope: &mut crate::Scope) -> crate::Result { Floor::new().build(x, scope) } + /// Builder for the `FloorDiv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FloorDiv { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FloorDiv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FloorDivInst { + /// An instance of a fully built FloorDiv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FloorDiv { /// Creates a new `FloorDiv`. @@ -40012,55 +48679,73 @@ impl FloorDiv { } /// Builds the `FloorDiv` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FloorDiv", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FloorDiv` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FloorDiv", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FloorDivInst{op}) + } +} +impl FloorDivInst { + /// Returns the 'z' output of this 'FloorDiv' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FloorDivInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FloorDiv::new().build(x, y, scope)`. -pub fn floor_div< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn floor_div, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { FloorDiv::new().build(x, y, scope) } + /// Builder for the `FloorMod` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FloorMod { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FloorMod' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FloorModInst { + /// An instance of a fully built FloorMod Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FloorMod { /// Creates a new `FloorMod`. @@ -40081,54 +48766,72 @@ impl FloorMod { } /// Builds the `FloorMod` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FloorMod", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FloorMod` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FloorMod", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FloorModInst{op}) + } +} +impl FloorModInst { + /// Returns the 'z' output of this 'FloorMod' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FloorModInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FloorMod::new().build(x, y, scope)`. -pub fn floor_mod< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn floor_mod, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { FloorMod::new().build(x, y, scope) } + /// Builder for the `FlushSummaryWriter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FlushSummaryWriter { control_inputs: ::std::vec::Vec, } +/// An instance of 'FlushSummaryWriter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FlushSummaryWriterInst { + /// An instance of a fully built FlushSummaryWriter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FlushSummaryWriter { /// Creates a new `FlushSummaryWriter`. @@ -40143,19 +48846,10 @@ impl FlushSummaryWriter { } /// Builds the `FlushSummaryWriter` operation. - pub fn build>( - &self, - writer: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, writer: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(writer.into(), scope) } - - fn build_impl( - &self, - writer: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, writer: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FlushSummaryWriter", |nd| { nd.add_input(writer); for op in &self.control_inputs { @@ -40164,15 +48858,34 @@ impl FlushSummaryWriter { ::std::result::Result::Ok(()) }) } -} + /// Builds the `FlushSummaryWriter` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, writer: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FlushSummaryWriter", |nd| { + nd.add_input(writer); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(FlushSummaryWriterInst{op}) + } +} +impl FlushSummaryWriterInst { +} +impl Into for FlushSummaryWriterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FlushSummaryWriter::new().build(writer, scope)`. -pub fn flush_summary_writer>( - writer: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn flush_summary_writer>(writer: O0, scope: &mut crate::Scope) -> crate::Result { FlushSummaryWriter::new().build(writer, scope) } + /// Builder for the `For` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct For { @@ -40180,6 +48893,12 @@ pub struct For { body: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'For' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ForInst { + /// An instance of a fully built For Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl For { /// Creates a new `For`. @@ -40188,19 +48907,13 @@ impl For { } /// Sets the `T` attribute. - pub fn T>>( - mut self, - value: ArgType, - ) -> Self { + pub fn T>>(mut self, value: ArgType) -> Self { self.T = ::std::option::Option::Some(value.into()); self } /// Sets the `body` attribute. - pub fn body>( - mut self, - value: ArgType, - ) -> Self { + pub fn body>(mut self, value: ArgType) -> Self { self.body = ::std::option::Option::Some(value.into()); self } @@ -40212,36 +48925,10 @@ impl For { } /// Builds the `For` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - start: O0, - limit: O1, - delta: O2, - input: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - start.into(), - limit.into(), - delta.into(), - input.into(), - scope, - ) - } - - fn build_impl( - &self, - start: crate::Output, - limit: crate::Output, - delta: crate::Output, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, start: O0, limit: O1, delta: O2, input: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(start.into(), limit.into(), delta.into(), input.into(), scope) + } + fn build_impl(&self, start: crate::Output, limit: crate::Output, delta: crate::Output, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("For", |nd| { nd.add_input(start); nd.add_input(limit); @@ -40250,32 +48937,59 @@ impl For { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type_list("T", value)?; - } - if let ::std::option::Option::Some(value) = &self.body { - nd.set_attr_string("body", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.body { + nd.set_attr_string("body", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `For` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, start: O0, limit: O1, delta: O2, input: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(start.into(), limit.into(), delta.into(), input.into(), scope) + } + fn build_instance_impl(&self, start: crate::Output, limit: crate::Output, delta: crate::Output, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("For", |nd| { + nd.add_input(start); + nd.add_input(limit); + nd.add_input(delta); + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.body { + nd.set_attr_string("body", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ForInst{op}) + } +} +impl ForInst { + /// Returns the 'output' output of this 'For' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ForInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `For::new().build(start, limit, delta, input, scope)`. -pub fn for_< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - start: O0, - limit: O1, - delta: O2, - input: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn for_, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(start: O0, limit: O1, delta: O2, input: O3, scope: &mut crate::Scope) -> crate::Result { For::new().build(start, limit, delta, input, scope) } + /// Builder for the `FractionalAvgPool` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FractionalAvgPool { @@ -40288,6 +49002,12 @@ pub struct FractionalAvgPool { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FractionalAvgPool' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FractionalAvgPoolInst { + /// An instance of a fully built FractionalAvgPool Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FractionalAvgPool { /// Creates a new `FractionalAvgPool`. @@ -40296,10 +49016,7 @@ impl FractionalAvgPool { } /// Sets the `pooling_ratio` attribute. - pub fn pooling_ratio>>( - mut self, - value: ArgType, - ) -> Self { + pub fn pooling_ratio>>(mut self, value: ArgType) -> Self { self.pooling_ratio = ::std::option::Option::Some(value.into()); self } @@ -40347,57 +49064,109 @@ impl FractionalAvgPool { } /// Builds the `FractionalAvgPool` operation. - pub fn build>( - &self, - value: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FractionalAvgPool", |nd| { nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.pooling_ratio { - nd.set_attr_float_list("pooling_ratio", value)?; - } - if let ::std::option::Option::Some(value) = &self.pseudo_random { - nd.set_attr_bool("pseudo_random", *value)?; - } - if let ::std::option::Option::Some(value) = &self.overlapping { - nd.set_attr_bool("overlapping", *value)?; - } - if let ::std::option::Option::Some(value) = &self.deterministic { - nd.set_attr_bool("deterministic", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.pooling_ratio { + nd.set_attr_float_list("pooling_ratio", value)?; + } + if let ::std::option::Option::Some(value) = &self.pseudo_random { + nd.set_attr_bool("pseudo_random", *value)?; + } + if let ::std::option::Option::Some(value) = &self.overlapping { + nd.set_attr_bool("overlapping", *value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_bool("deterministic", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FractionalAvgPool` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), scope) + } + fn build_instance_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FractionalAvgPool", |nd| { + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.pooling_ratio { + nd.set_attr_float_list("pooling_ratio", value)?; + } + if let ::std::option::Option::Some(value) = &self.pseudo_random { + nd.set_attr_bool("pseudo_random", *value)?; + } + if let ::std::option::Option::Some(value) = &self.overlapping { + nd.set_attr_bool("overlapping", *value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_bool("deterministic", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FractionalAvgPoolInst{op}) + } +} +impl FractionalAvgPoolInst { + /// Returns the 'output' output of this 'FractionalAvgPool' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'row_pooling_sequence' output of this 'FractionalAvgPool' operation. + pub fn row_pooling_sequence(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'col_pooling_sequence' output of this 'FractionalAvgPool' operation. + pub fn col_pooling_sequence(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for FractionalAvgPoolInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FractionalAvgPool::new().build(value, scope)`. -pub fn fractional_avg_pool>( - value: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fractional_avg_pool>(value: O0, scope: &mut crate::Scope) -> crate::Result { FractionalAvgPool::new().build(value, scope) } + /// Builder for the `FractionalAvgPoolGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FractionalAvgPoolGrad { @@ -40405,6 +49174,12 @@ pub struct FractionalAvgPoolGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FractionalAvgPoolGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FractionalAvgPoolGradInst { + /// An instance of a fully built FractionalAvgPoolGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FractionalAvgPoolGrad { /// Creates a new `FractionalAvgPoolGrad`. @@ -40431,36 +49206,10 @@ impl FractionalAvgPoolGrad { } /// Builds the `FractionalAvgPoolGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - orig_input_tensor_shape: O0, - out_backprop: O1, - row_pooling_sequence: O2, - col_pooling_sequence: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - orig_input_tensor_shape.into(), - out_backprop.into(), - row_pooling_sequence.into(), - col_pooling_sequence.into(), - scope, - ) - } - - fn build_impl( - &self, - orig_input_tensor_shape: crate::Output, - out_backprop: crate::Output, - row_pooling_sequence: crate::Output, - col_pooling_sequence: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, orig_input_tensor_shape: O0, out_backprop: O1, row_pooling_sequence: O2, col_pooling_sequence: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(orig_input_tensor_shape.into(), out_backprop.into(), row_pooling_sequence.into(), col_pooling_sequence.into(), scope) + } + fn build_impl(&self, orig_input_tensor_shape: crate::Output, out_backprop: crate::Output, row_pooling_sequence: crate::Output, col_pooling_sequence: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FractionalAvgPoolGrad", |nd| { nd.add_input(orig_input_tensor_shape); nd.add_input(out_backprop); @@ -40469,38 +49218,59 @@ impl FractionalAvgPoolGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.overlapping { - nd.set_attr_bool("overlapping", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.overlapping { + nd.set_attr_bool("overlapping", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FractionalAvgPoolGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, orig_input_tensor_shape: O0, out_backprop: O1, row_pooling_sequence: O2, col_pooling_sequence: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(orig_input_tensor_shape.into(), out_backprop.into(), row_pooling_sequence.into(), col_pooling_sequence.into(), scope) + } + fn build_instance_impl(&self, orig_input_tensor_shape: crate::Output, out_backprop: crate::Output, row_pooling_sequence: crate::Output, col_pooling_sequence: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FractionalAvgPoolGrad", |nd| { + nd.add_input(orig_input_tensor_shape); + nd.add_input(out_backprop); + nd.add_input(row_pooling_sequence); + nd.add_input(col_pooling_sequence); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.overlapping { + nd.set_attr_bool("overlapping", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FractionalAvgPoolGradInst{op}) + } +} +impl FractionalAvgPoolGradInst { + /// Returns the 'output' output of this 'FractionalAvgPoolGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FractionalAvgPoolGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FractionalAvgPoolGrad::new().build(orig_input_tensor_shape, out_backprop, row_pooling_sequence, col_pooling_sequence, scope)`. -pub fn fractional_avg_pool_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - orig_input_tensor_shape: O0, - out_backprop: O1, - row_pooling_sequence: O2, - col_pooling_sequence: O3, - scope: &mut crate::Scope, -) -> crate::Result { - FractionalAvgPoolGrad::new().build( - orig_input_tensor_shape, - out_backprop, - row_pooling_sequence, - col_pooling_sequence, - scope, - ) +pub fn fractional_avg_pool_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(orig_input_tensor_shape: O0, out_backprop: O1, row_pooling_sequence: O2, col_pooling_sequence: O3, scope: &mut crate::Scope) -> crate::Result { + FractionalAvgPoolGrad::new().build(orig_input_tensor_shape, out_backprop, row_pooling_sequence, col_pooling_sequence, scope) } + /// Builder for the `FractionalMaxPool` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FractionalMaxPool { @@ -40513,6 +49283,12 @@ pub struct FractionalMaxPool { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FractionalMaxPool' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FractionalMaxPoolInst { + /// An instance of a fully built FractionalMaxPool Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FractionalMaxPool { /// Creates a new `FractionalMaxPool`. @@ -40521,10 +49297,7 @@ impl FractionalMaxPool { } /// Sets the `pooling_ratio` attribute. - pub fn pooling_ratio>>( - mut self, - value: ArgType, - ) -> Self { + pub fn pooling_ratio>>(mut self, value: ArgType) -> Self { self.pooling_ratio = ::std::option::Option::Some(value.into()); self } @@ -40572,57 +49345,109 @@ impl FractionalMaxPool { } /// Builds the `FractionalMaxPool` operation. - pub fn build>( - &self, - value: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FractionalMaxPool", |nd| { nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.pooling_ratio { - nd.set_attr_float_list("pooling_ratio", value)?; - } - if let ::std::option::Option::Some(value) = &self.pseudo_random { - nd.set_attr_bool("pseudo_random", *value)?; - } - if let ::std::option::Option::Some(value) = &self.overlapping { - nd.set_attr_bool("overlapping", *value)?; - } - if let ::std::option::Option::Some(value) = &self.deterministic { - nd.set_attr_bool("deterministic", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.pooling_ratio { + nd.set_attr_float_list("pooling_ratio", value)?; + } + if let ::std::option::Option::Some(value) = &self.pseudo_random { + nd.set_attr_bool("pseudo_random", *value)?; + } + if let ::std::option::Option::Some(value) = &self.overlapping { + nd.set_attr_bool("overlapping", *value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_bool("deterministic", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FractionalMaxPool` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), scope) + } + fn build_instance_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FractionalMaxPool", |nd| { + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.pooling_ratio { + nd.set_attr_float_list("pooling_ratio", value)?; + } + if let ::std::option::Option::Some(value) = &self.pseudo_random { + nd.set_attr_bool("pseudo_random", *value)?; + } + if let ::std::option::Option::Some(value) = &self.overlapping { + nd.set_attr_bool("overlapping", *value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_bool("deterministic", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FractionalMaxPoolInst{op}) + } +} +impl FractionalMaxPoolInst { + /// Returns the 'output' output of this 'FractionalMaxPool' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'row_pooling_sequence' output of this 'FractionalMaxPool' operation. + pub fn row_pooling_sequence(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'col_pooling_sequence' output of this 'FractionalMaxPool' operation. + pub fn col_pooling_sequence(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for FractionalMaxPoolInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FractionalMaxPool::new().build(value, scope)`. -pub fn fractional_max_pool>( - value: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fractional_max_pool>(value: O0, scope: &mut crate::Scope) -> crate::Result { FractionalMaxPool::new().build(value, scope) } + /// Builder for the `FractionalMaxPoolGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FractionalMaxPoolGrad { @@ -40630,6 +49455,12 @@ pub struct FractionalMaxPoolGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FractionalMaxPoolGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FractionalMaxPoolGradInst { + /// An instance of a fully built FractionalMaxPoolGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FractionalMaxPoolGrad { /// Creates a new `FractionalMaxPoolGrad`. @@ -40656,40 +49487,10 @@ impl FractionalMaxPoolGrad { } /// Builds the `FractionalMaxPoolGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - orig_input: O0, - orig_output: O1, - out_backprop: O2, - row_pooling_sequence: O3, - col_pooling_sequence: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - orig_input.into(), - orig_output.into(), - out_backprop.into(), - row_pooling_sequence.into(), - col_pooling_sequence.into(), - scope, - ) - } - - fn build_impl( - &self, - orig_input: crate::Output, - orig_output: crate::Output, - out_backprop: crate::Output, - row_pooling_sequence: crate::Output, - col_pooling_sequence: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, out_backprop: O2, row_pooling_sequence: O3, col_pooling_sequence: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(orig_input.into(), orig_output.into(), out_backprop.into(), row_pooling_sequence.into(), col_pooling_sequence.into(), scope) + } + fn build_impl(&self, orig_input: crate::Output, orig_output: crate::Output, out_backprop: crate::Output, row_pooling_sequence: crate::Output, col_pooling_sequence: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FractionalMaxPoolGrad", |nd| { nd.add_input(orig_input); nd.add_input(orig_output); @@ -40699,47 +49500,72 @@ impl FractionalMaxPoolGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.overlapping { - nd.set_attr_bool("overlapping", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.overlapping { + nd.set_attr_bool("overlapping", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FractionalMaxPoolGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, out_backprop: O2, row_pooling_sequence: O3, col_pooling_sequence: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(orig_input.into(), orig_output.into(), out_backprop.into(), row_pooling_sequence.into(), col_pooling_sequence.into(), scope) + } + fn build_instance_impl(&self, orig_input: crate::Output, orig_output: crate::Output, out_backprop: crate::Output, row_pooling_sequence: crate::Output, col_pooling_sequence: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FractionalMaxPoolGrad", |nd| { + nd.add_input(orig_input); + nd.add_input(orig_output); + nd.add_input(out_backprop); + nd.add_input(row_pooling_sequence); + nd.add_input(col_pooling_sequence); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.overlapping { + nd.set_attr_bool("overlapping", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FractionalMaxPoolGradInst{op}) + } +} +impl FractionalMaxPoolGradInst { + /// Returns the 'output' output of this 'FractionalMaxPoolGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FractionalMaxPoolGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FractionalMaxPoolGrad::new().build(orig_input, orig_output, out_backprop, row_pooling_sequence, col_pooling_sequence, scope)`. -pub fn fractional_max_pool_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - orig_input: O0, - orig_output: O1, - out_backprop: O2, - row_pooling_sequence: O3, - col_pooling_sequence: O4, - scope: &mut crate::Scope, -) -> crate::Result { - FractionalMaxPoolGrad::new().build( - orig_input, - orig_output, - out_backprop, - row_pooling_sequence, - col_pooling_sequence, - scope, - ) +pub fn fractional_max_pool_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(orig_input: O0, orig_output: O1, out_backprop: O2, row_pooling_sequence: O3, col_pooling_sequence: O4, scope: &mut crate::Scope) -> crate::Result { + FractionalMaxPoolGrad::new().build(orig_input, orig_output, out_backprop, row_pooling_sequence, col_pooling_sequence, scope) } + /// Builder for the `FresnelCos` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FresnelCos { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FresnelCos' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FresnelCosInst { + /// An instance of a fully built FresnelCos Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FresnelCos { /// Creates a new `FresnelCos`. @@ -40760,45 +49586,71 @@ impl FresnelCos { } /// Builds the `FresnelCos` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FresnelCos", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FresnelCos` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FresnelCos", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FresnelCosInst{op}) + } +} +impl FresnelCosInst { + /// Returns the 'y' output of this 'FresnelCos' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FresnelCosInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FresnelCos::new().build(x, scope)`. -pub fn fresnel_cos>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fresnel_cos>(x: O0, scope: &mut crate::Scope) -> crate::Result { FresnelCos::new().build(x, scope) } + /// Builder for the `FresnelSin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FresnelSin { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FresnelSin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FresnelSinInst { + /// An instance of a fully built FresnelSin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FresnelSin { /// Creates a new `FresnelSin`. @@ -40819,39 +49671,59 @@ impl FresnelSin { } /// Builds the `FresnelSin` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FresnelSin", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FresnelSin` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FresnelSin", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FresnelSinInst{op}) + } +} +impl FresnelSinInst { + /// Returns the 'y' output of this 'FresnelSin' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FresnelSinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FresnelSin::new().build(x, scope)`. -pub fn fresnel_sin>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fresnel_sin>(x: O0, scope: &mut crate::Scope) -> crate::Result { FresnelSin::new().build(x, scope) } + /// Builder for the `FusedBatchNorm` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FusedBatchNorm { @@ -40862,6 +49734,12 @@ pub struct FusedBatchNorm { is_training: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FusedBatchNorm' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FusedBatchNormInst { + /// An instance of a fully built FusedBatchNorm Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FusedBatchNorm { /// Creates a new `FusedBatchNorm`. @@ -40882,19 +49760,13 @@ impl FusedBatchNorm { } /// Sets the `exponential_avg_factor` attribute. - pub fn exponential_avg_factor>( - mut self, - value: ArgType, - ) -> Self { + pub fn exponential_avg_factor>(mut self, value: ArgType) -> Self { self.exponential_avg_factor = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -40912,40 +49784,10 @@ impl FusedBatchNorm { } /// Builds the `FusedBatchNorm` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - x: O0, - scale: O1, - offset: O2, - mean: O3, - variance: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - x.into(), - scale.into(), - offset.into(), - mean.into(), - variance.into(), - scope, - ) - } - - fn build_impl( - &self, - x: crate::Output, - scale: crate::Output, - offset: crate::Output, - mean: crate::Output, - variance: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, x: O0, scale: O1, offset: O2, mean: O3, variance: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(x.into(), scale.into(), offset.into(), mean.into(), variance.into(), scope) + } + fn build_impl(&self, x: crate::Output, scale: crate::Output, offset: crate::Output, mean: crate::Output, variance: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FusedBatchNorm", |nd| { nd.add_input(x); nd.add_input(scale); @@ -40955,43 +49797,106 @@ impl FusedBatchNorm { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.epsilon { - nd.set_attr_float("epsilon", *value)?; - } - if let ::std::option::Option::Some(value) = &self.exponential_avg_factor { - nd.set_attr_float("exponential_avg_factor", *value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_training { - nd.set_attr_bool("is_training", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.exponential_avg_factor { + nd.set_attr_float("exponential_avg_factor", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FusedBatchNorm` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, x: O0, scale: O1, offset: O2, mean: O3, variance: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scale.into(), offset.into(), mean.into(), variance.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scale: crate::Output, offset: crate::Output, mean: crate::Output, variance: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FusedBatchNorm", |nd| { + nd.add_input(x); + nd.add_input(scale); + nd.add_input(offset); + nd.add_input(mean); + nd.add_input(variance); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.exponential_avg_factor { + nd.set_attr_float("exponential_avg_factor", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FusedBatchNormInst{op}) + } +} +impl FusedBatchNormInst { + /// Returns the 'y' output of this 'FusedBatchNorm' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'batch_mean' output of this 'FusedBatchNorm' operation. + pub fn batch_mean(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'batch_variance' output of this 'FusedBatchNorm' operation. + pub fn batch_variance(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'reserve_space_1' output of this 'FusedBatchNorm' operation. + pub fn reserve_space_1(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'reserve_space_2' output of this 'FusedBatchNorm' operation. + pub fn reserve_space_2(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } +} +impl Into for FusedBatchNormInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FusedBatchNorm::new().build(x, scale, offset, mean, variance, scope)`. -pub fn fused_batch_norm< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - x: O0, - scale: O1, - offset: O2, - mean: O3, - variance: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fused_batch_norm, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(x: O0, scale: O1, offset: O2, mean: O3, variance: O4, scope: &mut crate::Scope) -> crate::Result { FusedBatchNorm::new().build(x, scale, offset, mean, variance, scope) } + /// Builder for the `FusedBatchNormGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FusedBatchNormGrad { @@ -41001,6 +49906,12 @@ pub struct FusedBatchNormGrad { is_training: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FusedBatchNormGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FusedBatchNormGradInst { + /// An instance of a fully built FusedBatchNormGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FusedBatchNormGrad { /// Creates a new `FusedBatchNormGrad`. @@ -41021,10 +49932,7 @@ impl FusedBatchNormGrad { } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -41042,40 +49950,10 @@ impl FusedBatchNormGrad { } /// Builds the `FusedBatchNormGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - y_backprop: O0, - x: O1, - scale: O2, - reserve_space_1: O3, - reserve_space_2: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - y_backprop.into(), - x.into(), - scale.into(), - reserve_space_1.into(), - reserve_space_2.into(), - scope, - ) - } - - fn build_impl( - &self, - y_backprop: crate::Output, - x: crate::Output, - scale: crate::Output, - reserve_space_1: crate::Output, - reserve_space_2: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, y_backprop: O0, x: O1, scale: O2, reserve_space_1: O3, reserve_space_2: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(y_backprop.into(), x.into(), scale.into(), reserve_space_1.into(), reserve_space_2.into(), scope) + } + fn build_impl(&self, y_backprop: crate::Output, x: crate::Output, scale: crate::Output, reserve_space_1: crate::Output, reserve_space_2: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FusedBatchNormGrad", |nd| { nd.add_input(y_backprop); nd.add_input(x); @@ -41085,47 +49963,100 @@ impl FusedBatchNormGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.epsilon { - nd.set_attr_float("epsilon", *value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_training { - nd.set_attr_bool("is_training", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FusedBatchNormGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, y_backprop: O0, x: O1, scale: O2, reserve_space_1: O3, reserve_space_2: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(y_backprop.into(), x.into(), scale.into(), reserve_space_1.into(), reserve_space_2.into(), scope) + } + fn build_instance_impl(&self, y_backprop: crate::Output, x: crate::Output, scale: crate::Output, reserve_space_1: crate::Output, reserve_space_2: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FusedBatchNormGrad", |nd| { + nd.add_input(y_backprop); + nd.add_input(x); + nd.add_input(scale); + nd.add_input(reserve_space_1); + nd.add_input(reserve_space_2); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FusedBatchNormGradInst{op}) + } +} +impl FusedBatchNormGradInst { + /// Returns the 'x_backprop' output of this 'FusedBatchNormGrad' operation. + pub fn x_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'scale_backprop' output of this 'FusedBatchNormGrad' operation. + pub fn scale_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'offset_backprop' output of this 'FusedBatchNormGrad' operation. + pub fn offset_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'reserve_space_3' output of this 'FusedBatchNormGrad' operation. + pub fn reserve_space_3(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'reserve_space_4' output of this 'FusedBatchNormGrad' operation. + pub fn reserve_space_4(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } +} +impl Into for FusedBatchNormGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FusedBatchNormGrad::new().build(y_backprop, x, scale, reserve_space_1, reserve_space_2, scope)`. -pub fn fused_batch_norm_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - y_backprop: O0, - x: O1, - scale: O2, - reserve_space_1: O3, - reserve_space_2: O4, - scope: &mut crate::Scope, -) -> crate::Result { - FusedBatchNormGrad::new().build( - y_backprop, - x, - scale, - reserve_space_1, - reserve_space_2, - scope, - ) +pub fn fused_batch_norm_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(y_backprop: O0, x: O1, scale: O2, reserve_space_1: O3, reserve_space_2: O4, scope: &mut crate::Scope) -> crate::Result { + FusedBatchNormGrad::new().build(y_backprop, x, scale, reserve_space_1, reserve_space_2, scope) } + /// Builder for the `FusedBatchNormGradV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FusedBatchNormGradV2 { @@ -41136,6 +50067,12 @@ pub struct FusedBatchNormGradV2 { is_training: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FusedBatchNormGradV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FusedBatchNormGradV2Inst { + /// An instance of a fully built FusedBatchNormGradV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FusedBatchNormGradV2 { /// Creates a new `FusedBatchNormGradV2`. @@ -41162,10 +50099,7 @@ impl FusedBatchNormGradV2 { } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -41183,40 +50117,10 @@ impl FusedBatchNormGradV2 { } /// Builds the `FusedBatchNormGradV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - y_backprop: O0, - x: O1, - scale: O2, - reserve_space_1: O3, - reserve_space_2: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - y_backprop.into(), - x.into(), - scale.into(), - reserve_space_1.into(), - reserve_space_2.into(), - scope, - ) - } - - fn build_impl( - &self, - y_backprop: crate::Output, - x: crate::Output, - scale: crate::Output, - reserve_space_1: crate::Output, - reserve_space_2: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, y_backprop: O0, x: O1, scale: O2, reserve_space_1: O3, reserve_space_2: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(y_backprop.into(), x.into(), scale.into(), reserve_space_1.into(), reserve_space_2.into(), scope) + } + fn build_impl(&self, y_backprop: crate::Output, x: crate::Output, scale: crate::Output, reserve_space_1: crate::Output, reserve_space_2: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FusedBatchNormGradV2", |nd| { nd.add_input(y_backprop); nd.add_input(x); @@ -41226,50 +50130,106 @@ impl FusedBatchNormGradV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.U { - nd.set_attr_type("U", *value)?; - } - if let ::std::option::Option::Some(value) = &self.epsilon { - nd.set_attr_float("epsilon", *value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_training { - nd.set_attr_bool("is_training", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.U { + nd.set_attr_type("U", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FusedBatchNormGradV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, y_backprop: O0, x: O1, scale: O2, reserve_space_1: O3, reserve_space_2: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(y_backprop.into(), x.into(), scale.into(), reserve_space_1.into(), reserve_space_2.into(), scope) + } + fn build_instance_impl(&self, y_backprop: crate::Output, x: crate::Output, scale: crate::Output, reserve_space_1: crate::Output, reserve_space_2: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FusedBatchNormGradV2", |nd| { + nd.add_input(y_backprop); + nd.add_input(x); + nd.add_input(scale); + nd.add_input(reserve_space_1); + nd.add_input(reserve_space_2); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.U { + nd.set_attr_type("U", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FusedBatchNormGradV2Inst{op}) + } +} +impl FusedBatchNormGradV2Inst { + /// Returns the 'x_backprop' output of this 'FusedBatchNormGradV2' operation. + pub fn x_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'scale_backprop' output of this 'FusedBatchNormGradV2' operation. + pub fn scale_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'offset_backprop' output of this 'FusedBatchNormGradV2' operation. + pub fn offset_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'reserve_space_3' output of this 'FusedBatchNormGradV2' operation. + pub fn reserve_space_3(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'reserve_space_4' output of this 'FusedBatchNormGradV2' operation. + pub fn reserve_space_4(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } +} +impl Into for FusedBatchNormGradV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FusedBatchNormGradV2::new().build(y_backprop, x, scale, reserve_space_1, reserve_space_2, scope)`. -pub fn fused_batch_norm_grad_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - y_backprop: O0, - x: O1, - scale: O2, - reserve_space_1: O3, - reserve_space_2: O4, - scope: &mut crate::Scope, -) -> crate::Result { - FusedBatchNormGradV2::new().build( - y_backprop, - x, - scale, - reserve_space_1, - reserve_space_2, - scope, - ) +pub fn fused_batch_norm_grad_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(y_backprop: O0, x: O1, scale: O2, reserve_space_1: O3, reserve_space_2: O4, scope: &mut crate::Scope) -> crate::Result { + FusedBatchNormGradV2::new().build(y_backprop, x, scale, reserve_space_1, reserve_space_2, scope) } + /// Builder for the `FusedBatchNormGradV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FusedBatchNormGradV3 { @@ -41280,6 +50240,12 @@ pub struct FusedBatchNormGradV3 { is_training: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FusedBatchNormGradV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FusedBatchNormGradV3Inst { + /// An instance of a fully built FusedBatchNormGradV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FusedBatchNormGradV3 { /// Creates a new `FusedBatchNormGradV3`. @@ -41306,10 +50272,7 @@ impl FusedBatchNormGradV3 { } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -41327,44 +50290,10 @@ impl FusedBatchNormGradV3 { } /// Builds the `FusedBatchNormGradV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - y_backprop: O0, - x: O1, - scale: O2, - reserve_space_1: O3, - reserve_space_2: O4, - reserve_space_3: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - y_backprop.into(), - x.into(), - scale.into(), - reserve_space_1.into(), - reserve_space_2.into(), - reserve_space_3.into(), - scope, - ) - } - - fn build_impl( - &self, - y_backprop: crate::Output, - x: crate::Output, - scale: crate::Output, - reserve_space_1: crate::Output, - reserve_space_2: crate::Output, - reserve_space_3: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, y_backprop: O0, x: O1, scale: O2, reserve_space_1: O3, reserve_space_2: O4, reserve_space_3: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(y_backprop.into(), x.into(), scale.into(), reserve_space_1.into(), reserve_space_2.into(), reserve_space_3.into(), scope) + } + fn build_impl(&self, y_backprop: crate::Output, x: crate::Output, scale: crate::Output, reserve_space_1: crate::Output, reserve_space_2: crate::Output, reserve_space_3: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FusedBatchNormGradV3", |nd| { nd.add_input(y_backprop); nd.add_input(x); @@ -41375,53 +50304,107 @@ impl FusedBatchNormGradV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.U { - nd.set_attr_type("U", *value)?; - } - if let ::std::option::Option::Some(value) = &self.epsilon { - nd.set_attr_float("epsilon", *value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_training { - nd.set_attr_bool("is_training", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.U { + nd.set_attr_type("U", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FusedBatchNormGradV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, y_backprop: O0, x: O1, scale: O2, reserve_space_1: O3, reserve_space_2: O4, reserve_space_3: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(y_backprop.into(), x.into(), scale.into(), reserve_space_1.into(), reserve_space_2.into(), reserve_space_3.into(), scope) + } + fn build_instance_impl(&self, y_backprop: crate::Output, x: crate::Output, scale: crate::Output, reserve_space_1: crate::Output, reserve_space_2: crate::Output, reserve_space_3: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FusedBatchNormGradV3", |nd| { + nd.add_input(y_backprop); + nd.add_input(x); + nd.add_input(scale); + nd.add_input(reserve_space_1); + nd.add_input(reserve_space_2); + nd.add_input(reserve_space_3); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.U { + nd.set_attr_type("U", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FusedBatchNormGradV3Inst{op}) + } +} +impl FusedBatchNormGradV3Inst { + /// Returns the 'x_backprop' output of this 'FusedBatchNormGradV3' operation. + pub fn x_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'scale_backprop' output of this 'FusedBatchNormGradV3' operation. + pub fn scale_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'offset_backprop' output of this 'FusedBatchNormGradV3' operation. + pub fn offset_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'reserve_space_4' output of this 'FusedBatchNormGradV3' operation. + pub fn reserve_space_4(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'reserve_space_5' output of this 'FusedBatchNormGradV3' operation. + pub fn reserve_space_5(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } +} +impl Into for FusedBatchNormGradV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FusedBatchNormGradV3::new().build(y_backprop, x, scale, reserve_space_1, reserve_space_2, reserve_space_3, scope)`. -pub fn fused_batch_norm_grad_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - y_backprop: O0, - x: O1, - scale: O2, - reserve_space_1: O3, - reserve_space_2: O4, - reserve_space_3: O5, - scope: &mut crate::Scope, -) -> crate::Result { - FusedBatchNormGradV3::new().build( - y_backprop, - x, - scale, - reserve_space_1, - reserve_space_2, - reserve_space_3, - scope, - ) +pub fn fused_batch_norm_grad_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(y_backprop: O0, x: O1, scale: O2, reserve_space_1: O3, reserve_space_2: O4, reserve_space_3: O5, scope: &mut crate::Scope) -> crate::Result { + FusedBatchNormGradV3::new().build(y_backprop, x, scale, reserve_space_1, reserve_space_2, reserve_space_3, scope) } + /// Builder for the `FusedBatchNormV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FusedBatchNormV2 { @@ -41433,6 +50416,12 @@ pub struct FusedBatchNormV2 { is_training: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FusedBatchNormV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FusedBatchNormV2Inst { + /// An instance of a fully built FusedBatchNormV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FusedBatchNormV2 { /// Creates a new `FusedBatchNormV2`. @@ -41459,19 +50448,13 @@ impl FusedBatchNormV2 { } /// Sets the `exponential_avg_factor` attribute. - pub fn exponential_avg_factor>( - mut self, - value: ArgType, - ) -> Self { + pub fn exponential_avg_factor>(mut self, value: ArgType) -> Self { self.exponential_avg_factor = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -41489,40 +50472,10 @@ impl FusedBatchNormV2 { } /// Builds the `FusedBatchNormV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - x: O0, - scale: O1, - offset: O2, - mean: O3, - variance: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - x.into(), - scale.into(), - offset.into(), - mean.into(), - variance.into(), - scope, - ) - } - - fn build_impl( - &self, - x: crate::Output, - scale: crate::Output, - offset: crate::Output, - mean: crate::Output, - variance: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, x: O0, scale: O1, offset: O2, mean: O3, variance: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(x.into(), scale.into(), offset.into(), mean.into(), variance.into(), scope) + } + fn build_impl(&self, x: crate::Output, scale: crate::Output, offset: crate::Output, mean: crate::Output, variance: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FusedBatchNormV2", |nd| { nd.add_input(x); nd.add_input(scale); @@ -41532,46 +50485,112 @@ impl FusedBatchNormV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.U { - nd.set_attr_type("U", *value)?; - } - if let ::std::option::Option::Some(value) = &self.epsilon { - nd.set_attr_float("epsilon", *value)?; - } - if let ::std::option::Option::Some(value) = &self.exponential_avg_factor { - nd.set_attr_float("exponential_avg_factor", *value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_training { - nd.set_attr_bool("is_training", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.U { + nd.set_attr_type("U", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.exponential_avg_factor { + nd.set_attr_float("exponential_avg_factor", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FusedBatchNormV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, x: O0, scale: O1, offset: O2, mean: O3, variance: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scale.into(), offset.into(), mean.into(), variance.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scale: crate::Output, offset: crate::Output, mean: crate::Output, variance: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FusedBatchNormV2", |nd| { + nd.add_input(x); + nd.add_input(scale); + nd.add_input(offset); + nd.add_input(mean); + nd.add_input(variance); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.U { + nd.set_attr_type("U", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.exponential_avg_factor { + nd.set_attr_float("exponential_avg_factor", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FusedBatchNormV2Inst{op}) + } +} +impl FusedBatchNormV2Inst { + /// Returns the 'y' output of this 'FusedBatchNormV2' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'batch_mean' output of this 'FusedBatchNormV2' operation. + pub fn batch_mean(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'batch_variance' output of this 'FusedBatchNormV2' operation. + pub fn batch_variance(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'reserve_space_1' output of this 'FusedBatchNormV2' operation. + pub fn reserve_space_1(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'reserve_space_2' output of this 'FusedBatchNormV2' operation. + pub fn reserve_space_2(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } +} +impl Into for FusedBatchNormV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FusedBatchNormV2::new().build(x, scale, offset, mean, variance, scope)`. -pub fn fused_batch_norm_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - x: O0, - scale: O1, - offset: O2, - mean: O3, - variance: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fused_batch_norm_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(x: O0, scale: O1, offset: O2, mean: O3, variance: O4, scope: &mut crate::Scope) -> crate::Result { FusedBatchNormV2::new().build(x, scale, offset, mean, variance, scope) } + /// Builder for the `FusedBatchNormV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FusedBatchNormV3 { @@ -41583,6 +50602,12 @@ pub struct FusedBatchNormV3 { is_training: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'FusedBatchNormV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FusedBatchNormV3Inst { + /// An instance of a fully built FusedBatchNormV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FusedBatchNormV3 { /// Creates a new `FusedBatchNormV3`. @@ -41609,19 +50634,13 @@ impl FusedBatchNormV3 { } /// Sets the `exponential_avg_factor` attribute. - pub fn exponential_avg_factor>( - mut self, - value: ArgType, - ) -> Self { + pub fn exponential_avg_factor>(mut self, value: ArgType) -> Self { self.exponential_avg_factor = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -41639,40 +50658,10 @@ impl FusedBatchNormV3 { } /// Builds the `FusedBatchNormV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - x: O0, - scale: O1, - offset: O2, - mean: O3, - variance: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - x.into(), - scale.into(), - offset.into(), - mean.into(), - variance.into(), - scope, - ) - } - - fn build_impl( - &self, - x: crate::Output, - scale: crate::Output, - offset: crate::Output, - mean: crate::Output, - variance: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, x: O0, scale: O1, offset: O2, mean: O3, variance: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(x.into(), scale.into(), offset.into(), mean.into(), variance.into(), scope) + } + fn build_impl(&self, x: crate::Output, scale: crate::Output, offset: crate::Output, mean: crate::Output, variance: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FusedBatchNormV3", |nd| { nd.add_input(x); nd.add_input(scale); @@ -41682,46 +50671,119 @@ impl FusedBatchNormV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.U { - nd.set_attr_type("U", *value)?; - } - if let ::std::option::Option::Some(value) = &self.epsilon { - nd.set_attr_float("epsilon", *value)?; - } - if let ::std::option::Option::Some(value) = &self.exponential_avg_factor { - nd.set_attr_float("exponential_avg_factor", *value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_training { - nd.set_attr_bool("is_training", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.U { + nd.set_attr_type("U", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.exponential_avg_factor { + nd.set_attr_float("exponential_avg_factor", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FusedBatchNormV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, x: O0, scale: O1, offset: O2, mean: O3, variance: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scale.into(), offset.into(), mean.into(), variance.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scale: crate::Output, offset: crate::Output, mean: crate::Output, variance: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FusedBatchNormV3", |nd| { + nd.add_input(x); + nd.add_input(scale); + nd.add_input(offset); + nd.add_input(mean); + nd.add_input(variance); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.U { + nd.set_attr_type("U", *value)?; + } + if let ::std::option::Option::Some(value) = &self.epsilon { + nd.set_attr_float("epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.exponential_avg_factor { + nd.set_attr_float("exponential_avg_factor", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_training { + nd.set_attr_bool("is_training", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FusedBatchNormV3Inst{op}) + } +} +impl FusedBatchNormV3Inst { + /// Returns the 'y' output of this 'FusedBatchNormV3' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'batch_mean' output of this 'FusedBatchNormV3' operation. + pub fn batch_mean(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'batch_variance' output of this 'FusedBatchNormV3' operation. + pub fn batch_variance(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'reserve_space_1' output of this 'FusedBatchNormV3' operation. + pub fn reserve_space_1(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'reserve_space_2' output of this 'FusedBatchNormV3' operation. + pub fn reserve_space_2(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } + /// Returns the 'reserve_space_3' output of this 'FusedBatchNormV3' operation. + pub fn reserve_space_3(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 5 + } + } +} +impl Into for FusedBatchNormV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FusedBatchNormV3::new().build(x, scale, offset, mean, variance, scope)`. -pub fn fused_batch_norm_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - x: O0, - scale: O1, - offset: O2, - mean: O3, - variance: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fused_batch_norm_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(x: O0, scale: O1, offset: O2, mean: O3, variance: O4, scope: &mut crate::Scope) -> crate::Result { FusedBatchNormV3::new().build(x, scale, offset, mean, variance, scope) } + /// Builder for the `FusedPadConv2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FusedPadConv2D { @@ -41731,6 +50793,12 @@ pub struct FusedPadConv2D { padding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FusedPadConv2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FusedPadConv2DInst { + /// An instance of a fully built FusedPadConv2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FusedPadConv2D { /// Creates a new `FusedPadConv2D`. @@ -41745,28 +50813,19 @@ impl FusedPadConv2D { } /// Sets the `mode` attribute. - pub fn mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn mode>(mut self, value: ArgType) -> Self { self.mode = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } @@ -41778,27 +50837,10 @@ impl FusedPadConv2D { } /// Builds the `FusedPadConv2D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - paddings: O1, - filter: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, paddings: O1, filter: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), paddings.into(), filter.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - paddings: crate::Output, - filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, paddings: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FusedPadConv2D", |nd| { nd.add_input(input); nd.add_input(paddings); @@ -41806,36 +50848,70 @@ impl FusedPadConv2D { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.mode { - nd.set_attr_string("mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FusedPadConv2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, paddings: O1, filter: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), paddings.into(), filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, paddings: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FusedPadConv2D", |nd| { + nd.add_input(input); + nd.add_input(paddings); + nd.add_input(filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FusedPadConv2DInst{op}) + } +} +impl FusedPadConv2DInst { + /// Returns the 'output' output of this 'FusedPadConv2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FusedPadConv2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FusedPadConv2D::new().build(input, paddings, filter, scope)`. -pub fn fused_pad_conv2_d< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - paddings: O1, - filter: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fused_pad_conv2_d, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, paddings: O1, filter: O2, scope: &mut crate::Scope) -> crate::Result { FusedPadConv2D::new().build(input, paddings, filter, scope) } + /// Builder for the `FusedResizeAndPadConv2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct FusedResizeAndPadConv2D { @@ -41846,6 +50922,12 @@ pub struct FusedResizeAndPadConv2D { padding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'FusedResizeAndPadConv2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct FusedResizeAndPadConv2DInst { + /// An instance of a fully built FusedResizeAndPadConv2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl FusedResizeAndPadConv2D { /// Creates a new `FusedResizeAndPadConv2D`. @@ -41860,37 +50942,25 @@ impl FusedResizeAndPadConv2D { } /// Sets the `resize_align_corners` attribute. - pub fn resize_align_corners>( - mut self, - value: ArgType, - ) -> Self { + pub fn resize_align_corners>(mut self, value: ArgType) -> Self { self.resize_align_corners = ::std::option::Option::Some(value.into()); self } /// Sets the `mode` attribute. - pub fn mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn mode>(mut self, value: ArgType) -> Self { self.mode = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } @@ -41902,36 +50972,10 @@ impl FusedResizeAndPadConv2D { } /// Builds the `FusedResizeAndPadConv2D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input: O0, - size: O1, - paddings: O2, - filter: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - size.into(), - paddings.into(), - filter.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - size: crate::Output, - paddings: crate::Output, - filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, size: O1, paddings: O2, filter: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), size.into(), paddings.into(), filter.into(), scope) + } + fn build_impl(&self, input: crate::Output, size: crate::Output, paddings: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("FusedResizeAndPadConv2D", |nd| { nd.add_input(input); nd.add_input(size); @@ -41940,47 +50984,89 @@ impl FusedResizeAndPadConv2D { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.resize_align_corners { - nd.set_attr_bool("resize_align_corners", *value)?; - } - if let ::std::option::Option::Some(value) = &self.mode { - nd.set_attr_string("mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.resize_align_corners { + nd.set_attr_bool("resize_align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `FusedResizeAndPadConv2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, size: O1, paddings: O2, filter: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), size.into(), paddings.into(), filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, size: crate::Output, paddings: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("FusedResizeAndPadConv2D", |nd| { + nd.add_input(input); + nd.add_input(size); + nd.add_input(paddings); + nd.add_input(filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.resize_align_corners { + nd.set_attr_bool("resize_align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(FusedResizeAndPadConv2DInst{op}) + } +} +impl FusedResizeAndPadConv2DInst { + /// Returns the 'output' output of this 'FusedResizeAndPadConv2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for FusedResizeAndPadConv2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `FusedResizeAndPadConv2D::new().build(input, size, paddings, filter, scope)`. -pub fn fused_resize_and_pad_conv2_d< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input: O0, - size: O1, - paddings: O2, - filter: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn fused_resize_and_pad_conv2_d, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input: O0, size: O1, paddings: O2, filter: O3, scope: &mut crate::Scope) -> crate::Result { FusedResizeAndPadConv2D::new().build(input, size, paddings, filter, scope) } + /// Builder for the `GRUBlockCell` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GRUBlockCell { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GRUBlockCell' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GRUBlockCellInst { + /// An instance of a fully built GRUBlockCell Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GRUBlockCell { /// Creates a new `GRUBlockCell`. @@ -42001,44 +51087,10 @@ impl GRUBlockCell { } /// Builds the `GRUBlockCell` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - x: O0, - h_prev: O1, - w_ru: O2, - w_c: O3, - b_ru: O4, - b_c: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - x.into(), - h_prev.into(), - w_ru.into(), - w_c.into(), - b_ru.into(), - b_c.into(), - scope, - ) - } - - fn build_impl( - &self, - x: crate::Output, - h_prev: crate::Output, - w_ru: crate::Output, - w_c: crate::Output, - b_ru: crate::Output, - b_c: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, x: O0, h_prev: O1, w_ru: O2, w_c: O3, b_ru: O4, b_c: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(x.into(), h_prev.into(), w_ru.into(), w_c.into(), b_ru.into(), b_c.into(), scope) + } + fn build_impl(&self, x: crate::Output, h_prev: crate::Output, w_ru: crate::Output, w_c: crate::Output, b_ru: crate::Output, b_c: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GRUBlockCell", |nd| { nd.add_input(x); nd.add_input(h_prev); @@ -42049,39 +51101,88 @@ impl GRUBlockCell { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GRUBlockCell` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, x: O0, h_prev: O1, w_ru: O2, w_c: O3, b_ru: O4, b_c: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), h_prev.into(), w_ru.into(), w_c.into(), b_ru.into(), b_c.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, h_prev: crate::Output, w_ru: crate::Output, w_c: crate::Output, b_ru: crate::Output, b_c: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GRUBlockCell", |nd| { + nd.add_input(x); + nd.add_input(h_prev); + nd.add_input(w_ru); + nd.add_input(w_c); + nd.add_input(b_ru); + nd.add_input(b_c); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GRUBlockCellInst{op}) + } +} +impl GRUBlockCellInst { + /// Returns the 'r' output of this 'GRUBlockCell' operation. + pub fn r(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'u' output of this 'GRUBlockCell' operation. + pub fn u(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'c' output of this 'GRUBlockCell' operation. + pub fn c(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'h' output of this 'GRUBlockCell' operation. + pub fn h(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for GRUBlockCellInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GRUBlockCell::new().build(x, h_prev, w_ru, w_c, b_ru, b_c, scope)`. -pub fn grublock_cell< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - x: O0, - h_prev: O1, - w_ru: O2, - w_c: O3, - b_ru: O4, - b_c: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn grublock_cell, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(x: O0, h_prev: O1, w_ru: O2, w_c: O3, b_ru: O4, b_c: O5, scope: &mut crate::Scope) -> crate::Result { GRUBlockCell::new().build(x, h_prev, w_ru, w_c, b_ru, b_c, scope) } + /// Builder for the `GRUBlockCellGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GRUBlockCellGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GRUBlockCellGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GRUBlockCellGradInst { + /// An instance of a fully built GRUBlockCellGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GRUBlockCellGrad { /// Creates a new `GRUBlockCellGrad`. @@ -42102,60 +51203,10 @@ impl GRUBlockCellGrad { } /// Builds the `GRUBlockCellGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - x: O0, - h_prev: O1, - w_ru: O2, - w_c: O3, - b_ru: O4, - b_c: O5, - r: O6, - u: O7, - c: O8, - d_h: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - x.into(), - h_prev.into(), - w_ru.into(), - w_c.into(), - b_ru.into(), - b_c.into(), - r.into(), - u.into(), - c.into(), - d_h.into(), - scope, - ) - } - - fn build_impl( - &self, - x: crate::Output, - h_prev: crate::Output, - w_ru: crate::Output, - w_c: crate::Output, - b_ru: crate::Output, - b_c: crate::Output, - r: crate::Output, - u: crate::Output, - c: crate::Output, - d_h: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, x: O0, h_prev: O1, w_ru: O2, w_c: O3, b_ru: O4, b_c: O5, r: O6, u: O7, c: O8, d_h: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(x.into(), h_prev.into(), w_ru.into(), w_c.into(), b_ru.into(), b_c.into(), r.into(), u.into(), c.into(), d_h.into(), scope) + } + fn build_impl(&self, x: crate::Output, h_prev: crate::Output, w_ru: crate::Output, w_c: crate::Output, b_ru: crate::Output, b_c: crate::Output, r: crate::Output, u: crate::Output, c: crate::Output, d_h: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GRUBlockCellGrad", |nd| { nd.add_input(x); nd.add_input(h_prev); @@ -42170,41 +51221,80 @@ impl GRUBlockCellGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GRUBlockCellGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, x: O0, h_prev: O1, w_ru: O2, w_c: O3, b_ru: O4, b_c: O5, r: O6, u: O7, c: O8, d_h: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), h_prev.into(), w_ru.into(), w_c.into(), b_ru.into(), b_c.into(), r.into(), u.into(), c.into(), d_h.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, h_prev: crate::Output, w_ru: crate::Output, w_c: crate::Output, b_ru: crate::Output, b_c: crate::Output, r: crate::Output, u: crate::Output, c: crate::Output, d_h: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GRUBlockCellGrad", |nd| { + nd.add_input(x); + nd.add_input(h_prev); + nd.add_input(w_ru); + nd.add_input(w_c); + nd.add_input(b_ru); + nd.add_input(b_c); + nd.add_input(r); + nd.add_input(u); + nd.add_input(c); + nd.add_input(d_h); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GRUBlockCellGradInst{op}) + } +} +impl GRUBlockCellGradInst { + /// Returns the 'd_x' output of this 'GRUBlockCellGrad' operation. + pub fn d_x(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'd_h_prev' output of this 'GRUBlockCellGrad' operation. + pub fn d_h_prev(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'd_c_bar' output of this 'GRUBlockCellGrad' operation. + pub fn d_c_bar(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'd_r_bar_u_bar' output of this 'GRUBlockCellGrad' operation. + pub fn d_r_bar_u_bar(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for GRUBlockCellGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GRUBlockCellGrad::new().build(x, h_prev, w_ru, w_c, b_ru, b_c, r, u, c, d_h, scope)`. -pub fn grublock_cell_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - x: O0, - h_prev: O1, - w_ru: O2, - w_c: O3, - b_ru: O4, - b_c: O5, - r: O6, - u: O7, - c: O8, - d_h: O9, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn grublock_cell_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(x: O0, h_prev: O1, w_ru: O2, w_c: O3, b_ru: O4, b_c: O5, r: O6, u: O7, c: O8, d_h: O9, scope: &mut crate::Scope) -> crate::Result { GRUBlockCellGrad::new().build(x, h_prev, w_ru, w_c, b_ru, b_c, r, u, c, d_h, scope) } + /// Builder for the `Gather` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Gather { @@ -42213,6 +51303,12 @@ pub struct Gather { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Gather' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GatherInst { + /// An instance of a fully built Gather Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Gather { /// Creates a new `Gather`. @@ -42227,19 +51323,13 @@ impl Gather { } /// Sets the `Tparams` attribute. - pub fn Tparams>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tparams>(mut self, value: ArgType) -> Self { self.Tparams = ::std::option::Option::Some(value.into()); self } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -42251,52 +51341,73 @@ impl Gather { } /// Builds the `Gather` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - params: O0, - indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, params: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(params.into(), indices.into(), scope) } - - fn build_impl( - &self, - params: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, params: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Gather", |nd| { nd.add_input(params); nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.validate_indices { - nd.set_attr_bool("validate_indices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tparams { - nd.set_attr_type("Tparams", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tparams { + nd.set_attr_type("Tparams", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Gather` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, params: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(params.into(), indices.into(), scope) + } + fn build_instance_impl(&self, params: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Gather", |nd| { + nd.add_input(params); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tparams { + nd.set_attr_type("Tparams", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GatherInst{op}) + } +} +impl GatherInst { + /// Returns the 'output' output of this 'Gather' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GatherInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Gather::new().build(params, indices, scope)`. -pub fn gather, O1: ::std::convert::Into>( - params: O0, - indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn gather, O1: ::std::convert::Into>(params: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { Gather::new().build(params, indices, scope) } + /// Builder for the `GatherNd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GatherNd { @@ -42304,6 +51415,12 @@ pub struct GatherNd { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GatherNd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GatherNdInst { + /// An instance of a fully built GatherNd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GatherNd { /// Creates a new `GatherNd`. @@ -42312,19 +51429,13 @@ impl GatherNd { } /// Sets the `Tparams` attribute. - pub fn Tparams>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tparams>(mut self, value: ArgType) -> Self { self.Tparams = ::std::option::Option::Some(value.into()); self } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -42336,52 +51447,67 @@ impl GatherNd { } /// Builds the `GatherNd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - params: O0, - indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, params: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(params.into(), indices.into(), scope) } - - fn build_impl( - &self, - params: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, params: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GatherNd", |nd| { nd.add_input(params); nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tparams { - nd.set_attr_type("Tparams", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tparams { + nd.set_attr_type("Tparams", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GatherNd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, params: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(params.into(), indices.into(), scope) + } + fn build_instance_impl(&self, params: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GatherNd", |nd| { + nd.add_input(params); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tparams { + nd.set_attr_type("Tparams", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GatherNdInst{op}) + } +} +impl GatherNdInst { + /// Returns the 'output' output of this 'GatherNd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GatherNdInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GatherNd::new().build(params, indices, scope)`. -pub fn gather_nd< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - params: O0, - indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn gather_nd, O1: ::std::convert::Into>(params: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { GatherNd::new().build(params, indices, scope) } + /// Builder for the `GatherV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GatherV2 { @@ -42391,6 +51517,12 @@ pub struct GatherV2 { Taxis: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GatherV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GatherV2Inst { + /// An instance of a fully built GatherV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GatherV2 { /// Creates a new `GatherV2`. @@ -42405,19 +51537,13 @@ impl GatherV2 { } /// Sets the `Tparams` attribute. - pub fn Tparams>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tparams>(mut self, value: ArgType) -> Self { self.Tparams = ::std::option::Option::Some(value.into()); self } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -42435,27 +51561,10 @@ impl GatherV2 { } /// Builds the `GatherV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - params: O0, - indices: O1, - axis: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, params: O0, indices: O1, axis: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(params.into(), indices.into(), axis.into(), scope) } - - fn build_impl( - &self, - params: crate::Output, - indices: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, params: crate::Output, indices: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GatherV2", |nd| { nd.add_input(params); nd.add_input(indices); @@ -42463,42 +51572,82 @@ impl GatherV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.batch_dims { - nd.set_attr_int("batch_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tparams { - nd.set_attr_type("Tparams", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Taxis { - nd.set_attr_type("Taxis", *value)?; - } + if let ::std::option::Option::Some(value) = &self.batch_dims { + nd.set_attr_int("batch_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tparams { + nd.set_attr_type("Tparams", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Taxis { + nd.set_attr_type("Taxis", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GatherV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, params: O0, indices: O1, axis: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(params.into(), indices.into(), axis.into(), scope) + } + fn build_instance_impl(&self, params: crate::Output, indices: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GatherV2", |nd| { + nd.add_input(params); + nd.add_input(indices); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.batch_dims { + nd.set_attr_int("batch_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tparams { + nd.set_attr_type("Tparams", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Taxis { + nd.set_attr_type("Taxis", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GatherV2Inst{op}) + } +} +impl GatherV2Inst { + /// Returns the 'output' output of this 'GatherV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GatherV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GatherV2::new().build(params, indices, axis, scope)`. -pub fn gather_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - params: O0, - indices: O1, - axis: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn gather_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(params: O0, indices: O1, axis: O2, scope: &mut crate::Scope) -> crate::Result { GatherV2::new().build(params, indices, axis, scope) } + /// Builder for the `GenerateBoundingBoxProposals` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GenerateBoundingBoxProposals { post_nms_topn: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GenerateBoundingBoxProposals' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GenerateBoundingBoxProposalsInst { + /// An instance of a fully built GenerateBoundingBoxProposals Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GenerateBoundingBoxProposals { /// Creates a new `GenerateBoundingBoxProposals`. @@ -42519,48 +51668,10 @@ impl GenerateBoundingBoxProposals { } /// Builds the `GenerateBoundingBoxProposals` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - scores: O0, - bbox_deltas: O1, - image_info: O2, - anchors: O3, - nms_threshold: O4, - pre_nms_topn: O5, - min_size: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - scores.into(), - bbox_deltas.into(), - image_info.into(), - anchors.into(), - nms_threshold.into(), - pre_nms_topn.into(), - min_size.into(), - scope, - ) - } - - fn build_impl( - &self, - scores: crate::Output, - bbox_deltas: crate::Output, - image_info: crate::Output, - anchors: crate::Output, - nms_threshold: crate::Output, - pre_nms_topn: crate::Output, - min_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, scores: O0, bbox_deltas: O1, image_info: O2, anchors: O3, nms_threshold: O4, pre_nms_topn: O5, min_size: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(scores.into(), bbox_deltas.into(), image_info.into(), anchors.into(), nms_threshold.into(), pre_nms_topn.into(), min_size.into(), scope) + } + fn build_impl(&self, scores: crate::Output, bbox_deltas: crate::Output, image_info: crate::Output, anchors: crate::Output, nms_threshold: crate::Output, pre_nms_topn: crate::Output, min_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GenerateBoundingBoxProposals", |nd| { nd.add_input(scores); nd.add_input(bbox_deltas); @@ -42572,44 +51683,63 @@ impl GenerateBoundingBoxProposals { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.post_nms_topn { - nd.set_attr_int("post_nms_topn", *value)?; - } + if let ::std::option::Option::Some(value) = &self.post_nms_topn { + nd.set_attr_int("post_nms_topn", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GenerateBoundingBoxProposals` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, scores: O0, bbox_deltas: O1, image_info: O2, anchors: O3, nms_threshold: O4, pre_nms_topn: O5, min_size: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scores.into(), bbox_deltas.into(), image_info.into(), anchors.into(), nms_threshold.into(), pre_nms_topn.into(), min_size.into(), scope) + } + fn build_instance_impl(&self, scores: crate::Output, bbox_deltas: crate::Output, image_info: crate::Output, anchors: crate::Output, nms_threshold: crate::Output, pre_nms_topn: crate::Output, min_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GenerateBoundingBoxProposals", |nd| { + nd.add_input(scores); + nd.add_input(bbox_deltas); + nd.add_input(image_info); + nd.add_input(anchors); + nd.add_input(nms_threshold); + nd.add_input(pre_nms_topn); + nd.add_input(min_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.post_nms_topn { + nd.set_attr_int("post_nms_topn", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GenerateBoundingBoxProposalsInst{op}) + } +} +impl GenerateBoundingBoxProposalsInst { + /// Returns the 'rois' output of this 'GenerateBoundingBoxProposals' operation. + pub fn rois(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'roi_probabilities' output of this 'GenerateBoundingBoxProposals' operation. + pub fn roi_probabilities(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for GenerateBoundingBoxProposalsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GenerateBoundingBoxProposals::new().build(scores, bbox_deltas, image_info, anchors, nms_threshold, pre_nms_topn, min_size, scope)`. -pub fn generate_bounding_box_proposals< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - scores: O0, - bbox_deltas: O1, - image_info: O2, - anchors: O3, - nms_threshold: O4, - pre_nms_topn: O5, - min_size: O6, - scope: &mut crate::Scope, -) -> crate::Result { - GenerateBoundingBoxProposals::new().build( - scores, - bbox_deltas, - image_info, - anchors, - nms_threshold, - pre_nms_topn, - min_size, - scope, - ) +pub fn generate_bounding_box_proposals, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(scores: O0, bbox_deltas: O1, image_info: O2, anchors: O3, nms_threshold: O4, pre_nms_topn: O5, min_size: O6, scope: &mut crate::Scope) -> crate::Result { + GenerateBoundingBoxProposals::new().build(scores, bbox_deltas, image_info, anchors, nms_threshold, pre_nms_topn, min_size, scope) } + /// Builder for the `GenerateVocabRemapping` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GenerateVocabRemapping { @@ -42618,6 +51748,12 @@ pub struct GenerateVocabRemapping { old_vocab_size: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GenerateVocabRemapping' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GenerateVocabRemappingInst { + /// An instance of a fully built GenerateVocabRemapping Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GenerateVocabRemapping { /// Creates a new `GenerateVocabRemapping`. @@ -42650,55 +51786,80 @@ impl GenerateVocabRemapping { } /// Builds the `GenerateVocabRemapping` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - new_vocab_file: O0, - old_vocab_file: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, new_vocab_file: O0, old_vocab_file: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(new_vocab_file.into(), old_vocab_file.into(), scope) } - - fn build_impl( - &self, - new_vocab_file: crate::Output, - old_vocab_file: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, new_vocab_file: crate::Output, old_vocab_file: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GenerateVocabRemapping", |nd| { nd.add_input(new_vocab_file); nd.add_input(old_vocab_file); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.new_vocab_offset { - nd.set_attr_int("new_vocab_offset", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_new_vocab { - nd.set_attr_int("num_new_vocab", *value)?; - } - if let ::std::option::Option::Some(value) = &self.old_vocab_size { - nd.set_attr_int("old_vocab_size", *value)?; - } + if let ::std::option::Option::Some(value) = &self.new_vocab_offset { + nd.set_attr_int("new_vocab_offset", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_new_vocab { + nd.set_attr_int("num_new_vocab", *value)?; + } + if let ::std::option::Option::Some(value) = &self.old_vocab_size { + nd.set_attr_int("old_vocab_size", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GenerateVocabRemapping` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, new_vocab_file: O0, old_vocab_file: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(new_vocab_file.into(), old_vocab_file.into(), scope) + } + fn build_instance_impl(&self, new_vocab_file: crate::Output, old_vocab_file: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GenerateVocabRemapping", |nd| { + nd.add_input(new_vocab_file); + nd.add_input(old_vocab_file); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.new_vocab_offset { + nd.set_attr_int("new_vocab_offset", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_new_vocab { + nd.set_attr_int("num_new_vocab", *value)?; + } + if let ::std::option::Option::Some(value) = &self.old_vocab_size { + nd.set_attr_int("old_vocab_size", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GenerateVocabRemappingInst{op}) + } +} +impl GenerateVocabRemappingInst { + /// Returns the 'remapping' output of this 'GenerateVocabRemapping' operation. + pub fn remapping(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'num_present' output of this 'GenerateVocabRemapping' operation. + pub fn num_present(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for GenerateVocabRemappingInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GenerateVocabRemapping::new().build(new_vocab_file, old_vocab_file, scope)`. -pub fn generate_vocab_remapping< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - new_vocab_file: O0, - old_vocab_file: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn generate_vocab_remapping, O1: ::std::convert::Into>(new_vocab_file: O0, old_vocab_file: O1, scope: &mut crate::Scope) -> crate::Result { GenerateVocabRemapping::new().build(new_vocab_file, old_vocab_file, scope) } + /// Builder for the `GeneratorDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GeneratorDataset { @@ -42713,6 +51874,12 @@ pub struct GeneratorDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'GeneratorDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GeneratorDatasetInst { + /// An instance of a fully built GeneratorDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GeneratorDataset { /// Creates a new `GeneratorDataset`. @@ -42721,82 +51888,55 @@ impl GeneratorDataset { } /// Sets the `init_func` attribute. - pub fn init_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn init_func>(mut self, value: ArgType) -> Self { self.init_func = ::std::option::Option::Some(value.into()); self } /// Sets the `next_func` attribute. - pub fn next_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn next_func>(mut self, value: ArgType) -> Self { self.next_func = ::std::option::Option::Some(value.into()); self } /// Sets the `finalize_func` attribute. - pub fn finalize_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn finalize_func>(mut self, value: ArgType) -> Self { self.finalize_func = ::std::option::Option::Some(value.into()); self } /// Sets the `Tinit_func_args` attribute. - pub fn Tinit_func_args>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinit_func_args>>(mut self, value: ArgType) -> Self { self.Tinit_func_args = ::std::option::Option::Some(value.into()); self } /// Sets the `Tnext_func_args` attribute. - pub fn Tnext_func_args>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tnext_func_args>>(mut self, value: ArgType) -> Self { self.Tnext_func_args = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfinalize_func_args` attribute. - pub fn Tfinalize_func_args>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfinalize_func_args>>(mut self, value: ArgType) -> Self { self.Tfinalize_func_args = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -42808,32 +51948,10 @@ impl GeneratorDataset { } /// Builds the `GeneratorDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - init_func_other_args: O0, - next_func_other_args: O1, - finalize_func_other_args: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - init_func_other_args.into(), - next_func_other_args.into(), - finalize_func_other_args.into(), - scope, - ) - } - - fn build_impl( - &self, - init_func_other_args: crate::Output, - next_func_other_args: crate::Output, - finalize_func_other_args: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, init_func_other_args: O0, next_func_other_args: O1, finalize_func_other_args: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(init_func_other_args.into(), next_func_other_args.into(), finalize_func_other_args.into(), scope) + } + fn build_impl(&self, init_func_other_args: crate::Output, next_func_other_args: crate::Output, finalize_func_other_args: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GeneratorDataset", |nd| { nd.add_input(init_func_other_args); nd.add_input(next_func_other_args); @@ -42841,56 +51959,100 @@ impl GeneratorDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.init_func { - nd.set_attr_string("init_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.next_func { - nd.set_attr_string("next_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.finalize_func { - nd.set_attr_string("finalize_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tinit_func_args { - nd.set_attr_type_list("Tinit_func_args", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tnext_func_args { - nd.set_attr_type_list("Tnext_func_args", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfinalize_func_args { - nd.set_attr_type_list("Tfinalize_func_args", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; + if let ::std::option::Option::Some(value) = &self.init_func { + nd.set_attr_string("init_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.next_func { + nd.set_attr_string("next_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.finalize_func { + nd.set_attr_string("finalize_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinit_func_args { + nd.set_attr_type_list("Tinit_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnext_func_args { + nd.set_attr_type_list("Tnext_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfinalize_func_args { + nd.set_attr_type_list("Tfinalize_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `GeneratorDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, init_func_other_args: O0, next_func_other_args: O1, finalize_func_other_args: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(init_func_other_args.into(), next_func_other_args.into(), finalize_func_other_args.into(), scope) + } + fn build_instance_impl(&self, init_func_other_args: crate::Output, next_func_other_args: crate::Output, finalize_func_other_args: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GeneratorDataset", |nd| { + nd.add_input(init_func_other_args); + nd.add_input(next_func_other_args); + nd.add_input(finalize_func_other_args); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.init_func { + nd.set_attr_string("init_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.next_func { + nd.set_attr_string("next_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.finalize_func { + nd.set_attr_string("finalize_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinit_func_args { + nd.set_attr_type_list("Tinit_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnext_func_args { + nd.set_attr_type_list("Tnext_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfinalize_func_args { + nd.set_attr_type_list("Tfinalize_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GeneratorDatasetInst{op}) + } +} +impl GeneratorDatasetInst { + /// Returns the 'handle' output of this 'GeneratorDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GeneratorDatasetInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `GeneratorDataset::new().build(init_func_other_args, next_func_other_args, finalize_func_other_args, scope)`. -pub fn generator_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - init_func_other_args: O0, - next_func_other_args: O1, - finalize_func_other_args: O2, - scope: &mut crate::Scope, -) -> crate::Result { - GeneratorDataset::new().build( - init_func_other_args, - next_func_other_args, - finalize_func_other_args, - scope, - ) +pub fn generator_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(init_func_other_args: O0, next_func_other_args: O1, finalize_func_other_args: O2, scope: &mut crate::Scope) -> crate::Result { + GeneratorDataset::new().build(init_func_other_args, next_func_other_args, finalize_func_other_args, scope) } + /// Builder for the `GetElementAtIndex` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GetElementAtIndex { @@ -42898,6 +52060,12 @@ pub struct GetElementAtIndex { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'GetElementAtIndex' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GetElementAtIndexInst { + /// An instance of a fully built GetElementAtIndex Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GetElementAtIndex { /// Creates a new `GetElementAtIndex`. @@ -42906,19 +52074,13 @@ impl GetElementAtIndex { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -42930,57 +52092,78 @@ impl GetElementAtIndex { } /// Builds the `GetElementAtIndex` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - dataset: O0, - index: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, dataset: O0, index: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(dataset.into(), index.into(), scope) } - - fn build_impl( - &self, - dataset: crate::Output, - index: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, dataset: crate::Output, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GetElementAtIndex", |nd| { nd.add_input(dataset); nd.add_input(index); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GetElementAtIndex` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, dataset: O0, index: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dataset.into(), index.into(), scope) + } + fn build_instance_impl(&self, dataset: crate::Output, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GetElementAtIndex", |nd| { + nd.add_input(dataset); + nd.add_input(index); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GetElementAtIndexInst{op}) + } +} +impl GetElementAtIndexInst { + /// Returns the 'components' output of this 'GetElementAtIndex' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GetElementAtIndexInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GetElementAtIndex::new().build(dataset, index, scope)`. -pub fn get_element_at_index< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - dataset: O0, - index: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn get_element_at_index, O1: ::std::convert::Into>(dataset: O0, index: O1, scope: &mut crate::Scope) -> crate::Result { GetElementAtIndex::new().build(dataset, index, scope) } + /// Builder for the `GetOptions` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GetOptions { control_inputs: ::std::vec::Vec, } +/// An instance of 'GetOptions' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GetOptionsInst { + /// An instance of a fully built GetOptions Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GetOptions { /// Creates a new `GetOptions`. @@ -42995,19 +52178,10 @@ impl GetOptions { } /// Builds the `GetOptions` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GetOptions", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { @@ -43016,21 +52190,53 @@ impl GetOptions { ::std::result::Result::Ok(()) }) } -} + /// Builds the `GetOptions` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GetOptions", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(GetOptionsInst{op}) + } +} +impl GetOptionsInst { + /// Returns the 'serialized_options' output of this 'GetOptions' operation. + pub fn serialized_options(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GetOptionsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GetOptions::new().build(input_dataset, scope)`. -pub fn get_options>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn get_options>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { GetOptions::new().build(input_dataset, scope) } + /// Builder for the `GetSessionHandle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GetSessionHandle { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GetSessionHandle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GetSessionHandleInst { + /// An instance of a fully built GetSessionHandle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GetSessionHandle { /// Creates a new `GetSessionHandle`. @@ -43051,45 +52257,71 @@ impl GetSessionHandle { } /// Builds the `GetSessionHandle` operation. - pub fn build>( - &self, - value: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GetSessionHandle", |nd| { nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GetSessionHandle` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), scope) + } + fn build_instance_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GetSessionHandle", |nd| { + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GetSessionHandleInst{op}) + } +} +impl GetSessionHandleInst { + /// Returns the 'handle' output of this 'GetSessionHandle' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GetSessionHandleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GetSessionHandle::new().build(value, scope)`. -pub fn get_session_handle>( - value: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn get_session_handle>(value: O0, scope: &mut crate::Scope) -> crate::Result { GetSessionHandle::new().build(value, scope) } + /// Builder for the `GetSessionHandleV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GetSessionHandleV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GetSessionHandleV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GetSessionHandleV2Inst { + /// An instance of a fully built GetSessionHandleV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GetSessionHandleV2 { /// Creates a new `GetSessionHandleV2`. @@ -43110,45 +52342,71 @@ impl GetSessionHandleV2 { } /// Builds the `GetSessionHandleV2` operation. - pub fn build>( - &self, - value: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GetSessionHandleV2", |nd| { nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GetSessionHandleV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), scope) + } + fn build_instance_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GetSessionHandleV2", |nd| { + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GetSessionHandleV2Inst{op}) + } +} +impl GetSessionHandleV2Inst { + /// Returns the 'handle' output of this 'GetSessionHandleV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GetSessionHandleV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GetSessionHandleV2::new().build(value, scope)`. -pub fn get_session_handle_v2>( - value: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn get_session_handle_v2>(value: O0, scope: &mut crate::Scope) -> crate::Result { GetSessionHandleV2::new().build(value, scope) } + /// Builder for the `GetSessionTensor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GetSessionTensor { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GetSessionTensor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GetSessionTensorInst { + /// An instance of a fully built GetSessionTensor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GetSessionTensor { /// Creates a new `GetSessionTensor`. @@ -43169,45 +52427,71 @@ impl GetSessionTensor { } /// Builds the `GetSessionTensor` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GetSessionTensor", |nd| { nd.add_input(handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GetSessionTensor` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GetSessionTensor", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GetSessionTensorInst{op}) + } +} +impl GetSessionTensorInst { + /// Returns the 'value' output of this 'GetSessionTensor' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GetSessionTensorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GetSessionTensor::new().build(handle, scope)`. -pub fn get_session_tensor>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn get_session_tensor>(handle: O0, scope: &mut crate::Scope) -> crate::Result { GetSessionTensor::new().build(handle, scope) } + /// Builder for the `Greater` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Greater { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Greater' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GreaterInst { + /// An instance of a fully built Greater Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Greater { /// Creates a new `Greater`. @@ -43228,52 +52512,73 @@ impl Greater { } /// Builds the `Greater` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Greater", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Greater` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Greater", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GreaterInst{op}) + } +} +impl GreaterInst { + /// Returns the 'z' output of this 'Greater' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GreaterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Greater::new().build(x, y, scope)`. -pub fn greater, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn greater, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Greater::new().build(x, y, scope) } + /// Builder for the `GreaterEqual` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GreaterEqual { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GreaterEqual' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GreaterEqualInst { + /// An instance of a fully built GreaterEqual Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GreaterEqual { /// Creates a new `GreaterEqual`. @@ -43294,49 +52599,61 @@ impl GreaterEqual { } /// Builds the `GreaterEqual` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GreaterEqual", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GreaterEqual` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GreaterEqual", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GreaterEqualInst{op}) + } +} +impl GreaterEqualInst { + /// Returns the 'z' output of this 'GreaterEqual' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GreaterEqualInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GreaterEqual::new().build(x, y, scope)`. -pub fn greater_equal< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn greater_equal, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { GreaterEqual::new().build(x, y, scope) } + /// Builder for the `GroupByReducerDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GroupByReducerDataset { @@ -43352,6 +52669,12 @@ pub struct GroupByReducerDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'GroupByReducerDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GroupByReducerDatasetInst { + /// An instance of a fully built GroupByReducerDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GroupByReducerDataset { /// Creates a new `GroupByReducerDataset`. @@ -43360,99 +52683,61 @@ impl GroupByReducerDataset { } /// Sets the `key_func` attribute. - pub fn key_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_func>(mut self, value: ArgType) -> Self { self.key_func = ::std::option::Option::Some(value.into()); self } /// Sets the `init_func` attribute. - pub fn init_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn init_func>(mut self, value: ArgType) -> Self { self.init_func = ::std::option::Option::Some(value.into()); self } /// Sets the `reduce_func` attribute. - pub fn reduce_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduce_func>(mut self, value: ArgType) -> Self { self.reduce_func = ::std::option::Option::Some(value.into()); self } /// Sets the `finalize_func` attribute. - pub fn finalize_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn finalize_func>(mut self, value: ArgType) -> Self { self.finalize_func = ::std::option::Option::Some(value.into()); self } /// Sets the `Tkey_func_other_arguments` attribute. - pub fn Tkey_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Tkey_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Tkey_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `Tinit_func_other_arguments` attribute. - pub fn Tinit_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinit_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Tinit_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `Treduce_func_other_arguments` attribute. - pub fn Treduce_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Treduce_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Treduce_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfinalize_func_other_arguments` attribute. - pub fn Tfinalize_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfinalize_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Tfinalize_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -43464,40 +52749,10 @@ impl GroupByReducerDataset { } /// Builds the `GroupByReducerDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input_dataset: O0, - key_func_other_arguments: O1, - init_func_other_arguments: O2, - reduce_func_other_arguments: O3, - finalize_func_other_arguments: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - key_func_other_arguments.into(), - init_func_other_arguments.into(), - reduce_func_other_arguments.into(), - finalize_func_other_arguments.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - key_func_other_arguments: crate::Output, - init_func_other_arguments: crate::Output, - reduce_func_other_arguments: crate::Output, - finalize_func_other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, key_func_other_arguments: O1, init_func_other_arguments: O2, reduce_func_other_arguments: O3, finalize_func_other_arguments: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), key_func_other_arguments.into(), init_func_other_arguments.into(), reduce_func_other_arguments.into(), finalize_func_other_arguments.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, key_func_other_arguments: crate::Output, init_func_other_arguments: crate::Output, reduce_func_other_arguments: crate::Output, finalize_func_other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GroupByReducerDataset", |nd| { nd.add_input(input_dataset); nd.add_input(key_func_other_arguments); @@ -43507,65 +52762,108 @@ impl GroupByReducerDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_func { - nd.set_attr_string("key_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.init_func { - nd.set_attr_string("init_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.reduce_func { - nd.set_attr_string("reduce_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.finalize_func { - nd.set_attr_string("finalize_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { - nd.set_attr_type_list("Tkey_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tinit_func_other_arguments { - nd.set_attr_type_list("Tinit_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { - nd.set_attr_type_list("Treduce_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfinalize_func_other_arguments { - nd.set_attr_type_list("Tfinalize_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; + if let ::std::option::Option::Some(value) = &self.key_func { + nd.set_attr_string("key_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.init_func { + nd.set_attr_string("init_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduce_func { + nd.set_attr_string("reduce_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.finalize_func { + nd.set_attr_string("finalize_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { + nd.set_attr_type_list("Tkey_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinit_func_other_arguments { + nd.set_attr_type_list("Tinit_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { + nd.set_attr_type_list("Treduce_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfinalize_func_other_arguments { + nd.set_attr_type_list("Tfinalize_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `GroupByReducerDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, key_func_other_arguments: O1, init_func_other_arguments: O2, reduce_func_other_arguments: O3, finalize_func_other_arguments: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), key_func_other_arguments.into(), init_func_other_arguments.into(), reduce_func_other_arguments.into(), finalize_func_other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, key_func_other_arguments: crate::Output, init_func_other_arguments: crate::Output, reduce_func_other_arguments: crate::Output, finalize_func_other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GroupByReducerDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(key_func_other_arguments); + nd.add_input(init_func_other_arguments); + nd.add_input(reduce_func_other_arguments); + nd.add_input(finalize_func_other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.key_func { + nd.set_attr_string("key_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.init_func { + nd.set_attr_string("init_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduce_func { + nd.set_attr_string("reduce_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.finalize_func { + nd.set_attr_string("finalize_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { + nd.set_attr_type_list("Tkey_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinit_func_other_arguments { + nd.set_attr_type_list("Tinit_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { + nd.set_attr_type_list("Treduce_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfinalize_func_other_arguments { + nd.set_attr_type_list("Tfinalize_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GroupByReducerDatasetInst{op}) + } +} +impl GroupByReducerDatasetInst { + /// Returns the 'handle' output of this 'GroupByReducerDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GroupByReducerDatasetInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `GroupByReducerDataset::new().build(input_dataset, key_func_other_arguments, init_func_other_arguments, reduce_func_other_arguments, finalize_func_other_arguments, scope)`. -pub fn group_by_reducer_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input_dataset: O0, - key_func_other_arguments: O1, - init_func_other_arguments: O2, - reduce_func_other_arguments: O3, - finalize_func_other_arguments: O4, - scope: &mut crate::Scope, -) -> crate::Result { - GroupByReducerDataset::new().build( - input_dataset, - key_func_other_arguments, - init_func_other_arguments, - reduce_func_other_arguments, - finalize_func_other_arguments, - scope, - ) +pub fn group_by_reducer_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input_dataset: O0, key_func_other_arguments: O1, init_func_other_arguments: O2, reduce_func_other_arguments: O3, finalize_func_other_arguments: O4, scope: &mut crate::Scope) -> crate::Result { + GroupByReducerDataset::new().build(input_dataset, key_func_other_arguments, init_func_other_arguments, reduce_func_other_arguments, finalize_func_other_arguments, scope) } + /// Builder for the `GroupByWindowDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GroupByWindowDataset { @@ -43580,6 +52878,12 @@ pub struct GroupByWindowDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'GroupByWindowDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GroupByWindowDatasetInst { + /// An instance of a fully built GroupByWindowDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GroupByWindowDataset { /// Creates a new `GroupByWindowDataset`. @@ -43588,88 +52892,55 @@ impl GroupByWindowDataset { } /// Sets the `key_func` attribute. - pub fn key_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_func>(mut self, value: ArgType) -> Self { self.key_func = ::std::option::Option::Some(value.into()); self } /// Sets the `reduce_func` attribute. - pub fn reduce_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduce_func>(mut self, value: ArgType) -> Self { self.reduce_func = ::std::option::Option::Some(value.into()); self } /// Sets the `window_size_func` attribute. - pub fn window_size_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn window_size_func>(mut self, value: ArgType) -> Self { self.window_size_func = ::std::option::Option::Some(value.into()); self } /// Sets the `Tkey_func_other_arguments` attribute. - pub fn Tkey_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Tkey_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Tkey_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `Treduce_func_other_arguments` attribute. - pub fn Treduce_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Treduce_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Treduce_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `Twindow_size_func_other_arguments` attribute. - pub fn Twindow_size_func_other_arguments< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Twindow_size_func_other_arguments>>(mut self, value: ArgType) -> Self { self.Twindow_size_func_other_arguments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -43681,36 +52952,10 @@ impl GroupByWindowDataset { } /// Builds the `GroupByWindowDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - key_func_other_arguments: O1, - reduce_func_other_arguments: O2, - window_size_func_other_arguments: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - key_func_other_arguments.into(), - reduce_func_other_arguments.into(), - window_size_func_other_arguments.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - key_func_other_arguments: crate::Output, - reduce_func_other_arguments: crate::Output, - window_size_func_other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, key_func_other_arguments: O1, reduce_func_other_arguments: O2, window_size_func_other_arguments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), key_func_other_arguments.into(), reduce_func_other_arguments.into(), window_size_func_other_arguments.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, key_func_other_arguments: crate::Output, reduce_func_other_arguments: crate::Output, window_size_func_other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GroupByWindowDataset", |nd| { nd.add_input(input_dataset); nd.add_input(key_func_other_arguments); @@ -43719,65 +52964,113 @@ impl GroupByWindowDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_func { - nd.set_attr_string("key_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.reduce_func { - nd.set_attr_string("reduce_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.window_size_func { - nd.set_attr_string("window_size_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { - nd.set_attr_type_list("Tkey_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { - nd.set_attr_type_list("Treduce_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Twindow_size_func_other_arguments { - nd.set_attr_type_list("Twindow_size_func_other_arguments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; + if let ::std::option::Option::Some(value) = &self.key_func { + nd.set_attr_string("key_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduce_func { + nd.set_attr_string("reduce_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.window_size_func { + nd.set_attr_string("window_size_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { + nd.set_attr_type_list("Tkey_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { + nd.set_attr_type_list("Treduce_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Twindow_size_func_other_arguments { + nd.set_attr_type_list("Twindow_size_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `GroupByWindowDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, key_func_other_arguments: O1, reduce_func_other_arguments: O2, window_size_func_other_arguments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), key_func_other_arguments.into(), reduce_func_other_arguments.into(), window_size_func_other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, key_func_other_arguments: crate::Output, reduce_func_other_arguments: crate::Output, window_size_func_other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GroupByWindowDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(key_func_other_arguments); + nd.add_input(reduce_func_other_arguments); + nd.add_input(window_size_func_other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.key_func { + nd.set_attr_string("key_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduce_func { + nd.set_attr_string("reduce_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.window_size_func { + nd.set_attr_string("window_size_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tkey_func_other_arguments { + nd.set_attr_type_list("Tkey_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treduce_func_other_arguments { + nd.set_attr_type_list("Treduce_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Twindow_size_func_other_arguments { + nd.set_attr_type_list("Twindow_size_func_other_arguments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GroupByWindowDatasetInst{op}) + } +} +impl GroupByWindowDatasetInst { + /// Returns the 'handle' output of this 'GroupByWindowDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GroupByWindowDatasetInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `GroupByWindowDataset::new().build(input_dataset, key_func_other_arguments, reduce_func_other_arguments, window_size_func_other_arguments, scope)`. -pub fn group_by_window_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - key_func_other_arguments: O1, - reduce_func_other_arguments: O2, - window_size_func_other_arguments: O3, - scope: &mut crate::Scope, -) -> crate::Result { - GroupByWindowDataset::new().build( - input_dataset, - key_func_other_arguments, - reduce_func_other_arguments, - window_size_func_other_arguments, - scope, - ) +pub fn group_by_window_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, key_func_other_arguments: O1, reduce_func_other_arguments: O2, window_size_func_other_arguments: O3, scope: &mut crate::Scope) -> crate::Result { + GroupByWindowDataset::new().build(input_dataset, key_func_other_arguments, reduce_func_other_arguments, window_size_func_other_arguments, scope) } + /// Builder for the `GuaranteeConst` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct GuaranteeConst { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'GuaranteeConst' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct GuaranteeConstInst { + /// An instance of a fully built GuaranteeConst Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl GuaranteeConst { /// Creates a new `GuaranteeConst`. @@ -43798,45 +53091,71 @@ impl GuaranteeConst { } /// Builds the `GuaranteeConst` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("GuaranteeConst", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `GuaranteeConst` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("GuaranteeConst", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(GuaranteeConstInst{op}) + } +} +impl GuaranteeConstInst { + /// Returns the 'output' output of this 'GuaranteeConst' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for GuaranteeConstInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `GuaranteeConst::new().build(input, scope)`. -pub fn guarantee_const>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn guarantee_const>(input: O0, scope: &mut crate::Scope) -> crate::Result { GuaranteeConst::new().build(input, scope) } + /// Builder for the `HSVToRGB` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct HSVToRGB { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'HSVToRGB' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct HSVToRGBInst { + /// An instance of a fully built HSVToRGB Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl HSVToRGB { /// Creates a new `HSVToRGB`. @@ -43857,39 +53176,59 @@ impl HSVToRGB { } /// Builds the `HSVToRGB` operation. - pub fn build>( - &self, - images: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, images: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("HSVToRGB", |nd| { nd.add_input(images); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `HSVToRGB` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, images: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("HSVToRGB", |nd| { + nd.add_input(images); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(HSVToRGBInst{op}) + } +} +impl HSVToRGBInst { + /// Returns the 'output' output of this 'HSVToRGB' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for HSVToRGBInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `HSVToRGB::new().build(images, scope)`. -pub fn hsvto_rgb>( - images: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn hsvto_rgb>(images: O0, scope: &mut crate::Scope) -> crate::Result { HSVToRGB::new().build(images, scope) } + /// Builder for the `HashTable` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct HashTable { @@ -43900,6 +53239,12 @@ pub struct HashTable { value_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'HashTable' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct HashTableInst { + /// An instance of a fully built HashTable Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl HashTable { /// Creates a new `HashTable`. @@ -43908,46 +53253,31 @@ impl HashTable { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `use_node_name_sharing` attribute. - pub fn use_node_name_sharing>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_node_name_sharing>(mut self, value: ArgType) -> Self { self.use_node_name_sharing = ::std::option::Option::Some(value.into()); self } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } @@ -43959,39 +53289,81 @@ impl HashTable { } /// Builds the `HashTable` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("HashTable", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { - nd.set_attr_bool("use_node_name_sharing", *value)?; - } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `HashTable` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("HashTable", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(HashTableInst{op}) + } +} +impl HashTableInst { + /// Returns the 'table_handle' output of this 'HashTable' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for HashTableInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `HashTable::new().build(scope)`. -pub fn hash_table(scope: &mut crate::Scope) -> crate::Result { +pub fn hash_table<>(scope: &mut crate::Scope) -> crate::Result { HashTable::new().build(scope) } + /// Builder for the `HashTableV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct HashTableV2 { @@ -44002,6 +53374,12 @@ pub struct HashTableV2 { value_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'HashTableV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct HashTableV2Inst { + /// An instance of a fully built HashTableV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl HashTableV2 { /// Creates a new `HashTableV2`. @@ -44010,46 +53388,31 @@ impl HashTableV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `use_node_name_sharing` attribute. - pub fn use_node_name_sharing>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_node_name_sharing>(mut self, value: ArgType) -> Self { self.use_node_name_sharing = ::std::option::Option::Some(value.into()); self } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } @@ -44061,39 +53424,81 @@ impl HashTableV2 { } /// Builds the `HashTableV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("HashTableV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { - nd.set_attr_bool("use_node_name_sharing", *value)?; - } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `HashTableV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("HashTableV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(HashTableV2Inst{op}) + } +} +impl HashTableV2Inst { + /// Returns the 'table_handle' output of this 'HashTableV2' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for HashTableV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `HashTableV2::new().build(scope)`. -pub fn hash_table_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn hash_table_v2<>(scope: &mut crate::Scope) -> crate::Result { HashTableV2::new().build(scope) } + /// Builder for the `HistogramFixedWidth` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct HistogramFixedWidth { @@ -44101,6 +53506,12 @@ pub struct HistogramFixedWidth { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'HistogramFixedWidth' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct HistogramFixedWidthInst { + /// An instance of a fully built HistogramFixedWidth Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl HistogramFixedWidth { /// Creates a new `HistogramFixedWidth`. @@ -44127,27 +53538,10 @@ impl HistogramFixedWidth { } /// Builds the `HistogramFixedWidth` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - values: O0, - value_range: O1, - nbins: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, values: O0, value_range: O1, nbins: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(values.into(), value_range.into(), nbins.into(), scope) } - - fn build_impl( - &self, - values: crate::Output, - value_range: crate::Output, - nbins: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, values: crate::Output, value_range: crate::Output, nbins: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("HistogramFixedWidth", |nd| { nd.add_input(values); nd.add_input(value_range); @@ -44155,36 +53549,70 @@ impl HistogramFixedWidth { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `HistogramFixedWidth` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, values: O0, value_range: O1, nbins: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(values.into(), value_range.into(), nbins.into(), scope) + } + fn build_instance_impl(&self, values: crate::Output, value_range: crate::Output, nbins: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("HistogramFixedWidth", |nd| { + nd.add_input(values); + nd.add_input(value_range); + nd.add_input(nbins); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(HistogramFixedWidthInst{op}) + } +} +impl HistogramFixedWidthInst { + /// Returns the 'out' output of this 'HistogramFixedWidth' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for HistogramFixedWidthInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `HistogramFixedWidth::new().build(values, value_range, nbins, scope)`. -pub fn histogram_fixed_width< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - values: O0, - value_range: O1, - nbins: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn histogram_fixed_width, O1: ::std::convert::Into, O2: ::std::convert::Into>(values: O0, value_range: O1, nbins: O2, scope: &mut crate::Scope) -> crate::Result { HistogramFixedWidth::new().build(values, value_range, nbins, scope) } + /// Builder for the `HistogramSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct HistogramSummary { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'HistogramSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct HistogramSummaryInst { + /// An instance of a fully built HistogramSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl HistogramSummary { /// Creates a new `HistogramSummary`. @@ -44205,49 +53633,61 @@ impl HistogramSummary { } /// Builds the `HistogramSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tag: O0, - values: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tag: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tag.into(), values.into(), scope) } - - fn build_impl( - &self, - tag: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tag: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("HistogramSummary", |nd| { nd.add_input(tag); nd.add_input(values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `HistogramSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tag: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tag.into(), values.into(), scope) + } + fn build_instance_impl(&self, tag: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("HistogramSummary", |nd| { + nd.add_input(tag); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(HistogramSummaryInst{op}) + } +} +impl HistogramSummaryInst { + /// Returns the 'summary' output of this 'HistogramSummary' operation. + pub fn summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for HistogramSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `HistogramSummary::new().build(tag, values, scope)`. -pub fn histogram_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tag: O0, - values: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn histogram_summary, O1: ::std::convert::Into>(tag: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { HistogramSummary::new().build(tag, values, scope) } + /// Builder for the `HostConst` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct HostConst { @@ -44255,6 +53695,12 @@ pub struct HostConst { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'HostConst' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct HostConstInst { + /// An instance of a fully built HostConst Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl HostConst { /// Creates a new `HostConst`. @@ -44263,13 +53709,8 @@ impl HostConst { } /// Sets the `value` attribute. - pub fn value>>( - mut self, - value: ArgType, - ) -> Self { - self.value = ::std::option::Option::Some( - (::std::boxed::Box::new(value.into()) as ::std::boxed::Box), - ); + pub fn value>>(mut self, value: ArgType) -> Self { + self.value = ::std::option::Option::Some((::std::boxed::Box::new(value.into()) as ::std::boxed::Box)); self } @@ -44286,36 +53727,75 @@ impl HostConst { } /// Builds the `HostConst` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("HostConst", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.value { - nd.set_attr_any_tensor("value", value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.value { + nd.set_attr_any_tensor("value", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `HostConst` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("HostConst", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.value { + nd.set_attr_any_tensor("value", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(HostConstInst{op}) + } +} +impl HostConstInst { + /// Returns the 'output' output of this 'HostConst' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for HostConstInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `HostConst::new().build(scope)`. -pub fn host_const(scope: &mut crate::Scope) -> crate::Result { +pub fn host_const<>(scope: &mut crate::Scope) -> crate::Result { HostConst::new().build(scope) } + /// Builder for the `IFFT` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IFFT { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IFFT' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IFFTInst { + /// An instance of a fully built IFFT Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IFFT { /// Creates a new `IFFT`. @@ -44324,10 +53804,7 @@ impl IFFT { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -44339,45 +53816,71 @@ impl IFFT { } /// Builds the `IFFT` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IFFT", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IFFT` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IFFT", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IFFTInst{op}) + } +} +impl IFFTInst { + /// Returns the 'output' output of this 'IFFT' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IFFTInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IFFT::new().build(input, scope)`. -pub fn ifft>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ifft>(input: O0, scope: &mut crate::Scope) -> crate::Result { IFFT::new().build(input, scope) } + /// Builder for the `IFFT2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IFFT2D { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IFFT2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IFFT2DInst { + /// An instance of a fully built IFFT2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IFFT2D { /// Creates a new `IFFT2D`. @@ -44386,10 +53889,7 @@ impl IFFT2D { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -44401,45 +53901,71 @@ impl IFFT2D { } /// Builds the `IFFT2D` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IFFT2D", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IFFT2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IFFT2D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IFFT2DInst{op}) + } +} +impl IFFT2DInst { + /// Returns the 'output' output of this 'IFFT2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IFFT2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IFFT2D::new().build(input, scope)`. -pub fn ifft2_d>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ifft2_d>(input: O0, scope: &mut crate::Scope) -> crate::Result { IFFT2D::new().build(input, scope) } + /// Builder for the `IFFT3D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IFFT3D { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IFFT3D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IFFT3DInst { + /// An instance of a fully built IFFT3D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IFFT3D { /// Creates a new `IFFT3D`. @@ -44448,10 +53974,7 @@ impl IFFT3D { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -44463,39 +53986,59 @@ impl IFFT3D { } /// Builds the `IFFT3D` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IFFT3D", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IFFT3D` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IFFT3D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IFFT3DInst{op}) + } +} +impl IFFT3DInst { + /// Returns the 'output' output of this 'IFFT3D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IFFT3DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IFFT3D::new().build(input, scope)`. -pub fn ifft3_d>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ifft3_d>(input: O0, scope: &mut crate::Scope) -> crate::Result { IFFT3D::new().build(input, scope) } + /// Builder for the `IRFFT` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IRFFT { @@ -44503,6 +54046,12 @@ pub struct IRFFT { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IRFFT' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IRFFTInst { + /// An instance of a fully built IRFFT Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IRFFT { /// Creates a new `IRFFT`. @@ -44517,10 +54066,7 @@ impl IRFFT { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -44532,49 +54078,67 @@ impl IRFFT { } /// Builds the `IRFFT` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - fft_length: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), fft_length.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - fft_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IRFFT", |nd| { nd.add_input(input); nd.add_input(fft_length); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Treal { - nd.set_attr_type("Treal", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IRFFT` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), fft_length.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IRFFT", |nd| { + nd.add_input(input); + nd.add_input(fft_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IRFFTInst{op}) + } +} +impl IRFFTInst { + /// Returns the 'output' output of this 'IRFFT' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IRFFTInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IRFFT::new().build(input, fft_length, scope)`. -pub fn irfft, O1: ::std::convert::Into>( - input: O0, - fft_length: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn irfft, O1: ::std::convert::Into>(input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { IRFFT::new().build(input, fft_length, scope) } + /// Builder for the `IRFFT2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IRFFT2D { @@ -44582,6 +54146,12 @@ pub struct IRFFT2D { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IRFFT2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IRFFT2DInst { + /// An instance of a fully built IRFFT2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IRFFT2D { /// Creates a new `IRFFT2D`. @@ -44596,10 +54166,7 @@ impl IRFFT2D { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -44611,52 +54178,67 @@ impl IRFFT2D { } /// Builds the `IRFFT2D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - fft_length: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), fft_length.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - fft_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IRFFT2D", |nd| { nd.add_input(input); nd.add_input(fft_length); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Treal { - nd.set_attr_type("Treal", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IRFFT2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), fft_length.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IRFFT2D", |nd| { + nd.add_input(input); + nd.add_input(fft_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IRFFT2DInst{op}) + } +} +impl IRFFT2DInst { + /// Returns the 'output' output of this 'IRFFT2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IRFFT2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IRFFT2D::new().build(input, fft_length, scope)`. -pub fn irfft2_d< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - fft_length: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn irfft2_d, O1: ::std::convert::Into>(input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { IRFFT2D::new().build(input, fft_length, scope) } + /// Builder for the `IRFFT3D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IRFFT3D { @@ -44664,6 +54246,12 @@ pub struct IRFFT3D { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IRFFT3D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IRFFT3DInst { + /// An instance of a fully built IRFFT3D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IRFFT3D { /// Creates a new `IRFFT3D`. @@ -44678,10 +54266,7 @@ impl IRFFT3D { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -44693,58 +54278,79 @@ impl IRFFT3D { } /// Builds the `IRFFT3D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - fft_length: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), fft_length.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - fft_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IRFFT3D", |nd| { nd.add_input(input); nd.add_input(fft_length); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Treal { - nd.set_attr_type("Treal", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IRFFT3D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), fft_length.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IRFFT3D", |nd| { + nd.add_input(input); + nd.add_input(fft_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IRFFT3DInst{op}) + } +} +impl IRFFT3DInst { + /// Returns the 'output' output of this 'IRFFT3D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IRFFT3DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IRFFT3D::new().build(input, fft_length, scope)`. -pub fn irfft3_d< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - fft_length: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn irfft3_d, O1: ::std::convert::Into>(input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { IRFFT3D::new().build(input, fft_length, scope) } + /// Builder for the `Identity` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Identity { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Identity' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IdentityInst { + /// An instance of a fully built Identity Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Identity { /// Creates a new `Identity`. @@ -44765,45 +54371,71 @@ impl Identity { } /// Builds the `Identity` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Identity", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Identity` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Identity", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IdentityInst{op}) + } +} +impl IdentityInst { + /// Returns the 'output' output of this 'Identity' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IdentityInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Identity::new().build(input, scope)`. -pub fn identity>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn identity>(input: O0, scope: &mut crate::Scope) -> crate::Result { Identity::new().build(input, scope) } + /// Builder for the `IdentityN` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IdentityN { T: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'IdentityN' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IdentityNInst { + /// An instance of a fully built IdentityN Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IdentityN { /// Creates a new `IdentityN`. @@ -44812,10 +54444,7 @@ impl IdentityN { } /// Sets the `T` attribute. - pub fn T>>( - mut self, - value: ArgType, - ) -> Self { + pub fn T>>(mut self, value: ArgType) -> Self { self.T = ::std::option::Option::Some(value.into()); self } @@ -44827,39 +54456,59 @@ impl IdentityN { } /// Builds the `IdentityN` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IdentityN", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type_list("T", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IdentityN` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IdentityN", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IdentityNInst{op}) + } +} +impl IdentityNInst { + /// Returns the 'output' output of this 'IdentityN' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IdentityNInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IdentityN::new().build(input, scope)`. -pub fn identity_n>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn identity_n>(input: O0, scope: &mut crate::Scope) -> crate::Result { IdentityN::new().build(input, scope) } + /// Builder for the `IdentityReader` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IdentityReader { @@ -44867,6 +54516,12 @@ pub struct IdentityReader { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'IdentityReader' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IdentityReaderInst { + /// An instance of a fully built IdentityReader Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IdentityReader { /// Creates a new `IdentityReader`. @@ -44875,19 +54530,13 @@ impl IdentityReader { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -44899,30 +54548,63 @@ impl IdentityReader { } /// Builds the `IdentityReader` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IdentityReader", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IdentityReader` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IdentityReader", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IdentityReaderInst{op}) + } +} +impl IdentityReaderInst { + /// Returns the 'reader_handle' output of this 'IdentityReader' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IdentityReaderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IdentityReader::new().build(scope)`. -pub fn identity_reader(scope: &mut crate::Scope) -> crate::Result { +pub fn identity_reader<>(scope: &mut crate::Scope) -> crate::Result { IdentityReader::new().build(scope) } + /// Builder for the `IdentityReaderV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IdentityReaderV2 { @@ -44930,6 +54612,12 @@ pub struct IdentityReaderV2 { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'IdentityReaderV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IdentityReaderV2Inst { + /// An instance of a fully built IdentityReaderV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IdentityReaderV2 { /// Creates a new `IdentityReaderV2`. @@ -44938,19 +54626,13 @@ impl IdentityReaderV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -44962,30 +54644,63 @@ impl IdentityReaderV2 { } /// Builds the `IdentityReaderV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IdentityReaderV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IdentityReaderV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IdentityReaderV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IdentityReaderV2Inst{op}) + } +} +impl IdentityReaderV2Inst { + /// Returns the 'reader_handle' output of this 'IdentityReaderV2' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IdentityReaderV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IdentityReaderV2::new().build(scope)`. -pub fn identity_reader_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn identity_reader_v2<>(scope: &mut crate::Scope) -> crate::Result { IdentityReaderV2::new().build(scope) } + /// Builder for the `If` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct If { @@ -44997,6 +54712,12 @@ pub struct If { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'If' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IfInst { + /// An instance of a fully built If Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl If { /// Creates a new `If`. @@ -45011,46 +54732,31 @@ impl If { } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } /// Sets the `then_branch` attribute. - pub fn then_branch>( - mut self, - value: ArgType, - ) -> Self { + pub fn then_branch>(mut self, value: ArgType) -> Self { self.then_branch = ::std::option::Option::Some(value.into()); self } /// Sets the `else_branch` attribute. - pub fn else_branch>( - mut self, - value: ArgType, - ) -> Self { + pub fn else_branch>(mut self, value: ArgType) -> Self { self.else_branch = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -45062,67 +54768,103 @@ impl If { } /// Builds the `If` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - cond: O0, - input: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, cond: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(cond.into(), input.into(), scope) } - - fn build_impl( - &self, - cond: crate::Output, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, cond: crate::Output, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("If", |nd| { nd.add_input(cond); nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcond { - nd.set_attr_type("Tcond", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } - if let ::std::option::Option::Some(value) = &self.then_branch { - nd.set_attr_string("then_branch", value)?; - } - if let ::std::option::Option::Some(value) = &self.else_branch { - nd.set_attr_string("else_branch", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcond { + nd.set_attr_type("Tcond", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.then_branch { + nd.set_attr_string("then_branch", value)?; + } + if let ::std::option::Option::Some(value) = &self.else_branch { + nd.set_attr_string("else_branch", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `If` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, cond: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(cond.into(), input.into(), scope) + } + fn build_instance_impl(&self, cond: crate::Output, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("If", |nd| { + nd.add_input(cond); + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcond { + nd.set_attr_type("Tcond", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.then_branch { + nd.set_attr_string("then_branch", value)?; + } + if let ::std::option::Option::Some(value) = &self.else_branch { + nd.set_attr_string("else_branch", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IfInst{op}) + } +} +impl IfInst { + /// Returns the 'output' output of this 'If' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IfInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `If::new().build(cond, input, scope)`. -pub fn if_, O1: ::std::convert::Into>( - cond: O0, - input: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn if_, O1: ::std::convert::Into>(cond: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { If::new().build(cond, input, scope) } + /// Builder for the `Igamma` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Igamma { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Igamma' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IgammaInst { + /// An instance of a fully built Igamma Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Igamma { /// Creates a new `Igamma`. @@ -45143,52 +54885,73 @@ impl Igamma { } /// Builds the `Igamma` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - x: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), x.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Igamma", |nd| { nd.add_input(a); nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Igamma` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), x.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Igamma", |nd| { + nd.add_input(a); + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IgammaInst{op}) + } +} +impl IgammaInst { + /// Returns the 'z' output of this 'Igamma' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IgammaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Igamma::new().build(a, x, scope)`. -pub fn igamma, O1: ::std::convert::Into>( - a: O0, - x: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn igamma, O1: ::std::convert::Into>(a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { Igamma::new().build(a, x, scope) } + /// Builder for the `IgammaGradA` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IgammaGradA { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IgammaGradA' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IgammaGradAInst { + /// An instance of a fully built IgammaGradA Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IgammaGradA { /// Creates a new `IgammaGradA`. @@ -45209,55 +54972,73 @@ impl IgammaGradA { } /// Builds the `IgammaGradA` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - x: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), x.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IgammaGradA", |nd| { nd.add_input(a); nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IgammaGradA` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), x.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IgammaGradA", |nd| { + nd.add_input(a); + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IgammaGradAInst{op}) + } +} +impl IgammaGradAInst { + /// Returns the 'z' output of this 'IgammaGradA' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IgammaGradAInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IgammaGradA::new().build(a, x, scope)`. -pub fn igamma_grad_a< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - a: O0, - x: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn igamma_grad_a, O1: ::std::convert::Into>(a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { IgammaGradA::new().build(a, x, scope) } + /// Builder for the `Igammac` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Igammac { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Igammac' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IgammacInst { + /// An instance of a fully built Igammac Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Igammac { /// Creates a new `Igammac`. @@ -45278,46 +55059,61 @@ impl Igammac { } /// Builds the `Igammac` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - x: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), x.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Igammac", |nd| { nd.add_input(a); nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Igammac` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), x.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Igammac", |nd| { + nd.add_input(a); + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IgammacInst{op}) + } +} +impl IgammacInst { + /// Returns the 'z' output of this 'Igammac' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IgammacInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Igammac::new().build(a, x, scope)`. -pub fn igammac, O1: ::std::convert::Into>( - a: O0, - x: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn igammac, O1: ::std::convert::Into>(a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { Igammac::new().build(a, x, scope) } + /// Builder for the `IgnoreErrorsDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IgnoreErrorsDataset { @@ -45326,6 +55122,12 @@ pub struct IgnoreErrorsDataset { log_warning: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IgnoreErrorsDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IgnoreErrorsDatasetInst { + /// An instance of a fully built IgnoreErrorsDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IgnoreErrorsDataset { /// Creates a new `IgnoreErrorsDataset`. @@ -45334,19 +55136,13 @@ impl IgnoreErrorsDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -45364,45 +55160,71 @@ impl IgnoreErrorsDataset { } /// Builds the `IgnoreErrorsDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IgnoreErrorsDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.log_warning { - nd.set_attr_bool("log_warning", *value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.log_warning { + nd.set_attr_bool("log_warning", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IgnoreErrorsDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IgnoreErrorsDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.log_warning { + nd.set_attr_bool("log_warning", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IgnoreErrorsDatasetInst{op}) + } +} +impl IgnoreErrorsDatasetInst { + /// Returns the 'handle' output of this 'IgnoreErrorsDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IgnoreErrorsDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IgnoreErrorsDataset::new().build(input_dataset, scope)`. -pub fn ignore_errors_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ignore_errors_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { IgnoreErrorsDataset::new().build(input_dataset, scope) } + /// Builder for the `Imag` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Imag { @@ -45410,6 +55232,12 @@ pub struct Imag { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Imag' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ImagInst { + /// An instance of a fully built Imag Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Imag { /// Creates a new `Imag`. @@ -45436,42 +55264,65 @@ impl Imag { } /// Builds the `Imag` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Imag", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Imag` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Imag", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ImagInst{op}) + } +} +impl ImagInst { + /// Returns the 'output' output of this 'Imag' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ImagInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Imag::new().build(input, scope)`. -pub fn imag>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn imag>(input: O0, scope: &mut crate::Scope) -> crate::Result { Imag::new().build(input, scope) } + /// Builder for the `ImageProjectiveTransformV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ImageProjectiveTransformV2 { @@ -45480,6 +55331,12 @@ pub struct ImageProjectiveTransformV2 { fill_mode: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ImageProjectiveTransformV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ImageProjectiveTransformV2Inst { + /// An instance of a fully built ImageProjectiveTransformV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ImageProjectiveTransformV2 { /// Creates a new `ImageProjectiveTransformV2`. @@ -45494,19 +55351,13 @@ impl ImageProjectiveTransformV2 { } /// Sets the `interpolation` attribute. - pub fn interpolation>( - mut self, - value: ArgType, - ) -> Self { + pub fn interpolation>(mut self, value: ArgType) -> Self { self.interpolation = ::std::option::Option::Some(value.into()); self } /// Sets the `fill_mode` attribute. - pub fn fill_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn fill_mode>(mut self, value: ArgType) -> Self { self.fill_mode = ::std::option::Option::Some(value.into()); self } @@ -45518,27 +55369,10 @@ impl ImageProjectiveTransformV2 { } /// Builds the `ImageProjectiveTransformV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - images: O0, - transforms: O1, - output_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, images: O0, transforms: O1, output_shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), transforms.into(), output_shape.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - transforms: crate::Output, - output_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, transforms: crate::Output, output_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ImageProjectiveTransformV2", |nd| { nd.add_input(images); nd.add_input(transforms); @@ -45546,33 +55380,64 @@ impl ImageProjectiveTransformV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.interpolation { - nd.set_attr_string("interpolation", value)?; - } - if let ::std::option::Option::Some(value) = &self.fill_mode { - nd.set_attr_string("fill_mode", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.interpolation { + nd.set_attr_string("interpolation", value)?; + } + if let ::std::option::Option::Some(value) = &self.fill_mode { + nd.set_attr_string("fill_mode", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ImageProjectiveTransformV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, images: O0, transforms: O1, output_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), transforms.into(), output_shape.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, transforms: crate::Output, output_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ImageProjectiveTransformV2", |nd| { + nd.add_input(images); + nd.add_input(transforms); + nd.add_input(output_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.interpolation { + nd.set_attr_string("interpolation", value)?; + } + if let ::std::option::Option::Some(value) = &self.fill_mode { + nd.set_attr_string("fill_mode", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ImageProjectiveTransformV2Inst{op}) + } +} +impl ImageProjectiveTransformV2Inst { + /// Returns the 'transformed_images' output of this 'ImageProjectiveTransformV2' operation. + pub fn transformed_images(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ImageProjectiveTransformV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ImageProjectiveTransformV2::new().build(images, transforms, output_shape, scope)`. -pub fn image_projective_transform_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - images: O0, - transforms: O1, - output_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn image_projective_transform_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(images: O0, transforms: O1, output_shape: O2, scope: &mut crate::Scope) -> crate::Result { ImageProjectiveTransformV2::new().build(images, transforms, output_shape, scope) } + /// Builder for the `ImageProjectiveTransformV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ImageProjectiveTransformV3 { @@ -45581,6 +55446,12 @@ pub struct ImageProjectiveTransformV3 { fill_mode: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ImageProjectiveTransformV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ImageProjectiveTransformV3Inst { + /// An instance of a fully built ImageProjectiveTransformV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ImageProjectiveTransformV3 { /// Creates a new `ImageProjectiveTransformV3`. @@ -45595,19 +55466,13 @@ impl ImageProjectiveTransformV3 { } /// Sets the `interpolation` attribute. - pub fn interpolation>( - mut self, - value: ArgType, - ) -> Self { + pub fn interpolation>(mut self, value: ArgType) -> Self { self.interpolation = ::std::option::Option::Some(value.into()); self } /// Sets the `fill_mode` attribute. - pub fn fill_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn fill_mode>(mut self, value: ArgType) -> Self { self.fill_mode = ::std::option::Option::Some(value.into()); self } @@ -45619,36 +55484,10 @@ impl ImageProjectiveTransformV3 { } /// Builds the `ImageProjectiveTransformV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - images: O0, - transforms: O1, - output_shape: O2, - fill_value: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - images.into(), - transforms.into(), - output_shape.into(), - fill_value.into(), - scope, - ) - } - - fn build_impl( - &self, - images: crate::Output, - transforms: crate::Output, - output_shape: crate::Output, - fill_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, images: O0, transforms: O1, output_shape: O2, fill_value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(images.into(), transforms.into(), output_shape.into(), fill_value.into(), scope) + } + fn build_impl(&self, images: crate::Output, transforms: crate::Output, output_shape: crate::Output, fill_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ImageProjectiveTransformV3", |nd| { nd.add_input(images); nd.add_input(transforms); @@ -45657,35 +55496,65 @@ impl ImageProjectiveTransformV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.interpolation { - nd.set_attr_string("interpolation", value)?; - } - if let ::std::option::Option::Some(value) = &self.fill_mode { - nd.set_attr_string("fill_mode", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.interpolation { + nd.set_attr_string("interpolation", value)?; + } + if let ::std::option::Option::Some(value) = &self.fill_mode { + nd.set_attr_string("fill_mode", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ImageProjectiveTransformV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, images: O0, transforms: O1, output_shape: O2, fill_value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), transforms.into(), output_shape.into(), fill_value.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, transforms: crate::Output, output_shape: crate::Output, fill_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ImageProjectiveTransformV3", |nd| { + nd.add_input(images); + nd.add_input(transforms); + nd.add_input(output_shape); + nd.add_input(fill_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.interpolation { + nd.set_attr_string("interpolation", value)?; + } + if let ::std::option::Option::Some(value) = &self.fill_mode { + nd.set_attr_string("fill_mode", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ImageProjectiveTransformV3Inst{op}) + } +} +impl ImageProjectiveTransformV3Inst { + /// Returns the 'transformed_images' output of this 'ImageProjectiveTransformV3' operation. + pub fn transformed_images(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ImageProjectiveTransformV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ImageProjectiveTransformV3::new().build(images, transforms, output_shape, fill_value, scope)`. -pub fn image_projective_transform_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - images: O0, - transforms: O1, - output_shape: O2, - fill_value: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn image_projective_transform_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(images: O0, transforms: O1, output_shape: O2, fill_value: O3, scope: &mut crate::Scope) -> crate::Result { ImageProjectiveTransformV3::new().build(images, transforms, output_shape, fill_value, scope) } + /// Builder for the `ImageSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ImageSummary { @@ -45694,6 +55563,12 @@ pub struct ImageSummary { bad_color: ::std::option::Option<::std::boxed::Box>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ImageSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ImageSummaryInst { + /// An instance of a fully built ImageSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ImageSummary { /// Creates a new `ImageSummary`. @@ -45714,13 +55589,8 @@ impl ImageSummary { } /// Sets the `bad_color` attribute. - pub fn bad_color>>( - mut self, - value: ArgType, - ) -> Self { - self.bad_color = ::std::option::Option::Some( - (::std::boxed::Box::new(value.into()) as ::std::boxed::Box), - ); + pub fn bad_color>>(mut self, value: ArgType) -> Self { + self.bad_color = ::std::option::Option::Some((::std::boxed::Box::new(value.into()) as ::std::boxed::Box)); self } @@ -45731,55 +55601,73 @@ impl ImageSummary { } /// Builds the `ImageSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tag: O0, - tensor: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tag: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tag.into(), tensor.into(), scope) } - - fn build_impl( - &self, - tag: crate::Output, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tag: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ImageSummary", |nd| { nd.add_input(tag); nd.add_input(tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.max_images { - nd.set_attr_int("max_images", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.bad_color { - nd.set_attr_any_tensor("bad_color", value)?; - } + if let ::std::option::Option::Some(value) = &self.max_images { + nd.set_attr_int("max_images", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.bad_color { + nd.set_attr_any_tensor("bad_color", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ImageSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tag: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tag.into(), tensor.into(), scope) + } + fn build_instance_impl(&self, tag: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ImageSummary", |nd| { + nd.add_input(tag); + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.max_images { + nd.set_attr_int("max_images", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.bad_color { + nd.set_attr_any_tensor("bad_color", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ImageSummaryInst{op}) + } +} +impl ImageSummaryInst { + /// Returns the 'summary' output of this 'ImageSummary' operation. + pub fn summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ImageSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ImageSummary::new().build(tag, tensor, scope)`. -pub fn image_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tag: O0, - tensor: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn image_summary, O1: ::std::convert::Into>(tag: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { ImageSummary::new().build(tag, tensor, scope) } + /// Builder for the `ImmutableConst` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ImmutableConst { @@ -45788,6 +55676,12 @@ pub struct ImmutableConst { memory_region_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ImmutableConst' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ImmutableConstInst { + /// An instance of a fully built ImmutableConst Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ImmutableConst { /// Creates a new `ImmutableConst`. @@ -45808,10 +55702,7 @@ impl ImmutableConst { } /// Sets the `memory_region_name` attribute. - pub fn memory_region_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn memory_region_name>(mut self, value: ArgType) -> Self { self.memory_region_name = ::std::option::Option::Some(value.into()); self } @@ -45823,38 +55714,80 @@ impl ImmutableConst { } /// Builds the `ImmutableConst` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ImmutableConst", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_region_name { - nd.set_attr_string("memory_region_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_region_name { + nd.set_attr_string("memory_region_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ImmutableConst` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ImmutableConst", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_region_name { + nd.set_attr_string("memory_region_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ImmutableConstInst{op}) + } +} +impl ImmutableConstInst { + /// Returns the 'tensor' output of this 'ImmutableConst' operation. + pub fn tensor(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ImmutableConstInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ImmutableConst::new().build(scope)`. -pub fn immutable_const(scope: &mut crate::Scope) -> crate::Result { +pub fn immutable_const<>(scope: &mut crate::Scope) -> crate::Result { ImmutableConst::new().build(scope) } + /// Builder for the `ImportEvent` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ImportEvent { control_inputs: ::std::vec::Vec, } +/// An instance of 'ImportEvent' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ImportEventInst { + /// An instance of a fully built ImportEvent Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ImportEvent { /// Creates a new `ImportEvent`. @@ -45869,24 +55802,10 @@ impl ImportEvent { } /// Builds the `ImportEvent` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - writer: O0, - event: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, writer: O0, event: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(writer.into(), event.into(), scope) } - - fn build_impl( - &self, - writer: crate::Output, - event: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, writer: crate::Output, event: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ImportEvent", |nd| { nd.add_input(writer); nd.add_input(event); @@ -45896,19 +55815,35 @@ impl ImportEvent { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ImportEvent` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, writer: O0, event: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), event.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, event: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ImportEvent", |nd| { + nd.add_input(writer); + nd.add_input(event); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ImportEventInst{op}) + } +} +impl ImportEventInst { +} +impl Into for ImportEventInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ImportEvent::new().build(writer, event, scope)`. -pub fn import_event< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - writer: O0, - event: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn import_event, O1: ::std::convert::Into>(writer: O0, event: O1, scope: &mut crate::Scope) -> crate::Result { ImportEvent::new().build(writer, event, scope) } + /// Builder for the `InTopK` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InTopK { @@ -45916,6 +55851,12 @@ pub struct InTopK { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InTopK' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InTopKInst { + /// An instance of a fully built InTopK Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InTopK { /// Creates a new `InTopK`. @@ -45942,58 +55883,79 @@ impl InTopK { } /// Builds the `InTopK` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - predictions: O0, - targets: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, predictions: O0, targets: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(predictions.into(), targets.into(), scope) } - - fn build_impl( - &self, - predictions: crate::Output, - targets: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, predictions: crate::Output, targets: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InTopK", |nd| { nd.add_input(predictions); nd.add_input(targets); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.k { - nd.set_attr_int("k", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InTopK` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, predictions: O0, targets: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(predictions.into(), targets.into(), scope) + } + fn build_instance_impl(&self, predictions: crate::Output, targets: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InTopK", |nd| { + nd.add_input(predictions); + nd.add_input(targets); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InTopKInst{op}) + } +} +impl InTopKInst { + /// Returns the 'precision' output of this 'InTopK' operation. + pub fn precision(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InTopKInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InTopK::new().build(predictions, targets, scope)`. -pub fn in_top_k< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - predictions: O0, - targets: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn in_top_k, O1: ::std::convert::Into>(predictions: O0, targets: O1, scope: &mut crate::Scope) -> crate::Result { InTopK::new().build(predictions, targets, scope) } + /// Builder for the `InTopKV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InTopKV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InTopKV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InTopKV2Inst { + /// An instance of a fully built InTopKV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InTopKV2 { /// Creates a new `InTopKV2`. @@ -46014,27 +55976,10 @@ impl InTopKV2 { } /// Builds the `InTopKV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - predictions: O0, - targets: O1, - k: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, predictions: O0, targets: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(predictions.into(), targets.into(), k.into(), scope) } - - fn build_impl( - &self, - predictions: crate::Output, - targets: crate::Output, - k: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, predictions: crate::Output, targets: crate::Output, k: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InTopKV2", |nd| { nd.add_input(predictions); nd.add_input(targets); @@ -46042,27 +55987,52 @@ impl InTopKV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InTopKV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, predictions: O0, targets: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(predictions.into(), targets.into(), k.into(), scope) + } + fn build_instance_impl(&self, predictions: crate::Output, targets: crate::Output, k: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InTopKV2", |nd| { + nd.add_input(predictions); + nd.add_input(targets); + nd.add_input(k); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InTopKV2Inst{op}) + } +} +impl InTopKV2Inst { + /// Returns the 'precision' output of this 'InTopKV2' operation. + pub fn precision(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InTopKV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InTopKV2::new().build(predictions, targets, k, scope)`. -pub fn in_top_kv2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - predictions: O0, - targets: O1, - k: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn in_top_kv2, O1: ::std::convert::Into, O2: ::std::convert::Into>(predictions: O0, targets: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { InTopKV2::new().build(predictions, targets, k, scope) } + /// Builder for the `InfeedDequeue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InfeedDequeue { @@ -46070,6 +56040,12 @@ pub struct InfeedDequeue { shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InfeedDequeue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InfeedDequeueInst { + /// An instance of a fully built InfeedDequeue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InfeedDequeue { /// Creates a new `InfeedDequeue`. @@ -46096,30 +56072,63 @@ impl InfeedDequeue { } /// Builds the `InfeedDequeue` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InfeedDequeue", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InfeedDequeue` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InfeedDequeue", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InfeedDequeueInst{op}) + } +} +impl InfeedDequeueInst { + /// Returns the 'output' output of this 'InfeedDequeue' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InfeedDequeueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InfeedDequeue::new().build(scope)`. -pub fn infeed_dequeue(scope: &mut crate::Scope) -> crate::Result { +pub fn infeed_dequeue<>(scope: &mut crate::Scope) -> crate::Result { InfeedDequeue::new().build(scope) } + /// Builder for the `InfeedDequeueTuple` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InfeedDequeueTuple { @@ -46127,6 +56136,12 @@ pub struct InfeedDequeueTuple { shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'InfeedDequeueTuple' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InfeedDequeueTupleInst { + /// An instance of a fully built InfeedDequeueTuple Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InfeedDequeueTuple { /// Creates a new `InfeedDequeueTuple`. @@ -46135,19 +56150,13 @@ impl InfeedDequeueTuple { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -46159,30 +56168,63 @@ impl InfeedDequeueTuple { } /// Builds the `InfeedDequeueTuple` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InfeedDequeueTuple", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InfeedDequeueTuple` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InfeedDequeueTuple", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InfeedDequeueTupleInst{op}) + } +} +impl InfeedDequeueTupleInst { + /// Returns the 'outputs' output of this 'InfeedDequeueTuple' operation. + pub fn outputs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InfeedDequeueTupleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InfeedDequeueTuple::new().build(scope)`. -pub fn infeed_dequeue_tuple(scope: &mut crate::Scope) -> crate::Result { +pub fn infeed_dequeue_tuple<>(scope: &mut crate::Scope) -> crate::Result { InfeedDequeueTuple::new().build(scope) } + /// Builder for the `InfeedEnqueue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InfeedEnqueue { @@ -46192,6 +56234,12 @@ pub struct InfeedEnqueue { device_ordinal: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InfeedEnqueue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InfeedEnqueueInst { + /// An instance of a fully built InfeedEnqueue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InfeedEnqueue { /// Creates a new `InfeedEnqueue`. @@ -46212,10 +56260,7 @@ impl InfeedEnqueue { } /// Sets the `layout` attribute. - pub fn layout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn layout>>(mut self, value: ArgType) -> Self { self.layout = ::std::option::Option::Some(value.into()); self } @@ -46233,54 +56278,82 @@ impl InfeedEnqueue { } /// Builds the `InfeedEnqueue` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InfeedEnqueue", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.layout { - nd.set_attr_int_list("layout", value)?; - } - if let ::std::option::Option::Some(value) = &self.device_ordinal { - nd.set_attr_int("device_ordinal", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.layout { + nd.set_attr_int_list("layout", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InfeedEnqueue` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InfeedEnqueue", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.layout { + nd.set_attr_int_list("layout", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InfeedEnqueueInst{op}) + } +} +impl InfeedEnqueueInst { +} +impl Into for InfeedEnqueueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InfeedEnqueue::new().build(input, scope)`. -pub fn infeed_enqueue>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn infeed_enqueue>(input: O0, scope: &mut crate::Scope) -> crate::Result { InfeedEnqueue::new().build(input, scope) } + /// Builder for the `InfeedEnqueuePrelinearizedBuffer` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InfeedEnqueuePrelinearizedBuffer { device_ordinal: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InfeedEnqueuePrelinearizedBuffer' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InfeedEnqueuePrelinearizedBufferInst { + /// An instance of a fully built InfeedEnqueuePrelinearizedBuffer Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InfeedEnqueuePrelinearizedBuffer { /// Creates a new `InfeedEnqueuePrelinearizedBuffer`. @@ -46301,39 +56374,52 @@ impl InfeedEnqueuePrelinearizedBuffer { } /// Builds the `InfeedEnqueuePrelinearizedBuffer` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InfeedEnqueuePrelinearizedBuffer", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.device_ordinal { - nd.set_attr_int("device_ordinal", *value)?; - } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InfeedEnqueuePrelinearizedBuffer` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InfeedEnqueuePrelinearizedBuffer", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InfeedEnqueuePrelinearizedBufferInst{op}) + } +} +impl InfeedEnqueuePrelinearizedBufferInst { +} +impl Into for InfeedEnqueuePrelinearizedBufferInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InfeedEnqueuePrelinearizedBuffer::new().build(input, scope)`. -pub fn infeed_enqueue_prelinearized_buffer>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn infeed_enqueue_prelinearized_buffer>(input: O0, scope: &mut crate::Scope) -> crate::Result { InfeedEnqueuePrelinearizedBuffer::new().build(input, scope) } + /// Builder for the `InfeedEnqueueTuple` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InfeedEnqueueTuple { @@ -46343,6 +56429,12 @@ pub struct InfeedEnqueueTuple { device_ordinal: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InfeedEnqueueTuple' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InfeedEnqueueTupleInst { + /// An instance of a fully built InfeedEnqueueTuple Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InfeedEnqueueTuple { /// Creates a new `InfeedEnqueueTuple`. @@ -46351,28 +56443,19 @@ impl InfeedEnqueueTuple { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `layouts` attribute. - pub fn layouts>>( - mut self, - value: ArgType, - ) -> Self { + pub fn layouts>>(mut self, value: ArgType) -> Self { self.layouts = ::std::option::Option::Some(value.into()); self } @@ -46390,48 +56473,70 @@ impl InfeedEnqueueTuple { } /// Builds the `InfeedEnqueueTuple` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InfeedEnqueueTuple", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.layouts { - nd.set_attr_int_list("layouts", value)?; - } - if let ::std::option::Option::Some(value) = &self.device_ordinal { - nd.set_attr_int("device_ordinal", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.layouts { + nd.set_attr_int_list("layouts", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InfeedEnqueueTuple` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InfeedEnqueueTuple", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.layouts { + nd.set_attr_int_list("layouts", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InfeedEnqueueTupleInst{op}) + } +} +impl InfeedEnqueueTupleInst { +} +impl Into for InfeedEnqueueTupleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InfeedEnqueueTuple::new().build(inputs, scope)`. -pub fn infeed_enqueue_tuple>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn infeed_enqueue_tuple>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { InfeedEnqueueTuple::new().build(inputs, scope) } + /// Builder for the `InitializeTable` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InitializeTable { @@ -46439,6 +56544,12 @@ pub struct InitializeTable { Tval: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InitializeTable' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InitializeTableInst { + /// An instance of a fully built InitializeTable Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InitializeTable { /// Creates a new `InitializeTable`. @@ -46465,27 +56576,10 @@ impl InitializeTable { } /// Builds the `InitializeTable` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), keys.into(), values.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - keys: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InitializeTable", |nd| { nd.add_input(table_handle); nd.add_input(keys); @@ -46493,35 +56587,62 @@ impl InitializeTable { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tkey { - nd.set_attr_type("Tkey", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tval { - nd.set_attr_type("Tval", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tkey { + nd.set_attr_type("Tkey", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tval { + nd.set_attr_type("Tval", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InitializeTable` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), keys.into(), values.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InitializeTable", |nd| { + nd.add_input(table_handle); + nd.add_input(keys); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tkey { + nd.set_attr_type("Tkey", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tval { + nd.set_attr_type("Tval", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InitializeTableInst{op}) + } +} +impl InitializeTableInst { +} +impl Into for InitializeTableInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InitializeTable::new().build(table_handle, keys, values, scope)`. -pub fn initialize_table< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn initialize_table, O1: ::std::convert::Into, O2: ::std::convert::Into>(table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { InitializeTable::new().build(table_handle, keys, values, scope) } + /// Builder for the `InitializeTableFromDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InitializeTableFromDataset { control_inputs: ::std::vec::Vec, } +/// An instance of 'InitializeTableFromDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InitializeTableFromDatasetInst { + /// An instance of a fully built InitializeTableFromDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InitializeTableFromDataset { /// Creates a new `InitializeTableFromDataset`. @@ -46536,24 +56657,10 @@ impl InitializeTableFromDataset { } /// Builds the `InitializeTableFromDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - table_handle: O0, - dataset: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, table_handle: O0, dataset: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), dataset.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InitializeTableFromDataset", |nd| { nd.add_input(table_handle); nd.add_input(dataset); @@ -46563,19 +56670,35 @@ impl InitializeTableFromDataset { ::std::result::Result::Ok(()) }) } -} + /// Builds the `InitializeTableFromDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, table_handle: O0, dataset: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), dataset.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InitializeTableFromDataset", |nd| { + nd.add_input(table_handle); + nd.add_input(dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(InitializeTableFromDatasetInst{op}) + } +} +impl InitializeTableFromDatasetInst { +} +impl Into for InitializeTableFromDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InitializeTableFromDataset::new().build(table_handle, dataset, scope)`. -pub fn initialize_table_from_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - table_handle: O0, - dataset: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn initialize_table_from_dataset, O1: ::std::convert::Into>(table_handle: O0, dataset: O1, scope: &mut crate::Scope) -> crate::Result { InitializeTableFromDataset::new().build(table_handle, dataset, scope) } + /// Builder for the `InitializeTableFromTextFile` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InitializeTableFromTextFile { @@ -46586,6 +56709,12 @@ pub struct InitializeTableFromTextFile { offset: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InitializeTableFromTextFile' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InitializeTableFromTextFileInst { + /// An instance of a fully built InitializeTableFromTextFile Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InitializeTableFromTextFile { /// Creates a new `InitializeTableFromTextFile`. @@ -46612,10 +56741,7 @@ impl InitializeTableFromTextFile { } /// Sets the `delimiter` attribute. - pub fn delimiter>( - mut self, - value: ArgType, - ) -> Self { + pub fn delimiter>(mut self, value: ArgType) -> Self { self.delimiter = ::std::option::Option::Some(value.into()); self } @@ -46633,61 +56759,78 @@ impl InitializeTableFromTextFile { } /// Builds the `InitializeTableFromTextFile` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - table_handle: O0, - filename: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, table_handle: O0, filename: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), filename.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - filename: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, filename: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InitializeTableFromTextFile", |nd| { nd.add_input(table_handle); nd.add_input(filename); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_index { - nd.set_attr_int("key_index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_index { - nd.set_attr_int("value_index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.vocab_size { - nd.set_attr_int("vocab_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.delimiter { - nd.set_attr_string("delimiter", value)?; - } - if let ::std::option::Option::Some(value) = &self.offset { - nd.set_attr_int("offset", *value)?; - } + if let ::std::option::Option::Some(value) = &self.key_index { + nd.set_attr_int("key_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_index { + nd.set_attr_int("value_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.vocab_size { + nd.set_attr_int("vocab_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.delimiter { + nd.set_attr_string("delimiter", value)?; + } + if let ::std::option::Option::Some(value) = &self.offset { + nd.set_attr_int("offset", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InitializeTableFromTextFile` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, table_handle: O0, filename: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), filename.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, filename: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InitializeTableFromTextFile", |nd| { + nd.add_input(table_handle); + nd.add_input(filename); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_index { + nd.set_attr_int("key_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_index { + nd.set_attr_int("value_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.vocab_size { + nd.set_attr_int("vocab_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.delimiter { + nd.set_attr_string("delimiter", value)?; + } + if let ::std::option::Option::Some(value) = &self.offset { + nd.set_attr_int("offset", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InitializeTableFromTextFileInst{op}) + } +} +impl InitializeTableFromTextFileInst { +} +impl Into for InitializeTableFromTextFileInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InitializeTableFromTextFile::new().build(table_handle, filename, scope)`. -pub fn initialize_table_from_text_file< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - table_handle: O0, - filename: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn initialize_table_from_text_file, O1: ::std::convert::Into>(table_handle: O0, filename: O1, scope: &mut crate::Scope) -> crate::Result { InitializeTableFromTextFile::new().build(table_handle, filename, scope) } + /// Builder for the `InitializeTableFromTextFileV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InitializeTableFromTextFileV2 { @@ -46698,6 +56841,12 @@ pub struct InitializeTableFromTextFileV2 { offset: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InitializeTableFromTextFileV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InitializeTableFromTextFileV2Inst { + /// An instance of a fully built InitializeTableFromTextFileV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InitializeTableFromTextFileV2 { /// Creates a new `InitializeTableFromTextFileV2`. @@ -46724,10 +56873,7 @@ impl InitializeTableFromTextFileV2 { } /// Sets the `delimiter` attribute. - pub fn delimiter>( - mut self, - value: ArgType, - ) -> Self { + pub fn delimiter>(mut self, value: ArgType) -> Self { self.delimiter = ::std::option::Option::Some(value.into()); self } @@ -46745,61 +56891,78 @@ impl InitializeTableFromTextFileV2 { } /// Builds the `InitializeTableFromTextFileV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - table_handle: O0, - filename: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, table_handle: O0, filename: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), filename.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - filename: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, filename: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InitializeTableFromTextFileV2", |nd| { nd.add_input(table_handle); nd.add_input(filename); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_index { - nd.set_attr_int("key_index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_index { - nd.set_attr_int("value_index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.vocab_size { - nd.set_attr_int("vocab_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.delimiter { - nd.set_attr_string("delimiter", value)?; - } - if let ::std::option::Option::Some(value) = &self.offset { - nd.set_attr_int("offset", *value)?; - } + if let ::std::option::Option::Some(value) = &self.key_index { + nd.set_attr_int("key_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_index { + nd.set_attr_int("value_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.vocab_size { + nd.set_attr_int("vocab_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.delimiter { + nd.set_attr_string("delimiter", value)?; + } + if let ::std::option::Option::Some(value) = &self.offset { + nd.set_attr_int("offset", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InitializeTableFromTextFileV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, table_handle: O0, filename: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), filename.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, filename: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InitializeTableFromTextFileV2", |nd| { + nd.add_input(table_handle); + nd.add_input(filename); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_index { + nd.set_attr_int("key_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_index { + nd.set_attr_int("value_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.vocab_size { + nd.set_attr_int("vocab_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.delimiter { + nd.set_attr_string("delimiter", value)?; + } + if let ::std::option::Option::Some(value) = &self.offset { + nd.set_attr_int("offset", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InitializeTableFromTextFileV2Inst{op}) + } +} +impl InitializeTableFromTextFileV2Inst { +} +impl Into for InitializeTableFromTextFileV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InitializeTableFromTextFileV2::new().build(table_handle, filename, scope)`. -pub fn initialize_table_from_text_file_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - table_handle: O0, - filename: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn initialize_table_from_text_file_v2, O1: ::std::convert::Into>(table_handle: O0, filename: O1, scope: &mut crate::Scope) -> crate::Result { InitializeTableFromTextFileV2::new().build(table_handle, filename, scope) } + /// Builder for the `InitializeTableV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InitializeTableV2 { @@ -46807,6 +56970,12 @@ pub struct InitializeTableV2 { Tval: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InitializeTableV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InitializeTableV2Inst { + /// An instance of a fully built InitializeTableV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InitializeTableV2 { /// Creates a new `InitializeTableV2`. @@ -46833,27 +57002,10 @@ impl InitializeTableV2 { } /// Builds the `InitializeTableV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), keys.into(), values.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - keys: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InitializeTableV2", |nd| { nd.add_input(table_handle); nd.add_input(keys); @@ -46861,36 +57013,63 @@ impl InitializeTableV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tkey { - nd.set_attr_type("Tkey", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tval { - nd.set_attr_type("Tval", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tkey { + nd.set_attr_type("Tkey", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tval { + nd.set_attr_type("Tval", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InitializeTableV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), keys.into(), values.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InitializeTableV2", |nd| { + nd.add_input(table_handle); + nd.add_input(keys); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tkey { + nd.set_attr_type("Tkey", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tval { + nd.set_attr_type("Tval", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InitializeTableV2Inst{op}) + } +} +impl InitializeTableV2Inst { +} +impl Into for InitializeTableV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InitializeTableV2::new().build(table_handle, keys, values, scope)`. -pub fn initialize_table_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn initialize_table_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { InitializeTableV2::new().build(table_handle, keys, values, scope) } + /// Builder for the `InplaceAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InplaceAdd { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InplaceAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InplaceAddInst { + /// An instance of a fully built InplaceAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InplaceAdd { /// Creates a new `InplaceAdd`. @@ -46911,27 +57090,10 @@ impl InplaceAdd { } /// Builds the `InplaceAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - x: O0, - i: O1, - v: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, x: O0, i: O1, v: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), i.into(), v.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - i: crate::Output, - v: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, i: crate::Output, v: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InplaceAdd", |nd| { nd.add_input(x); nd.add_input(i); @@ -46939,33 +57101,64 @@ impl InplaceAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InplaceAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, x: O0, i: O1, v: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), i.into(), v.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, i: crate::Output, v: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InplaceAdd", |nd| { + nd.add_input(x); + nd.add_input(i); + nd.add_input(v); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InplaceAddInst{op}) + } +} +impl InplaceAddInst { + /// Returns the 'y' output of this 'InplaceAdd' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InplaceAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InplaceAdd::new().build(x, i, v, scope)`. -pub fn inplace_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - x: O0, - i: O1, - v: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn inplace_add, O1: ::std::convert::Into, O2: ::std::convert::Into>(x: O0, i: O1, v: O2, scope: &mut crate::Scope) -> crate::Result { InplaceAdd::new().build(x, i, v, scope) } + /// Builder for the `InplaceSub` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InplaceSub { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InplaceSub' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InplaceSubInst { + /// An instance of a fully built InplaceSub Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InplaceSub { /// Creates a new `InplaceSub`. @@ -46986,27 +57179,10 @@ impl InplaceSub { } /// Builds the `InplaceSub` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - x: O0, - i: O1, - v: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, x: O0, i: O1, v: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), i.into(), v.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - i: crate::Output, - v: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, i: crate::Output, v: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InplaceSub", |nd| { nd.add_input(x); nd.add_input(i); @@ -47014,33 +57190,64 @@ impl InplaceSub { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InplaceSub` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, x: O0, i: O1, v: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), i.into(), v.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, i: crate::Output, v: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InplaceSub", |nd| { + nd.add_input(x); + nd.add_input(i); + nd.add_input(v); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InplaceSubInst{op}) + } +} +impl InplaceSubInst { + /// Returns the 'y' output of this 'InplaceSub' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InplaceSubInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InplaceSub::new().build(x, i, v, scope)`. -pub fn inplace_sub< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - x: O0, - i: O1, - v: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn inplace_sub, O1: ::std::convert::Into, O2: ::std::convert::Into>(x: O0, i: O1, v: O2, scope: &mut crate::Scope) -> crate::Result { InplaceSub::new().build(x, i, v, scope) } + /// Builder for the `InplaceUpdate` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InplaceUpdate { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InplaceUpdate' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InplaceUpdateInst { + /// An instance of a fully built InplaceUpdate Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InplaceUpdate { /// Creates a new `InplaceUpdate`. @@ -47061,27 +57268,10 @@ impl InplaceUpdate { } /// Builds the `InplaceUpdate` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - x: O0, - i: O1, - v: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, x: O0, i: O1, v: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), i.into(), v.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - i: crate::Output, - v: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, i: crate::Output, v: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InplaceUpdate", |nd| { nd.add_input(x); nd.add_input(i); @@ -47089,27 +57279,52 @@ impl InplaceUpdate { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InplaceUpdate` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, x: O0, i: O1, v: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), i.into(), v.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, i: crate::Output, v: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InplaceUpdate", |nd| { + nd.add_input(x); + nd.add_input(i); + nd.add_input(v); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InplaceUpdateInst{op}) + } +} +impl InplaceUpdateInst { + /// Returns the 'y' output of this 'InplaceUpdate' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InplaceUpdateInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InplaceUpdate::new().build(x, i, v, scope)`. -pub fn inplace_update< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - x: O0, - i: O1, - v: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn inplace_update, O1: ::std::convert::Into, O2: ::std::convert::Into>(x: O0, i: O1, v: O2, scope: &mut crate::Scope) -> crate::Result { InplaceUpdate::new().build(x, i, v, scope) } + /// Builder for the `InterleaveDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InterleaveDataset { @@ -47120,6 +57335,12 @@ pub struct InterleaveDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'InterleaveDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InterleaveDatasetInst { + /// An instance of a fully built InterleaveDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InterleaveDataset { /// Creates a new `InterleaveDataset`. @@ -47128,46 +57349,31 @@ impl InterleaveDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -47179,36 +57385,10 @@ impl InterleaveDataset { } /// Builds the `InterleaveDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - cycle_length.into(), - block_length.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - cycle_length: crate::Output, - block_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InterleaveDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -47217,53 +57397,89 @@ impl InterleaveDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InterleaveDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InterleaveDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(cycle_length); + nd.add_input(block_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InterleaveDatasetInst{op}) + } +} +impl InterleaveDatasetInst { + /// Returns the 'handle' output of this 'InterleaveDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InterleaveDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InterleaveDataset::new().build(input_dataset, other_arguments, cycle_length, block_length, scope)`. -pub fn interleave_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - scope: &mut crate::Scope, -) -> crate::Result { - InterleaveDataset::new().build( - input_dataset, - other_arguments, - cycle_length, - block_length, - scope, - ) +pub fn interleave_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, scope: &mut crate::Scope) -> crate::Result { + InterleaveDataset::new().build(input_dataset, other_arguments, cycle_length, block_length, scope) } + /// Builder for the `Inv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Inv { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Inv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InvInst { + /// An instance of a fully built Inv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Inv { /// Creates a new `Inv`. @@ -47284,45 +57500,71 @@ impl Inv { } /// Builds the `Inv` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Inv", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Inv` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Inv", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InvInst{op}) + } +} +impl InvInst { + /// Returns the 'y' output of this 'Inv' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InvInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Inv::new().build(x, scope)`. -pub fn inv>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn inv>(x: O0, scope: &mut crate::Scope) -> crate::Result { Inv::new().build(x, scope) } + /// Builder for the `InvGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InvGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InvGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InvGradInst { + /// An instance of a fully built InvGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InvGrad { /// Creates a new `InvGrad`. @@ -47343,55 +57585,73 @@ impl InvGrad { } /// Builds the `InvGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - y: O0, - dy: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(y.into(), dy.into(), scope) } - - fn build_impl( - &self, - y: crate::Output, - dy: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InvGrad", |nd| { nd.add_input(y); nd.add_input(dy); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InvGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(y.into(), dy.into(), scope) + } + fn build_instance_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InvGrad", |nd| { + nd.add_input(y); + nd.add_input(dy); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InvGradInst{op}) + } +} +impl InvGradInst { + /// Returns the 'z' output of this 'InvGrad' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InvGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InvGrad::new().build(y, dy, scope)`. -pub fn inv_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - y: O0, - dy: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn inv_grad, O1: ::std::convert::Into>(y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { InvGrad::new().build(y, dy, scope) } + /// Builder for the `Invert` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Invert { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Invert' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InvertInst { + /// An instance of a fully built Invert Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Invert { /// Creates a new `Invert`. @@ -47412,45 +57672,71 @@ impl Invert { } /// Builds the `Invert` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Invert", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Invert` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Invert", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InvertInst{op}) + } +} +impl InvertInst { + /// Returns the 'y' output of this 'Invert' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InvertInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Invert::new().build(x, scope)`. -pub fn invert>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn invert>(x: O0, scope: &mut crate::Scope) -> crate::Result { Invert::new().build(x, scope) } + /// Builder for the `InvertPermutation` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct InvertPermutation { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'InvertPermutation' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct InvertPermutationInst { + /// An instance of a fully built InvertPermutation Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl InvertPermutation { /// Creates a new `InvertPermutation`. @@ -47471,44 +57757,70 @@ impl InvertPermutation { } /// Builds the `InvertPermutation` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("InvertPermutation", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `InvertPermutation` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("InvertPermutation", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(InvertPermutationInst{op}) + } +} +impl InvertPermutationInst { + /// Returns the 'y' output of this 'InvertPermutation' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for InvertPermutationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `InvertPermutation::new().build(x, scope)`. -pub fn invert_permutation>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn invert_permutation>(x: O0, scope: &mut crate::Scope) -> crate::Result { InvertPermutation::new().build(x, scope) } + /// Builder for the `IsBoostedTreesEnsembleInitialized` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IsBoostedTreesEnsembleInitialized { control_inputs: ::std::vec::Vec, } +/// An instance of 'IsBoostedTreesEnsembleInitialized' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IsBoostedTreesEnsembleInitializedInst { + /// An instance of a fully built IsBoostedTreesEnsembleInitialized Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IsBoostedTreesEnsembleInitialized { /// Creates a new `IsBoostedTreesEnsembleInitialized`. @@ -47523,19 +57835,10 @@ impl IsBoostedTreesEnsembleInitialized { } /// Builds the `IsBoostedTreesEnsembleInitialized` operation. - pub fn build>( - &self, - tree_ensemble_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, tree_ensemble_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tree_ensemble_handle.into(), scope) } - - fn build_impl( - &self, - tree_ensemble_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tree_ensemble_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IsBoostedTreesEnsembleInitialized", |nd| { nd.add_input(tree_ensemble_handle); for op in &self.control_inputs { @@ -47544,20 +57847,52 @@ impl IsBoostedTreesEnsembleInitialized { ::std::result::Result::Ok(()) }) } -} + /// Builds the `IsBoostedTreesEnsembleInitialized` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, tree_ensemble_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tree_ensemble_handle.into(), scope) + } + fn build_instance_impl(&self, tree_ensemble_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IsBoostedTreesEnsembleInitialized", |nd| { + nd.add_input(tree_ensemble_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(IsBoostedTreesEnsembleInitializedInst{op}) + } +} +impl IsBoostedTreesEnsembleInitializedInst { + /// Returns the 'is_initialized' output of this 'IsBoostedTreesEnsembleInitialized' operation. + pub fn is_initialized(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IsBoostedTreesEnsembleInitializedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IsBoostedTreesEnsembleInitialized::new().build(tree_ensemble_handle, scope)`. -pub fn is_boosted_trees_ensemble_initialized>( - tree_ensemble_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn is_boosted_trees_ensemble_initialized>(tree_ensemble_handle: O0, scope: &mut crate::Scope) -> crate::Result { IsBoostedTreesEnsembleInitialized::new().build(tree_ensemble_handle, scope) } + /// Builder for the `IsBoostedTreesQuantileStreamResourceInitialized` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IsBoostedTreesQuantileStreamResourceInitialized { control_inputs: ::std::vec::Vec, } +/// An instance of 'IsBoostedTreesQuantileStreamResourceInitialized' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IsBoostedTreesQuantileStreamResourceInitializedInst { + /// An instance of a fully built IsBoostedTreesQuantileStreamResourceInitialized Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IsBoostedTreesQuantileStreamResourceInitialized { /// Creates a new `IsBoostedTreesQuantileStreamResourceInitialized`. @@ -47572,19 +57907,10 @@ impl IsBoostedTreesQuantileStreamResourceInitialized { } /// Builds the `IsBoostedTreesQuantileStreamResourceInitialized` operation. - pub fn build>( - &self, - quantile_stream_resource_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, quantile_stream_resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(quantile_stream_resource_handle.into(), scope) } - - fn build_impl( - &self, - quantile_stream_resource_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, quantile_stream_resource_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IsBoostedTreesQuantileStreamResourceInitialized", |nd| { nd.add_input(quantile_stream_resource_handle); for op in &self.control_inputs { @@ -47593,24 +57919,53 @@ impl IsBoostedTreesQuantileStreamResourceInitialized { ::std::result::Result::Ok(()) }) } -} + /// Builds the `IsBoostedTreesQuantileStreamResourceInitialized` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, quantile_stream_resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(quantile_stream_resource_handle.into(), scope) + } + fn build_instance_impl(&self, quantile_stream_resource_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IsBoostedTreesQuantileStreamResourceInitialized", |nd| { + nd.add_input(quantile_stream_resource_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(IsBoostedTreesQuantileStreamResourceInitializedInst{op}) + } +} +impl IsBoostedTreesQuantileStreamResourceInitializedInst { + /// Returns the 'is_initialized' output of this 'IsBoostedTreesQuantileStreamResourceInitialized' operation. + pub fn is_initialized(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IsBoostedTreesQuantileStreamResourceInitializedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IsBoostedTreesQuantileStreamResourceInitialized::new().build(quantile_stream_resource_handle, scope)`. -pub fn is_boosted_trees_quantile_stream_resource_initialized< - O0: ::std::convert::Into, ->( - quantile_stream_resource_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { - IsBoostedTreesQuantileStreamResourceInitialized::new() - .build(quantile_stream_resource_handle, scope) +pub fn is_boosted_trees_quantile_stream_resource_initialized>(quantile_stream_resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { + IsBoostedTreesQuantileStreamResourceInitialized::new().build(quantile_stream_resource_handle, scope) } + /// Builder for the `IsFinite` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IsFinite { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IsFinite' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IsFiniteInst { + /// An instance of a fully built IsFinite Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IsFinite { /// Creates a new `IsFinite`. @@ -47631,45 +57986,71 @@ impl IsFinite { } /// Builds the `IsFinite` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IsFinite", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IsFinite` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IsFinite", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IsFiniteInst{op}) + } +} +impl IsFiniteInst { + /// Returns the 'y' output of this 'IsFinite' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IsFiniteInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IsFinite::new().build(x, scope)`. -pub fn is_finite>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn is_finite>(x: O0, scope: &mut crate::Scope) -> crate::Result { IsFinite::new().build(x, scope) } + /// Builder for the `IsInf` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IsInf { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IsInf' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IsInfInst { + /// An instance of a fully built IsInf Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IsInf { /// Creates a new `IsInf`. @@ -47690,45 +58071,71 @@ impl IsInf { } /// Builds the `IsInf` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IsInf", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IsInf` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IsInf", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IsInfInst{op}) + } +} +impl IsInfInst { + /// Returns the 'y' output of this 'IsInf' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IsInfInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IsInf::new().build(x, scope)`. -pub fn is_inf>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn is_inf>(x: O0, scope: &mut crate::Scope) -> crate::Result { IsInf::new().build(x, scope) } + /// Builder for the `IsNan` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IsNan { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IsNan' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IsNanInst { + /// An instance of a fully built IsNan Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IsNan { /// Creates a new `IsNan`. @@ -47749,45 +58156,71 @@ impl IsNan { } /// Builds the `IsNan` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IsNan", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IsNan` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IsNan", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IsNanInst{op}) + } +} +impl IsNanInst { + /// Returns the 'y' output of this 'IsNan' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IsNanInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IsNan::new().build(x, scope)`. -pub fn is_nan>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn is_nan>(x: O0, scope: &mut crate::Scope) -> crate::Result { IsNan::new().build(x, scope) } + /// Builder for the `IsTPUEmbeddingInitialized` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IsTPUEmbeddingInitialized { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'IsTPUEmbeddingInitialized' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IsTPUEmbeddingInitializedInst { + /// An instance of a fully built IsTPUEmbeddingInitialized Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IsTPUEmbeddingInitialized { /// Creates a new `IsTPUEmbeddingInitialized`. @@ -47796,10 +58229,7 @@ impl IsTPUEmbeddingInitialized { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -47811,33 +58241,69 @@ impl IsTPUEmbeddingInitialized { } /// Builds the `IsTPUEmbeddingInitialized` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IsTPUEmbeddingInitialized", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IsTPUEmbeddingInitialized` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IsTPUEmbeddingInitialized", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IsTPUEmbeddingInitializedInst{op}) + } +} +impl IsTPUEmbeddingInitializedInst { + /// Returns the 'is_tpu_embedding_initialized' output of this 'IsTPUEmbeddingInitialized' operation. + pub fn is_tpu_embedding_initialized(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IsTPUEmbeddingInitializedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IsTPUEmbeddingInitialized::new().build(scope)`. -pub fn is_tpuembedding_initialized(scope: &mut crate::Scope) -> crate::Result { +pub fn is_tpuembedding_initialized<>(scope: &mut crate::Scope) -> crate::Result { IsTPUEmbeddingInitialized::new().build(scope) } + /// Builder for the `IsVariableInitialized` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IsVariableInitialized { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IsVariableInitialized' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IsVariableInitializedInst { + /// An instance of a fully built IsVariableInitialized Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IsVariableInitialized { /// Creates a new `IsVariableInitialized`. @@ -47858,39 +58324,59 @@ impl IsVariableInitialized { } /// Builds the `IsVariableInitialized` operation. - pub fn build>( - &self, - ref_: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, ref_: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IsVariableInitialized", |nd| { nd.add_input(ref_); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IsVariableInitialized` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, ref_: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IsVariableInitialized", |nd| { + nd.add_input(ref_); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IsVariableInitializedInst{op}) + } +} +impl IsVariableInitializedInst { + /// Returns the 'is_initialized' output of this 'IsVariableInitialized' operation. + pub fn is_initialized(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IsVariableInitializedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IsVariableInitialized::new().build(ref_, scope)`. -pub fn is_variable_initialized>( - ref_: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn is_variable_initialized>(ref_: O0, scope: &mut crate::Scope) -> crate::Result { IsVariableInitialized::new().build(ref_, scope) } + /// Builder for the `IsotonicRegression` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IsotonicRegression { @@ -47898,6 +58384,12 @@ pub struct IsotonicRegression { output_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'IsotonicRegression' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IsotonicRegressionInst { + /// An instance of a fully built IsotonicRegression Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IsotonicRegression { /// Creates a new `IsotonicRegression`. @@ -47912,10 +58404,7 @@ impl IsotonicRegression { } /// Sets the `output_dtype` attribute. - pub fn output_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_dtype>(mut self, value: ArgType) -> Self { self.output_dtype = ::std::option::Option::Some(value.into()); self } @@ -47927,42 +58416,72 @@ impl IsotonicRegression { } /// Builds the `IsotonicRegression` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IsotonicRegression", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_dtype { - nd.set_attr_type("output_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_dtype { + nd.set_attr_type("output_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IsotonicRegression` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IsotonicRegression", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_dtype { + nd.set_attr_type("output_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IsotonicRegressionInst{op}) + } +} +impl IsotonicRegressionInst { + /// Returns the 'output' output of this 'IsotonicRegression' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'segments' output of this 'IsotonicRegression' operation. + pub fn segments(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for IsotonicRegressionInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IsotonicRegression::new().build(input, scope)`. -pub fn isotonic_regression>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn isotonic_regression>(input: O0, scope: &mut crate::Scope) -> crate::Result { IsotonicRegression::new().build(input, scope) } + /// Builder for the `Iterator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Iterator { @@ -47972,6 +58491,12 @@ pub struct Iterator { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Iterator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IteratorInst { + /// An instance of a fully built Iterator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Iterator { /// Creates a new `Iterator`. @@ -47980,37 +58505,25 @@ impl Iterator { } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -48022,36 +58535,75 @@ impl Iterator { } /// Builds the `Iterator` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Iterator", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Iterator` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Iterator", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IteratorInst{op}) + } +} +impl IteratorInst { + /// Returns the 'handle' output of this 'Iterator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IteratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Iterator::new().build(scope)`. -pub fn iterator(scope: &mut crate::Scope) -> crate::Result { +pub fn iterator<>(scope: &mut crate::Scope) -> crate::Result { Iterator::new().build(scope) } + /// Builder for the `IteratorFromStringHandle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IteratorFromStringHandle { @@ -48059,6 +58611,12 @@ pub struct IteratorFromStringHandle { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'IteratorFromStringHandle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IteratorFromStringHandleInst { + /// An instance of a fully built IteratorFromStringHandle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IteratorFromStringHandle { /// Creates a new `IteratorFromStringHandle`. @@ -48067,19 +58625,13 @@ impl IteratorFromStringHandle { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -48091,42 +58643,65 @@ impl IteratorFromStringHandle { } /// Builds the `IteratorFromStringHandle` operation. - pub fn build>( - &self, - string_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, string_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(string_handle.into(), scope) } - - fn build_impl( - &self, - string_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, string_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IteratorFromStringHandle", |nd| { nd.add_input(string_handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IteratorFromStringHandle` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, string_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(string_handle.into(), scope) + } + fn build_instance_impl(&self, string_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IteratorFromStringHandle", |nd| { + nd.add_input(string_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IteratorFromStringHandleInst{op}) + } +} +impl IteratorFromStringHandleInst { + /// Returns the 'resource_handle' output of this 'IteratorFromStringHandle' operation. + pub fn resource_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IteratorFromStringHandleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IteratorFromStringHandle::new().build(string_handle, scope)`. -pub fn iterator_from_string_handle>( - string_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn iterator_from_string_handle>(string_handle: O0, scope: &mut crate::Scope) -> crate::Result { IteratorFromStringHandle::new().build(string_handle, scope) } + /// Builder for the `IteratorFromStringHandleV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IteratorFromStringHandleV2 { @@ -48134,6 +58709,12 @@ pub struct IteratorFromStringHandleV2 { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'IteratorFromStringHandleV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IteratorFromStringHandleV2Inst { + /// An instance of a fully built IteratorFromStringHandleV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IteratorFromStringHandleV2 { /// Creates a new `IteratorFromStringHandleV2`. @@ -48142,19 +58723,13 @@ impl IteratorFromStringHandleV2 { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -48166,47 +58741,76 @@ impl IteratorFromStringHandleV2 { } /// Builds the `IteratorFromStringHandleV2` operation. - pub fn build>( - &self, - string_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, string_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(string_handle.into(), scope) } - - fn build_impl( - &self, - string_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, string_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IteratorFromStringHandleV2", |nd| { nd.add_input(string_handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IteratorFromStringHandleV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, string_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(string_handle.into(), scope) + } + fn build_instance_impl(&self, string_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IteratorFromStringHandleV2", |nd| { + nd.add_input(string_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IteratorFromStringHandleV2Inst{op}) + } +} +impl IteratorFromStringHandleV2Inst { + /// Returns the 'resource_handle' output of this 'IteratorFromStringHandleV2' operation. + pub fn resource_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IteratorFromStringHandleV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IteratorFromStringHandleV2::new().build(string_handle, scope)`. -pub fn iterator_from_string_handle_v2>( - string_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn iterator_from_string_handle_v2>(string_handle: O0, scope: &mut crate::Scope) -> crate::Result { IteratorFromStringHandleV2::new().build(string_handle, scope) } + /// Builder for the `IteratorGetDevice` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IteratorGetDevice { control_inputs: ::std::vec::Vec, } +/// An instance of 'IteratorGetDevice' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IteratorGetDeviceInst { + /// An instance of a fully built IteratorGetDevice Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IteratorGetDevice { /// Creates a new `IteratorGetDevice`. @@ -48221,19 +58825,10 @@ impl IteratorGetDevice { } /// Builds the `IteratorGetDevice` operation. - pub fn build>( - &self, - resource: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IteratorGetDevice", |nd| { nd.add_input(resource); for op in &self.control_inputs { @@ -48242,15 +58837,41 @@ impl IteratorGetDevice { ::std::result::Result::Ok(()) }) } -} + /// Builds the `IteratorGetDevice` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IteratorGetDevice", |nd| { + nd.add_input(resource); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(IteratorGetDeviceInst{op}) + } +} +impl IteratorGetDeviceInst { + /// Returns the 'device' output of this 'IteratorGetDevice' operation. + pub fn device(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IteratorGetDeviceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IteratorGetDevice::new().build(resource, scope)`. -pub fn iterator_get_device>( - resource: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn iterator_get_device>(resource: O0, scope: &mut crate::Scope) -> crate::Result { IteratorGetDevice::new().build(resource, scope) } + /// Builder for the `IteratorGetNext` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IteratorGetNext { @@ -48258,6 +58879,12 @@ pub struct IteratorGetNext { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'IteratorGetNext' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IteratorGetNextInst { + /// An instance of a fully built IteratorGetNext Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IteratorGetNext { /// Creates a new `IteratorGetNext`. @@ -48266,19 +58893,13 @@ impl IteratorGetNext { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -48290,42 +58911,65 @@ impl IteratorGetNext { } /// Builds the `IteratorGetNext` operation. - pub fn build>( - &self, - iterator: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, iterator: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(iterator.into(), scope) } - - fn build_impl( - &self, - iterator: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IteratorGetNext", |nd| { nd.add_input(iterator); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IteratorGetNext` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, iterator: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(iterator.into(), scope) + } + fn build_instance_impl(&self, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IteratorGetNext", |nd| { + nd.add_input(iterator); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IteratorGetNextInst{op}) + } +} +impl IteratorGetNextInst { + /// Returns the 'components' output of this 'IteratorGetNext' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IteratorGetNextInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IteratorGetNext::new().build(iterator, scope)`. -pub fn iterator_get_next>( - iterator: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn iterator_get_next>(iterator: O0, scope: &mut crate::Scope) -> crate::Result { IteratorGetNext::new().build(iterator, scope) } + /// Builder for the `IteratorGetNextAsOptional` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IteratorGetNextAsOptional { @@ -48333,6 +58977,12 @@ pub struct IteratorGetNextAsOptional { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'IteratorGetNextAsOptional' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IteratorGetNextAsOptionalInst { + /// An instance of a fully built IteratorGetNextAsOptional Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IteratorGetNextAsOptional { /// Creates a new `IteratorGetNextAsOptional`. @@ -48341,19 +58991,13 @@ impl IteratorGetNextAsOptional { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -48365,42 +59009,65 @@ impl IteratorGetNextAsOptional { } /// Builds the `IteratorGetNextAsOptional` operation. - pub fn build>( - &self, - iterator: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, iterator: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(iterator.into(), scope) } - - fn build_impl( - &self, - iterator: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IteratorGetNextAsOptional", |nd| { nd.add_input(iterator); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IteratorGetNextAsOptional` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, iterator: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(iterator.into(), scope) + } + fn build_instance_impl(&self, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IteratorGetNextAsOptional", |nd| { + nd.add_input(iterator); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IteratorGetNextAsOptionalInst{op}) + } +} +impl IteratorGetNextAsOptionalInst { + /// Returns the 'optional' output of this 'IteratorGetNextAsOptional' operation. + pub fn optional(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IteratorGetNextAsOptionalInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IteratorGetNextAsOptional::new().build(iterator, scope)`. -pub fn iterator_get_next_as_optional>( - iterator: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn iterator_get_next_as_optional>(iterator: O0, scope: &mut crate::Scope) -> crate::Result { IteratorGetNextAsOptional::new().build(iterator, scope) } + /// Builder for the `IteratorGetNextSync` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IteratorGetNextSync { @@ -48408,6 +59075,12 @@ pub struct IteratorGetNextSync { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'IteratorGetNextSync' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IteratorGetNextSyncInst { + /// An instance of a fully built IteratorGetNextSync Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IteratorGetNextSync { /// Creates a new `IteratorGetNextSync`. @@ -48416,19 +59089,13 @@ impl IteratorGetNextSync { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -48440,47 +59107,76 @@ impl IteratorGetNextSync { } /// Builds the `IteratorGetNextSync` operation. - pub fn build>( - &self, - iterator: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, iterator: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(iterator.into(), scope) } - - fn build_impl( - &self, - iterator: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IteratorGetNextSync", |nd| { nd.add_input(iterator); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IteratorGetNextSync` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, iterator: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(iterator.into(), scope) + } + fn build_instance_impl(&self, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IteratorGetNextSync", |nd| { + nd.add_input(iterator); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IteratorGetNextSyncInst{op}) + } +} +impl IteratorGetNextSyncInst { + /// Returns the 'components' output of this 'IteratorGetNextSync' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IteratorGetNextSyncInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IteratorGetNextSync::new().build(iterator, scope)`. -pub fn iterator_get_next_sync>( - iterator: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn iterator_get_next_sync>(iterator: O0, scope: &mut crate::Scope) -> crate::Result { IteratorGetNextSync::new().build(iterator, scope) } + /// Builder for the `IteratorToStringHandle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IteratorToStringHandle { control_inputs: ::std::vec::Vec, } +/// An instance of 'IteratorToStringHandle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IteratorToStringHandleInst { + /// An instance of a fully built IteratorToStringHandle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IteratorToStringHandle { /// Creates a new `IteratorToStringHandle`. @@ -48495,19 +59191,10 @@ impl IteratorToStringHandle { } /// Builds the `IteratorToStringHandle` operation. - pub fn build>( - &self, - resource_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource_handle.into(), scope) } - - fn build_impl( - &self, - resource_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IteratorToStringHandle", |nd| { nd.add_input(resource_handle); for op in &self.control_inputs { @@ -48516,15 +59203,41 @@ impl IteratorToStringHandle { ::std::result::Result::Ok(()) }) } -} + /// Builds the `IteratorToStringHandle` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource_handle.into(), scope) + } + fn build_instance_impl(&self, resource_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IteratorToStringHandle", |nd| { + nd.add_input(resource_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(IteratorToStringHandleInst{op}) + } +} +impl IteratorToStringHandleInst { + /// Returns the 'string_handle' output of this 'IteratorToStringHandle' operation. + pub fn string_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IteratorToStringHandleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IteratorToStringHandle::new().build(resource_handle, scope)`. -pub fn iterator_to_string_handle>( - resource_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn iterator_to_string_handle>(resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { IteratorToStringHandle::new().build(resource_handle, scope) } + /// Builder for the `IteratorV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct IteratorV2 { @@ -48534,6 +59247,12 @@ pub struct IteratorV2 { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'IteratorV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct IteratorV2Inst { + /// An instance of a fully built IteratorV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl IteratorV2 { /// Creates a new `IteratorV2`. @@ -48542,37 +59261,25 @@ impl IteratorV2 { } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -48584,41 +59291,86 @@ impl IteratorV2 { } /// Builds the `IteratorV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("IteratorV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `IteratorV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("IteratorV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(IteratorV2Inst{op}) + } +} +impl IteratorV2Inst { + /// Returns the 'handle' output of this 'IteratorV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for IteratorV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `IteratorV2::new().build(scope)`. -pub fn iterator_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn iterator_v2<>(scope: &mut crate::Scope) -> crate::Result { IteratorV2::new().build(scope) } + /// Builder for the `KMC2ChainInitialization` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct KMC2ChainInitialization { control_inputs: ::std::vec::Vec, } +/// An instance of 'KMC2ChainInitialization' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct KMC2ChainInitializationInst { + /// An instance of a fully built KMC2ChainInitialization Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl KMC2ChainInitialization { /// Creates a new `KMC2ChainInitialization`. @@ -48633,24 +59385,10 @@ impl KMC2ChainInitialization { } /// Builds the `KMC2ChainInitialization` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - distances: O0, - seed: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, distances: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(distances.into(), seed.into(), scope) } - - fn build_impl( - &self, - distances: crate::Output, - seed: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, distances: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("KMC2ChainInitialization", |nd| { nd.add_input(distances); nd.add_input(seed); @@ -48660,24 +59398,53 @@ impl KMC2ChainInitialization { ::std::result::Result::Ok(()) }) } -} + /// Builds the `KMC2ChainInitialization` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, distances: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(distances.into(), seed.into(), scope) + } + fn build_instance_impl(&self, distances: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("KMC2ChainInitialization", |nd| { + nd.add_input(distances); + nd.add_input(seed); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(KMC2ChainInitializationInst{op}) + } +} +impl KMC2ChainInitializationInst { + /// Returns the 'index' output of this 'KMC2ChainInitialization' operation. + pub fn index(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for KMC2ChainInitializationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `KMC2ChainInitialization::new().build(distances, seed, scope)`. -pub fn kmc2_chain_initialization< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - distances: O0, - seed: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn kmc2_chain_initialization, O1: ::std::convert::Into>(distances: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { KMC2ChainInitialization::new().build(distances, seed, scope) } + /// Builder for the `KmeansPlusPlusInitialization` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct KmeansPlusPlusInitialization { control_inputs: ::std::vec::Vec, } +/// An instance of 'KmeansPlusPlusInitialization' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct KmeansPlusPlusInitializationInst { + /// An instance of a fully built KmeansPlusPlusInitialization Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl KmeansPlusPlusInitialization { /// Creates a new `KmeansPlusPlusInitialization`. @@ -48692,36 +59459,10 @@ impl KmeansPlusPlusInitialization { } /// Builds the `KmeansPlusPlusInitialization` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - points: O0, - num_to_sample: O1, - seed: O2, - num_retries_per_sample: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - points.into(), - num_to_sample.into(), - seed.into(), - num_retries_per_sample.into(), - scope, - ) - } - - fn build_impl( - &self, - points: crate::Output, - num_to_sample: crate::Output, - seed: crate::Output, - num_retries_per_sample: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, points: O0, num_to_sample: O1, seed: O2, num_retries_per_sample: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(points.into(), num_to_sample.into(), seed.into(), num_retries_per_sample.into(), scope) + } + fn build_impl(&self, points: crate::Output, num_to_sample: crate::Output, seed: crate::Output, num_retries_per_sample: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("KmeansPlusPlusInitialization", |nd| { nd.add_input(points); nd.add_input(num_to_sample); @@ -48733,35 +59474,56 @@ impl KmeansPlusPlusInitialization { ::std::result::Result::Ok(()) }) } -} + /// Builds the `KmeansPlusPlusInitialization` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, points: O0, num_to_sample: O1, seed: O2, num_retries_per_sample: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(points.into(), num_to_sample.into(), seed.into(), num_retries_per_sample.into(), scope) + } + fn build_instance_impl(&self, points: crate::Output, num_to_sample: crate::Output, seed: crate::Output, num_retries_per_sample: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("KmeansPlusPlusInitialization", |nd| { + nd.add_input(points); + nd.add_input(num_to_sample); + nd.add_input(seed); + nd.add_input(num_retries_per_sample); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(KmeansPlusPlusInitializationInst{op}) + } +} +impl KmeansPlusPlusInitializationInst { + /// Returns the 'samples' output of this 'KmeansPlusPlusInitialization' operation. + pub fn samples(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for KmeansPlusPlusInitializationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `KmeansPlusPlusInitialization::new().build(points, num_to_sample, seed, num_retries_per_sample, scope)`. -pub fn kmeans_plus_plus_initialization< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - points: O0, - num_to_sample: O1, - seed: O2, - num_retries_per_sample: O3, - scope: &mut crate::Scope, -) -> crate::Result { - KmeansPlusPlusInitialization::new().build( - points, - num_to_sample, - seed, - num_retries_per_sample, - scope, - ) +pub fn kmeans_plus_plus_initialization, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(points: O0, num_to_sample: O1, seed: O2, num_retries_per_sample: O3, scope: &mut crate::Scope) -> crate::Result { + KmeansPlusPlusInitialization::new().build(points, num_to_sample, seed, num_retries_per_sample, scope) } + /// Builder for the `KthOrderStatistic` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct KthOrderStatistic { k: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'KthOrderStatistic' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct KthOrderStatisticInst { + /// An instance of a fully built KthOrderStatistic Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl KthOrderStatistic { /// Creates a new `KthOrderStatistic`. @@ -48782,45 +59544,71 @@ impl KthOrderStatistic { } /// Builds the `KthOrderStatistic` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("KthOrderStatistic", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.k { - nd.set_attr_int("k", *value)?; - } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `KthOrderStatistic` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("KthOrderStatistic", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(KthOrderStatisticInst{op}) + } +} +impl KthOrderStatisticInst { + /// Returns the 'output' output of this 'KthOrderStatistic' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for KthOrderStatisticInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `KthOrderStatistic::new().build(input, scope)`. -pub fn kth_order_statistic>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn kth_order_statistic>(input: O0, scope: &mut crate::Scope) -> crate::Result { KthOrderStatistic::new().build(input, scope) } + /// Builder for the `L2Loss` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct L2Loss { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'L2Loss' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct L2LossInst { + /// An instance of a fully built L2Loss Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl L2Loss { /// Creates a new `L2Loss`. @@ -48841,39 +59629,59 @@ impl L2Loss { } /// Builds the `L2Loss` operation. - pub fn build>( - &self, - t: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, t: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(t.into(), scope) } - - fn build_impl( - &self, - t: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, t: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("L2Loss", |nd| { nd.add_input(t); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `L2Loss` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, t: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(t.into(), scope) + } + fn build_instance_impl(&self, t: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("L2Loss", |nd| { + nd.add_input(t); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(L2LossInst{op}) + } +} +impl L2LossInst { + /// Returns the 'output' output of this 'L2Loss' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for L2LossInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `L2Loss::new().build(t, scope)`. -pub fn l2_loss>( - t: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn l2_loss>(t: O0, scope: &mut crate::Scope) -> crate::Result { L2Loss::new().build(t, scope) } + /// Builder for the `LMDBDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LMDBDataset { @@ -48881,6 +59689,12 @@ pub struct LMDBDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LMDBDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LMDBDatasetInst { + /// An instance of a fully built LMDBDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LMDBDataset { /// Creates a new `LMDBDataset`. @@ -48889,19 +59703,13 @@ impl LMDBDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -48913,42 +59721,65 @@ impl LMDBDataset { } /// Builds the `LMDBDataset` operation. - pub fn build>( - &self, - filenames: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, filenames: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(filenames.into(), scope) } - - fn build_impl( - &self, - filenames: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, filenames: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LMDBDataset", |nd| { nd.add_input(filenames); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LMDBDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, filenames: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filenames.into(), scope) + } + fn build_instance_impl(&self, filenames: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LMDBDataset", |nd| { + nd.add_input(filenames); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LMDBDatasetInst{op}) + } +} +impl LMDBDatasetInst { + /// Returns the 'handle' output of this 'LMDBDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LMDBDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LMDBDataset::new().build(filenames, scope)`. -pub fn lmdbdataset>( - filenames: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lmdbdataset>(filenames: O0, scope: &mut crate::Scope) -> crate::Result { LMDBDataset::new().build(filenames, scope) } + /// Builder for the `LMDBReader` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LMDBReader { @@ -48956,6 +59787,12 @@ pub struct LMDBReader { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LMDBReader' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LMDBReaderInst { + /// An instance of a fully built LMDBReader Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LMDBReader { /// Creates a new `LMDBReader`. @@ -48964,19 +59801,13 @@ impl LMDBReader { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -48988,30 +59819,63 @@ impl LMDBReader { } /// Builds the `LMDBReader` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LMDBReader", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LMDBReader` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LMDBReader", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LMDBReaderInst{op}) + } +} +impl LMDBReaderInst { + /// Returns the 'reader_handle' output of this 'LMDBReader' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LMDBReaderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LMDBReader::new().build(scope)`. -pub fn lmdbreader(scope: &mut crate::Scope) -> crate::Result { +pub fn lmdbreader<>(scope: &mut crate::Scope) -> crate::Result { LMDBReader::new().build(scope) } + /// Builder for the `LRN` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LRN { @@ -49022,6 +59886,12 @@ pub struct LRN { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LRN' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LRNInst { + /// An instance of a fully built LRN Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LRN { /// Creates a new `LRN`. @@ -49066,51 +59936,83 @@ impl LRN { } /// Builds the `LRN` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LRN", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.depth_radius { - nd.set_attr_int("depth_radius", *value)?; - } - if let ::std::option::Option::Some(value) = &self.bias { - nd.set_attr_float("bias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.alpha { - nd.set_attr_float("alpha", *value)?; - } - if let ::std::option::Option::Some(value) = &self.beta { - nd.set_attr_float("beta", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.depth_radius { + nd.set_attr_int("depth_radius", *value)?; + } + if let ::std::option::Option::Some(value) = &self.bias { + nd.set_attr_float("bias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.alpha { + nd.set_attr_float("alpha", *value)?; + } + if let ::std::option::Option::Some(value) = &self.beta { + nd.set_attr_float("beta", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LRN` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LRN", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.depth_radius { + nd.set_attr_int("depth_radius", *value)?; + } + if let ::std::option::Option::Some(value) = &self.bias { + nd.set_attr_float("bias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.alpha { + nd.set_attr_float("alpha", *value)?; + } + if let ::std::option::Option::Some(value) = &self.beta { + nd.set_attr_float("beta", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LRNInst{op}) + } +} +impl LRNInst { + /// Returns the 'output' output of this 'LRN' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LRNInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LRN::new().build(input, scope)`. -pub fn lrn>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lrn>(input: O0, scope: &mut crate::Scope) -> crate::Result { LRN::new().build(input, scope) } + /// Builder for the `LRNGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LRNGrad { @@ -49121,6 +60023,12 @@ pub struct LRNGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LRNGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LRNGradInst { + /// An instance of a fully built LRNGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LRNGrad { /// Creates a new `LRNGrad`. @@ -49165,32 +60073,10 @@ impl LRNGrad { } /// Builds the `LRNGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_grads: O0, - input_image: O1, - output_image: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_grads.into(), - input_image.into(), - output_image.into(), - scope, - ) - } - - fn build_impl( - &self, - input_grads: crate::Output, - input_image: crate::Output, - output_image: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_grads: O0, input_image: O1, output_image: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_grads.into(), input_image.into(), output_image.into(), scope) + } + fn build_impl(&self, input_grads: crate::Output, input_image: crate::Output, output_image: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LRNGrad", |nd| { nd.add_input(input_grads); nd.add_input(input_image); @@ -49198,39 +60084,76 @@ impl LRNGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.depth_radius { - nd.set_attr_int("depth_radius", *value)?; - } - if let ::std::option::Option::Some(value) = &self.bias { - nd.set_attr_float("bias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.alpha { - nd.set_attr_float("alpha", *value)?; - } - if let ::std::option::Option::Some(value) = &self.beta { - nd.set_attr_float("beta", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.depth_radius { + nd.set_attr_int("depth_radius", *value)?; + } + if let ::std::option::Option::Some(value) = &self.bias { + nd.set_attr_float("bias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.alpha { + nd.set_attr_float("alpha", *value)?; + } + if let ::std::option::Option::Some(value) = &self.beta { + nd.set_attr_float("beta", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LRNGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_grads: O0, input_image: O1, output_image: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_grads.into(), input_image.into(), output_image.into(), scope) + } + fn build_instance_impl(&self, input_grads: crate::Output, input_image: crate::Output, output_image: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LRNGrad", |nd| { + nd.add_input(input_grads); + nd.add_input(input_image); + nd.add_input(output_image); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.depth_radius { + nd.set_attr_int("depth_radius", *value)?; + } + if let ::std::option::Option::Some(value) = &self.bias { + nd.set_attr_float("bias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.alpha { + nd.set_attr_float("alpha", *value)?; + } + if let ::std::option::Option::Some(value) = &self.beta { + nd.set_attr_float("beta", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LRNGradInst{op}) + } +} +impl LRNGradInst { + /// Returns the 'output' output of this 'LRNGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LRNGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LRNGrad::new().build(input_grads, input_image, output_image, scope)`. -pub fn lrngrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_grads: O0, - input_image: O1, - output_image: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lrngrad, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_grads: O0, input_image: O1, output_image: O2, scope: &mut crate::Scope) -> crate::Result { LRNGrad::new().build(input_grads, input_image, output_image, scope) } + /// Builder for the `LSTMBlockCell` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LSTMBlockCell { @@ -49240,6 +60163,12 @@ pub struct LSTMBlockCell { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LSTMBlockCell' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LSTMBlockCellInst { + /// An instance of a fully built LSTMBlockCell Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LSTMBlockCell { /// Creates a new `LSTMBlockCell`. @@ -49278,52 +60207,10 @@ impl LSTMBlockCell { } /// Builds the `LSTMBlockCell` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - x: O0, - cs_prev: O1, - h_prev: O2, - w: O3, - wci: O4, - wcf: O5, - wco: O6, - b: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - x.into(), - cs_prev.into(), - h_prev.into(), - w.into(), - wci.into(), - wcf.into(), - wco.into(), - b.into(), - scope, - ) - } - - fn build_impl( - &self, - x: crate::Output, - cs_prev: crate::Output, - h_prev: crate::Output, - w: crate::Output, - wci: crate::Output, - wcf: crate::Output, - wco: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, x: O0, cs_prev: O1, h_prev: O2, w: O3, wci: O4, wcf: O5, wco: O6, b: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), scope) + } + fn build_impl(&self, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LSTMBlockCell", |nd| { nd.add_input(x); nd.add_input(cs_prev); @@ -49336,46 +60223,117 @@ impl LSTMBlockCell { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.forget_bias { - nd.set_attr_float("forget_bias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.cell_clip { - nd.set_attr_float("cell_clip", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_peephole { - nd.set_attr_bool("use_peephole", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.forget_bias { + nd.set_attr_float("forget_bias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.cell_clip { + nd.set_attr_float("cell_clip", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LSTMBlockCell` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, x: O0, cs_prev: O1, h_prev: O2, w: O3, wci: O4, wcf: O5, wco: O6, b: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LSTMBlockCell", |nd| { + nd.add_input(x); + nd.add_input(cs_prev); + nd.add_input(h_prev); + nd.add_input(w); + nd.add_input(wci); + nd.add_input(wcf); + nd.add_input(wco); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.forget_bias { + nd.set_attr_float("forget_bias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.cell_clip { + nd.set_attr_float("cell_clip", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LSTMBlockCellInst{op}) + } +} +impl LSTMBlockCellInst { + /// Returns the 'i' output of this 'LSTMBlockCell' operation. + pub fn i(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'cs' output of this 'LSTMBlockCell' operation. + pub fn cs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'f' output of this 'LSTMBlockCell' operation. + pub fn f(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'o' output of this 'LSTMBlockCell' operation. + pub fn o(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'ci' output of this 'LSTMBlockCell' operation. + pub fn ci(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } + /// Returns the 'co' output of this 'LSTMBlockCell' operation. + pub fn co(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 5 + } + } + /// Returns the 'h' output of this 'LSTMBlockCell' operation. + pub fn h(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 6 + } + } +} +impl Into for LSTMBlockCellInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LSTMBlockCell::new().build(x, cs_prev, h_prev, w, wci, wcf, wco, b, scope)`. -pub fn lstmblock_cell< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - x: O0, - cs_prev: O1, - h_prev: O2, - w: O3, - wci: O4, - wcf: O5, - wco: O6, - b: O7, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lstmblock_cell, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(x: O0, cs_prev: O1, h_prev: O2, w: O3, wci: O4, wcf: O5, wco: O6, b: O7, scope: &mut crate::Scope) -> crate::Result { LSTMBlockCell::new().build(x, cs_prev, h_prev, w, wci, wcf, wco, b, scope) } + /// Builder for the `LSTMBlockCellGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LSTMBlockCellGrad { @@ -49383,6 +60341,12 @@ pub struct LSTMBlockCellGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LSTMBlockCellGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LSTMBlockCellGradInst { + /// An instance of a fully built LSTMBlockCellGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LSTMBlockCellGrad { /// Creates a new `LSTMBlockCellGrad`. @@ -49409,84 +60373,10 @@ impl LSTMBlockCellGrad { } /// Builds the `LSTMBlockCellGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - O12: ::std::convert::Into, - O13: ::std::convert::Into, - O14: ::std::convert::Into, - O15: ::std::convert::Into, - >( - &self, - x: O0, - cs_prev: O1, - h_prev: O2, - w: O3, - wci: O4, - wcf: O5, - wco: O6, - b: O7, - i: O8, - cs: O9, - f: O10, - o: O11, - ci: O12, - co: O13, - cs_grad: O14, - h_grad: O15, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - x.into(), - cs_prev.into(), - h_prev.into(), - w.into(), - wci.into(), - wcf.into(), - wco.into(), - b.into(), - i.into(), - cs.into(), - f.into(), - o.into(), - ci.into(), - co.into(), - cs_grad.into(), - h_grad.into(), - scope, - ) - } - - fn build_impl( - &self, - x: crate::Output, - cs_prev: crate::Output, - h_prev: crate::Output, - w: crate::Output, - wci: crate::Output, - wcf: crate::Output, - wco: crate::Output, - b: crate::Output, - i: crate::Output, - cs: crate::Output, - f: crate::Output, - o: crate::Output, - ci: crate::Output, - co: crate::Output, - cs_grad: crate::Output, - h_grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into, O15: ::std::convert::Into>(&self, x: O0, cs_prev: O1, h_prev: O2, w: O3, wci: O4, wcf: O5, wco: O6, b: O7, i: O8, cs: O9, f: O10, o: O11, ci: O12, co: O13, cs_grad: O14, h_grad: O15, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), i.into(), cs.into(), f.into(), o.into(), ci.into(), co.into(), cs_grad.into(), h_grad.into(), scope) + } + fn build_impl(&self, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, i: crate::Output, cs: crate::Output, f: crate::Output, o: crate::Output, ci: crate::Output, co: crate::Output, cs_grad: crate::Output, h_grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LSTMBlockCellGrad", |nd| { nd.add_input(x); nd.add_input(cs_prev); @@ -49507,58 +60397,99 @@ impl LSTMBlockCellGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.use_peephole { - nd.set_attr_bool("use_peephole", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LSTMBlockCellGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into, O15: ::std::convert::Into>(&self, x: O0, cs_prev: O1, h_prev: O2, w: O3, wci: O4, wcf: O5, wco: O6, b: O7, i: O8, cs: O9, f: O10, o: O11, ci: O12, co: O13, cs_grad: O14, h_grad: O15, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), cs_prev.into(), h_prev.into(), w.into(), wci.into(), wcf.into(), wco.into(), b.into(), i.into(), cs.into(), f.into(), o.into(), ci.into(), co.into(), cs_grad.into(), h_grad.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, cs_prev: crate::Output, h_prev: crate::Output, w: crate::Output, wci: crate::Output, wcf: crate::Output, wco: crate::Output, b: crate::Output, i: crate::Output, cs: crate::Output, f: crate::Output, o: crate::Output, ci: crate::Output, co: crate::Output, cs_grad: crate::Output, h_grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LSTMBlockCellGrad", |nd| { + nd.add_input(x); + nd.add_input(cs_prev); + nd.add_input(h_prev); + nd.add_input(w); + nd.add_input(wci); + nd.add_input(wcf); + nd.add_input(wco); + nd.add_input(b); + nd.add_input(i); + nd.add_input(cs); + nd.add_input(f); + nd.add_input(o); + nd.add_input(ci); + nd.add_input(co); + nd.add_input(cs_grad); + nd.add_input(h_grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.use_peephole { + nd.set_attr_bool("use_peephole", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LSTMBlockCellGradInst{op}) + } +} +impl LSTMBlockCellGradInst { + /// Returns the 'cs_prev_grad' output of this 'LSTMBlockCellGrad' operation. + pub fn cs_prev_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'dicfo' output of this 'LSTMBlockCellGrad' operation. + pub fn dicfo(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'wci_grad' output of this 'LSTMBlockCellGrad' operation. + pub fn wci_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'wcf_grad' output of this 'LSTMBlockCellGrad' operation. + pub fn wcf_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'wco_grad' output of this 'LSTMBlockCellGrad' operation. + pub fn wco_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } +} +impl Into for LSTMBlockCellGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LSTMBlockCellGrad::new().build(x, cs_prev, h_prev, w, wci, wcf, wco, b, i, cs, f, o, ci, co, cs_grad, h_grad, scope)`. -pub fn lstmblock_cell_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - O12: ::std::convert::Into, - O13: ::std::convert::Into, - O14: ::std::convert::Into, - O15: ::std::convert::Into, ->( - x: O0, - cs_prev: O1, - h_prev: O2, - w: O3, - wci: O4, - wcf: O5, - wco: O6, - b: O7, - i: O8, - cs: O9, - f: O10, - o: O11, - ci: O12, - co: O13, - cs_grad: O14, - h_grad: O15, - scope: &mut crate::Scope, -) -> crate::Result { - LSTMBlockCellGrad::new().build( - x, cs_prev, h_prev, w, wci, wcf, wco, b, i, cs, f, o, ci, co, cs_grad, h_grad, scope, - ) +pub fn lstmblock_cell_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into, O15: ::std::convert::Into>(x: O0, cs_prev: O1, h_prev: O2, w: O3, wci: O4, wcf: O5, wco: O6, b: O7, i: O8, cs: O9, f: O10, o: O11, ci: O12, co: O13, cs_grad: O14, h_grad: O15, scope: &mut crate::Scope) -> crate::Result { + LSTMBlockCellGrad::new().build(x, cs_prev, h_prev, w, wci, wcf, wco, b, i, cs, f, o, ci, co, cs_grad, h_grad, scope) } + /// Builder for the `LatencyStatsDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LatencyStatsDataset { @@ -49566,6 +60497,12 @@ pub struct LatencyStatsDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LatencyStatsDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LatencyStatsDatasetInst { + /// An instance of a fully built LatencyStatsDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LatencyStatsDataset { /// Creates a new `LatencyStatsDataset`. @@ -49574,19 +60511,13 @@ impl LatencyStatsDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -49598,52 +60529,67 @@ impl LatencyStatsDataset { } /// Builds the `LatencyStatsDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - tag: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), tag.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - tag: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, tag: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LatencyStatsDataset", |nd| { nd.add_input(input_dataset); nd.add_input(tag); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LatencyStatsDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), tag.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, tag: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LatencyStatsDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(tag); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LatencyStatsDatasetInst{op}) + } +} +impl LatencyStatsDatasetInst { + /// Returns the 'handle' output of this 'LatencyStatsDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LatencyStatsDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LatencyStatsDataset::new().build(input_dataset, tag, scope)`. -pub fn latency_stats_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - tag: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn latency_stats_dataset, O1: ::std::convert::Into>(input_dataset: O0, tag: O1, scope: &mut crate::Scope) -> crate::Result { LatencyStatsDataset::new().build(input_dataset, tag, scope) } + /// Builder for the `LeakyRelu` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LeakyRelu { @@ -49651,6 +60597,12 @@ pub struct LeakyRelu { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LeakyRelu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LeakyReluInst { + /// An instance of a fully built LeakyRelu Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LeakyRelu { /// Creates a new `LeakyRelu`. @@ -49677,42 +60629,65 @@ impl LeakyRelu { } /// Builds the `LeakyRelu` operation. - pub fn build>( - &self, - features: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(features.into(), scope) } - - fn build_impl( - &self, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LeakyRelu", |nd| { nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.alpha { - nd.set_attr_float("alpha", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.alpha { + nd.set_attr_float("alpha", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LeakyRelu` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LeakyRelu", |nd| { + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.alpha { + nd.set_attr_float("alpha", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LeakyReluInst{op}) + } +} +impl LeakyReluInst { + /// Returns the 'activations' output of this 'LeakyRelu' operation. + pub fn activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LeakyReluInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LeakyRelu::new().build(features, scope)`. -pub fn leaky_relu>( - features: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn leaky_relu>(features: O0, scope: &mut crate::Scope) -> crate::Result { LeakyRelu::new().build(features, scope) } + /// Builder for the `LeakyReluGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LeakyReluGrad { @@ -49720,6 +60695,12 @@ pub struct LeakyReluGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LeakyReluGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LeakyReluGradInst { + /// An instance of a fully built LeakyReluGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LeakyReluGrad { /// Creates a new `LeakyReluGrad`. @@ -49746,52 +60727,67 @@ impl LeakyReluGrad { } /// Builds the `LeakyReluGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - gradients: O0, - features: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(gradients.into(), features.into(), scope) } - - fn build_impl( - &self, - gradients: crate::Output, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, gradients: crate::Output, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LeakyReluGrad", |nd| { nd.add_input(gradients); nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.alpha { - nd.set_attr_float("alpha", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.alpha { + nd.set_attr_float("alpha", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LeakyReluGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), features.into(), scope) + } + fn build_instance_impl(&self, gradients: crate::Output, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LeakyReluGrad", |nd| { + nd.add_input(gradients); + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.alpha { + nd.set_attr_float("alpha", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LeakyReluGradInst{op}) + } +} +impl LeakyReluGradInst { + /// Returns the 'backprops' output of this 'LeakyReluGrad' operation. + pub fn backprops(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LeakyReluGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LeakyReluGrad::new().build(gradients, features, scope)`. -pub fn leaky_relu_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - gradients: O0, - features: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn leaky_relu_grad, O1: ::std::convert::Into>(gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { LeakyReluGrad::new().build(gradients, features, scope) } + /// Builder for the `LearnedUnigramCandidateSampler` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LearnedUnigramCandidateSampler { @@ -49803,6 +60799,12 @@ pub struct LearnedUnigramCandidateSampler { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LearnedUnigramCandidateSampler' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LearnedUnigramCandidateSamplerInst { + /// An instance of a fully built LearnedUnigramCandidateSampler Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LearnedUnigramCandidateSampler { /// Creates a new `LearnedUnigramCandidateSampler`. @@ -49853,60 +60855,115 @@ impl LearnedUnigramCandidateSampler { } /// Builds the `LearnedUnigramCandidateSampler` operation. - pub fn build>( - &self, - true_classes: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(true_classes.into(), scope) } - - fn build_impl( - &self, - true_classes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LearnedUnigramCandidateSampler", |nd| { nd.add_input(true_classes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_true { - nd.set_attr_int("num_true", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sampled { - nd.set_attr_int("num_sampled", *value)?; - } - if let ::std::option::Option::Some(value) = &self.unique { - nd.set_attr_bool("unique", *value)?; - } - if let ::std::option::Option::Some(value) = &self.range_max { - nd.set_attr_int("range_max", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_max { + nd.set_attr_int("range_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LearnedUnigramCandidateSampler` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(true_classes.into(), scope) + } + fn build_instance_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LearnedUnigramCandidateSampler", |nd| { + nd.add_input(true_classes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_max { + nd.set_attr_int("range_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LearnedUnigramCandidateSamplerInst{op}) + } +} +impl LearnedUnigramCandidateSamplerInst { + /// Returns the 'sampled_candidates' output of this 'LearnedUnigramCandidateSampler' operation. + pub fn sampled_candidates(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'true_expected_count' output of this 'LearnedUnigramCandidateSampler' operation. + pub fn true_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sampled_expected_count' output of this 'LearnedUnigramCandidateSampler' operation. + pub fn sampled_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for LearnedUnigramCandidateSamplerInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LearnedUnigramCandidateSampler::new().build(true_classes, scope)`. -pub fn learned_unigram_candidate_sampler>( - true_classes: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn learned_unigram_candidate_sampler>(true_classes: O0, scope: &mut crate::Scope) -> crate::Result { LearnedUnigramCandidateSampler::new().build(true_classes, scope) } + /// Builder for the `LeftShift` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LeftShift { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LeftShift' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LeftShiftInst { + /// An instance of a fully built LeftShift Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LeftShift { /// Creates a new `LeftShift`. @@ -49927,49 +60984,61 @@ impl LeftShift { } /// Builds the `LeftShift` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LeftShift", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LeftShift` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LeftShift", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LeftShiftInst{op}) + } +} +impl LeftShiftInst { + /// Returns the 'z' output of this 'LeftShift' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LeftShiftInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LeftShift::new().build(x, y, scope)`. -pub fn left_shift< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn left_shift, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { LeftShift::new().build(x, y, scope) } + /// Builder for the `LegacyParallelInterleaveDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LegacyParallelInterleaveDatasetV2 { @@ -49981,6 +61050,12 @@ pub struct LegacyParallelInterleaveDatasetV2 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LegacyParallelInterleaveDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LegacyParallelInterleaveDatasetV2Inst { + /// An instance of a fully built LegacyParallelInterleaveDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LegacyParallelInterleaveDatasetV2 { /// Creates a new `LegacyParallelInterleaveDatasetV2`. @@ -49989,55 +61064,37 @@ impl LegacyParallelInterleaveDatasetV2 { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `deterministic` attribute. - pub fn deterministic>( - mut self, - value: ArgType, - ) -> Self { + pub fn deterministic>(mut self, value: ArgType) -> Self { self.deterministic = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -50049,44 +61106,10 @@ impl LegacyParallelInterleaveDatasetV2 { } /// Builds the `LegacyParallelInterleaveDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - buffer_output_elements: O4, - prefetch_input_elements: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - cycle_length.into(), - block_length.into(), - buffer_output_elements.into(), - prefetch_input_elements.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - cycle_length: crate::Output, - block_length: crate::Output, - buffer_output_elements: crate::Output, - prefetch_input_elements: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, buffer_output_elements: O4, prefetch_input_elements: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), buffer_output_elements.into(), prefetch_input_elements.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, buffer_output_elements: crate::Output, prefetch_input_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LegacyParallelInterleaveDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -50097,62 +61120,97 @@ impl LegacyParallelInterleaveDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.deterministic { - nd.set_attr_string("deterministic", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LegacyParallelInterleaveDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, buffer_output_elements: O4, prefetch_input_elements: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), buffer_output_elements.into(), prefetch_input_elements.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, buffer_output_elements: crate::Output, prefetch_input_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LegacyParallelInterleaveDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(cycle_length); + nd.add_input(block_length); + nd.add_input(buffer_output_elements); + nd.add_input(prefetch_input_elements); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LegacyParallelInterleaveDatasetV2Inst{op}) + } +} +impl LegacyParallelInterleaveDatasetV2Inst { + /// Returns the 'handle' output of this 'LegacyParallelInterleaveDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LegacyParallelInterleaveDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LegacyParallelInterleaveDatasetV2::new().build(input_dataset, other_arguments, cycle_length, block_length, buffer_output_elements, prefetch_input_elements, scope)`. -pub fn legacy_parallel_interleave_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - buffer_output_elements: O4, - prefetch_input_elements: O5, - scope: &mut crate::Scope, -) -> crate::Result { - LegacyParallelInterleaveDatasetV2::new().build( - input_dataset, - other_arguments, - cycle_length, - block_length, - buffer_output_elements, - prefetch_input_elements, - scope, - ) +pub fn legacy_parallel_interleave_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, buffer_output_elements: O4, prefetch_input_elements: O5, scope: &mut crate::Scope) -> crate::Result { + LegacyParallelInterleaveDatasetV2::new().build(input_dataset, other_arguments, cycle_length, block_length, buffer_output_elements, prefetch_input_elements, scope) } + /// Builder for the `Less` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Less { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Less' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LessInst { + /// An instance of a fully built Less Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Less { /// Creates a new `Less`. @@ -50173,52 +61231,73 @@ impl Less { } /// Builds the `Less` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Less", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Less` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Less", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LessInst{op}) + } +} +impl LessInst { + /// Returns the 'z' output of this 'Less' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LessInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Less::new().build(x, y, scope)`. -pub fn less, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn less, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Less::new().build(x, y, scope) } + /// Builder for the `LessEqual` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LessEqual { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LessEqual' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LessEqualInst { + /// An instance of a fully built LessEqual Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LessEqual { /// Creates a new `LessEqual`. @@ -50239,55 +61318,73 @@ impl LessEqual { } /// Builds the `LessEqual` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LessEqual", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LessEqual` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LessEqual", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LessEqualInst{op}) + } +} +impl LessEqualInst { + /// Returns the 'z' output of this 'LessEqual' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LessEqualInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LessEqual::new().build(x, y, scope)`. -pub fn less_equal< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn less_equal, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { LessEqual::new().build(x, y, scope) } + /// Builder for the `Lgamma` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Lgamma { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Lgamma' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LgammaInst { + /// An instance of a fully built Lgamma Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Lgamma { /// Creates a new `Lgamma`. @@ -50308,39 +61405,59 @@ impl Lgamma { } /// Builds the `Lgamma` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Lgamma", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Lgamma` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Lgamma", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LgammaInst{op}) + } +} +impl LgammaInst { + /// Returns the 'y' output of this 'Lgamma' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LgammaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Lgamma::new().build(x, scope)`. -pub fn lgamma>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lgamma>(x: O0, scope: &mut crate::Scope) -> crate::Result { Lgamma::new().build(x, scope) } + /// Builder for the `LinSpace` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LinSpace { @@ -50348,6 +61465,12 @@ pub struct LinSpace { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LinSpace' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LinSpaceInst { + /// An instance of a fully built LinSpace Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LinSpace { /// Creates a new `LinSpace`. @@ -50374,27 +61497,10 @@ impl LinSpace { } /// Builds the `LinSpace` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - start: O0, - stop: O1, - num: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, start: O0, stop: O1, num: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(start.into(), stop.into(), num.into(), scope) } - - fn build_impl( - &self, - start: crate::Output, - stop: crate::Output, - num: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, start: crate::Output, stop: crate::Output, num: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LinSpace", |nd| { nd.add_input(start); nd.add_input(stop); @@ -50402,30 +61508,58 @@ impl LinSpace { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LinSpace` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, start: O0, stop: O1, num: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(start.into(), stop.into(), num.into(), scope) + } + fn build_instance_impl(&self, start: crate::Output, stop: crate::Output, num: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LinSpace", |nd| { + nd.add_input(start); + nd.add_input(stop); + nd.add_input(num); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LinSpaceInst{op}) + } +} +impl LinSpaceInst { + /// Returns the 'output' output of this 'LinSpace' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LinSpaceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LinSpace::new().build(start, stop, num, scope)`. -pub fn lin_space< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - start: O0, - stop: O1, - num: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lin_space, O1: ::std::convert::Into, O2: ::std::convert::Into>(start: O0, stop: O1, num: O2, scope: &mut crate::Scope) -> crate::Result { LinSpace::new().build(start, stop, num, scope) } + /// Builder for the `ListDiff` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ListDiff { @@ -50433,6 +61567,12 @@ pub struct ListDiff { out_idx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ListDiff' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ListDiffInst { + /// An instance of a fully built ListDiff Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ListDiff { /// Creates a new `ListDiff`. @@ -50447,10 +61587,7 @@ impl ListDiff { } /// Sets the `out_idx` attribute. - pub fn out_idx>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_idx>(mut self, value: ArgType) -> Self { self.out_idx = ::std::option::Option::Some(value.into()); self } @@ -50462,52 +61599,205 @@ impl ListDiff { } /// Builds the `ListDiff` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ListDiff", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_idx { - nd.set_attr_type("out_idx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_idx { + nd.set_attr_type("out_idx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ListDiff` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ListDiff", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_idx { + nd.set_attr_type("out_idx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ListDiffInst{op}) + } +} +impl ListDiffInst { + /// Returns the 'out' output of this 'ListDiff' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'idx' output of this 'ListDiff' operation. + pub fn idx(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for ListDiffInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ListDiff::new().build(x, y, scope)`. -pub fn list_diff< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn list_diff, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { ListDiff::new().build(x, y, scope) } + +/// Builder for the `LoadAllTPUEmbeddingParameters` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct LoadAllTPUEmbeddingParameters { + NumTables: ::std::option::Option, + config: ::std::option::Option<::std::string::String>, + num_shards: ::std::option::Option, + shard_id: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'LoadAllTPUEmbeddingParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadAllTPUEmbeddingParametersInst { + /// An instance of a fully built LoadAllTPUEmbeddingParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl LoadAllTPUEmbeddingParameters { + /// Creates a new `LoadAllTPUEmbeddingParameters`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `NumTables` attribute. + pub fn NumTables>(mut self, value: ArgType) -> Self { + self.NumTables = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `config` attribute. + pub fn config>(mut self, value: ArgType) -> Self { + self.config = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `num_shards` attribute. + pub fn num_shards>(mut self, value: ArgType) -> Self { + self.num_shards = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `shard_id` attribute. + pub fn shard_id>(mut self, value: ArgType) -> Self { + self.shard_id = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `LoadAllTPUEmbeddingParameters` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, parameters: O0, auxiliary1: O1, auxiliary2: O2, auxiliary3: O3, auxiliary4: O4, auxiliary5: O5, auxiliary6: O6, auxiliary7: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(parameters.into(), auxiliary1.into(), auxiliary2.into(), auxiliary3.into(), auxiliary4.into(), auxiliary5.into(), auxiliary6.into(), auxiliary7.into(), scope) + } + fn build_impl(&self, parameters: crate::Output, auxiliary1: crate::Output, auxiliary2: crate::Output, auxiliary3: crate::Output, auxiliary4: crate::Output, auxiliary5: crate::Output, auxiliary6: crate::Output, auxiliary7: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("LoadAllTPUEmbeddingParameters", |nd| { + nd.add_input(parameters); + nd.add_input(auxiliary1); + nd.add_input(auxiliary2); + nd.add_input(auxiliary3); + nd.add_input(auxiliary4); + nd.add_input(auxiliary5); + nd.add_input(auxiliary6); + nd.add_input(auxiliary7); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.NumTables { + nd.set_attr_int("NumTables", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `LoadAllTPUEmbeddingParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, parameters: O0, auxiliary1: O1, auxiliary2: O2, auxiliary3: O3, auxiliary4: O4, auxiliary5: O5, auxiliary6: O6, auxiliary7: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), auxiliary1.into(), auxiliary2.into(), auxiliary3.into(), auxiliary4.into(), auxiliary5.into(), auxiliary6.into(), auxiliary7.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, auxiliary1: crate::Output, auxiliary2: crate::Output, auxiliary3: crate::Output, auxiliary4: crate::Output, auxiliary5: crate::Output, auxiliary6: crate::Output, auxiliary7: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadAllTPUEmbeddingParameters", |nd| { + nd.add_input(parameters); + nd.add_input(auxiliary1); + nd.add_input(auxiliary2); + nd.add_input(auxiliary3); + nd.add_input(auxiliary4); + nd.add_input(auxiliary5); + nd.add_input(auxiliary6); + nd.add_input(auxiliary7); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.NumTables { + nd.set_attr_int("NumTables", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadAllTPUEmbeddingParametersInst{op}) + } +} +impl LoadAllTPUEmbeddingParametersInst { +} +impl Into for LoadAllTPUEmbeddingParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `LoadAllTPUEmbeddingParameters::new().build(parameters, auxiliary1, auxiliary2, auxiliary3, auxiliary4, auxiliary5, auxiliary6, auxiliary7, scope)`. +pub fn load_all_tpuembedding_parameters, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(parameters: O0, auxiliary1: O1, auxiliary2: O2, auxiliary3: O3, auxiliary4: O4, auxiliary5: O5, auxiliary6: O6, auxiliary7: O7, scope: &mut crate::Scope) -> crate::Result { + LoadAllTPUEmbeddingParameters::new().build(parameters, auxiliary1, auxiliary2, auxiliary3, auxiliary4, auxiliary5, auxiliary6, auxiliary7, scope) +} + /// Builder for the `LoadAndRemapMatrix` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadAndRemapMatrix { @@ -50516,6 +61806,12 @@ pub struct LoadAndRemapMatrix { max_rows_in_memory: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadAndRemapMatrix' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadAndRemapMatrixInst { + /// An instance of a fully built LoadAndRemapMatrix Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadAndRemapMatrix { /// Creates a new `LoadAndRemapMatrix`. @@ -50536,10 +61832,7 @@ impl LoadAndRemapMatrix { } /// Sets the `max_rows_in_memory` attribute. - pub fn max_rows_in_memory>( - mut self, - value: ArgType, - ) -> Self { + pub fn max_rows_in_memory>(mut self, value: ArgType) -> Self { self.max_rows_in_memory = ::std::option::Option::Some(value.into()); self } @@ -50551,40 +61844,10 @@ impl LoadAndRemapMatrix { } /// Builds the `LoadAndRemapMatrix` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - ckpt_path: O0, - old_tensor_name: O1, - row_remapping: O2, - col_remapping: O3, - initializing_values: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - ckpt_path.into(), - old_tensor_name.into(), - row_remapping.into(), - col_remapping.into(), - initializing_values.into(), - scope, - ) - } - - fn build_impl( - &self, - ckpt_path: crate::Output, - old_tensor_name: crate::Output, - row_remapping: crate::Output, - col_remapping: crate::Output, - initializing_values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, ckpt_path: O0, old_tensor_name: O1, row_remapping: O2, col_remapping: O3, initializing_values: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(ckpt_path.into(), old_tensor_name.into(), row_remapping.into(), col_remapping.into(), initializing_values.into(), scope) + } + fn build_impl(&self, ckpt_path: crate::Output, old_tensor_name: crate::Output, row_remapping: crate::Output, col_remapping: crate::Output, initializing_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadAndRemapMatrix", |nd| { nd.add_input(ckpt_path); nd.add_input(old_tensor_name); @@ -50594,44 +61857,66 @@ impl LoadAndRemapMatrix { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_rows { - nd.set_attr_int("num_rows", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_cols { - nd.set_attr_int("num_cols", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_rows_in_memory { - nd.set_attr_int("max_rows_in_memory", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_rows { + nd.set_attr_int("num_rows", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_cols { + nd.set_attr_int("num_cols", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_rows_in_memory { + nd.set_attr_int("max_rows_in_memory", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadAndRemapMatrix` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, ckpt_path: O0, old_tensor_name: O1, row_remapping: O2, col_remapping: O3, initializing_values: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ckpt_path.into(), old_tensor_name.into(), row_remapping.into(), col_remapping.into(), initializing_values.into(), scope) + } + fn build_instance_impl(&self, ckpt_path: crate::Output, old_tensor_name: crate::Output, row_remapping: crate::Output, col_remapping: crate::Output, initializing_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadAndRemapMatrix", |nd| { + nd.add_input(ckpt_path); + nd.add_input(old_tensor_name); + nd.add_input(row_remapping); + nd.add_input(col_remapping); + nd.add_input(initializing_values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_rows { + nd.set_attr_int("num_rows", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_cols { + nd.set_attr_int("num_cols", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_rows_in_memory { + nd.set_attr_int("max_rows_in_memory", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadAndRemapMatrixInst{op}) + } +} +impl LoadAndRemapMatrixInst { + /// Returns the 'output_matrix' output of this 'LoadAndRemapMatrix' operation. + pub fn output_matrix(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LoadAndRemapMatrixInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadAndRemapMatrix::new().build(ckpt_path, old_tensor_name, row_remapping, col_remapping, initializing_values, scope)`. -pub fn load_and_remap_matrix< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - ckpt_path: O0, - old_tensor_name: O1, - row_remapping: O2, - col_remapping: O3, - initializing_values: O4, - scope: &mut crate::Scope, -) -> crate::Result { - LoadAndRemapMatrix::new().build( - ckpt_path, - old_tensor_name, - row_remapping, - col_remapping, - initializing_values, - scope, - ) +pub fn load_and_remap_matrix, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(ckpt_path: O0, old_tensor_name: O1, row_remapping: O2, col_remapping: O3, initializing_values: O4, scope: &mut crate::Scope) -> crate::Result { + LoadAndRemapMatrix::new().build(ckpt_path, old_tensor_name, row_remapping, col_remapping, initializing_values, scope) } + /// Builder for the `LoadDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadDataset { @@ -50642,6 +61927,12 @@ pub struct LoadDataset { Treader_func_args: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadDatasetInst { + /// An instance of a fully built LoadDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadDataset { /// Creates a new `LoadDataset`. @@ -50650,46 +61941,31 @@ impl LoadDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `compression` attribute. - pub fn compression>( - mut self, - value: ArgType, - ) -> Self { + pub fn compression>(mut self, value: ArgType) -> Self { self.compression = ::std::option::Option::Some(value.into()); self } /// Sets the `reader_func` attribute. - pub fn reader_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn reader_func>(mut self, value: ArgType) -> Self { self.reader_func = ::std::option::Option::Some(value.into()); self } /// Sets the `Treader_func_args` attribute. - pub fn Treader_func_args>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Treader_func_args>>(mut self, value: ArgType) -> Self { self.Treader_func_args = ::std::option::Option::Some(value.into()); self } @@ -50701,61 +61977,85 @@ impl LoadDataset { } /// Builds the `LoadDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - path: O0, - reader_func_other_args: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, path: O0, reader_func_other_args: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(path.into(), reader_func_other_args.into(), scope) } - - fn build_impl( - &self, - path: crate::Output, - reader_func_other_args: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, path: crate::Output, reader_func_other_args: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadDataset", |nd| { nd.add_input(path); nd.add_input(reader_func_other_args); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.compression { - nd.set_attr_string("compression", value)?; - } - if let ::std::option::Option::Some(value) = &self.reader_func { - nd.set_attr_string("reader_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.Treader_func_args { - nd.set_attr_type_list("Treader_func_args", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.reader_func { + nd.set_attr_string("reader_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treader_func_args { + nd.set_attr_type_list("Treader_func_args", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, path: O0, reader_func_other_args: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(path.into(), reader_func_other_args.into(), scope) + } + fn build_instance_impl(&self, path: crate::Output, reader_func_other_args: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadDataset", |nd| { + nd.add_input(path); + nd.add_input(reader_func_other_args); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.reader_func { + nd.set_attr_string("reader_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treader_func_args { + nd.set_attr_type_list("Treader_func_args", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadDatasetInst{op}) + } +} +impl LoadDatasetInst { + /// Returns the 'handle' output of this 'LoadDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LoadDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadDataset::new().build(path, reader_func_other_args, scope)`. -pub fn load_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - path: O0, - reader_func_other_args: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_dataset, O1: ::std::convert::Into>(path: O0, reader_func_other_args: O1, scope: &mut crate::Scope) -> crate::Result { LoadDataset::new().build(path, reader_func_other_args, scope) } + /// Builder for the `LoadTPUEmbeddingADAMParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingADAMParameters { @@ -50766,6 +62066,12 @@ pub struct LoadTPUEmbeddingADAMParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingADAMParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingADAMParametersInst { + /// An instance of a fully built LoadTPUEmbeddingADAMParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingADAMParameters { /// Creates a new `LoadTPUEmbeddingADAMParameters`. @@ -50780,10 +62086,7 @@ impl LoadTPUEmbeddingADAMParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -50801,10 +62104,7 @@ impl LoadTPUEmbeddingADAMParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -50816,27 +62116,10 @@ impl LoadTPUEmbeddingADAMParameters { } /// Builds the `LoadTPUEmbeddingADAMParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - parameters: O0, - momenta: O1, - velocities: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, momenta: O1, velocities: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(parameters.into(), momenta.into(), velocities.into(), scope) } - - fn build_impl( - &self, - parameters: crate::Output, - momenta: crate::Output, - velocities: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, parameters: crate::Output, momenta: crate::Output, velocities: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingADAMParameters", |nd| { nd.add_input(parameters); nd.add_input(momenta); @@ -50844,39 +62127,69 @@ impl LoadTPUEmbeddingADAMParameters { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingADAMParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, momenta: O1, velocities: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), momenta.into(), velocities.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, momenta: crate::Output, velocities: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingADAMParameters", |nd| { + nd.add_input(parameters); + nd.add_input(momenta); + nd.add_input(velocities); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingADAMParametersInst{op}) + } +} +impl LoadTPUEmbeddingADAMParametersInst { +} +impl Into for LoadTPUEmbeddingADAMParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingADAMParameters::new().build(parameters, momenta, velocities, scope)`. -pub fn load_tpuembedding_adamparameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - parameters: O0, - momenta: O1, - velocities: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_adamparameters, O1: ::std::convert::Into, O2: ::std::convert::Into>(parameters: O0, momenta: O1, velocities: O2, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingADAMParameters::new().build(parameters, momenta, velocities, scope) } + /// Builder for the `LoadTPUEmbeddingAdadeltaParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingAdadeltaParameters { @@ -50887,6 +62200,12 @@ pub struct LoadTPUEmbeddingAdadeltaParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingAdadeltaParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingAdadeltaParametersInst { + /// An instance of a fully built LoadTPUEmbeddingAdadeltaParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingAdadeltaParameters { /// Creates a new `LoadTPUEmbeddingAdadeltaParameters`. @@ -50901,10 +62220,7 @@ impl LoadTPUEmbeddingAdadeltaParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -50922,10 +62238,7 @@ impl LoadTPUEmbeddingAdadeltaParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -50937,32 +62250,10 @@ impl LoadTPUEmbeddingAdadeltaParameters { } /// Builds the `LoadTPUEmbeddingAdadeltaParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - parameters: O0, - accumulators: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - parameters.into(), - accumulators.into(), - updates.into(), - scope, - ) - } - - fn build_impl( - &self, - parameters: crate::Output, - accumulators: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(parameters.into(), accumulators.into(), updates.into(), scope) + } + fn build_impl(&self, parameters: crate::Output, accumulators: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingAdadeltaParameters", |nd| { nd.add_input(parameters); nd.add_input(accumulators); @@ -50970,39 +62261,69 @@ impl LoadTPUEmbeddingAdadeltaParameters { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingAdadeltaParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), accumulators.into(), updates.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, accumulators: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingAdadeltaParameters", |nd| { + nd.add_input(parameters); + nd.add_input(accumulators); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingAdadeltaParametersInst{op}) + } +} +impl LoadTPUEmbeddingAdadeltaParametersInst { +} +impl Into for LoadTPUEmbeddingAdadeltaParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingAdadeltaParameters::new().build(parameters, accumulators, updates, scope)`. -pub fn load_tpuembedding_adadelta_parameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - parameters: O0, - accumulators: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_adadelta_parameters, O1: ::std::convert::Into, O2: ::std::convert::Into>(parameters: O0, accumulators: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingAdadeltaParameters::new().build(parameters, accumulators, updates, scope) } + /// Builder for the `LoadTPUEmbeddingAdagradMomentumParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingAdagradMomentumParameters { @@ -51013,6 +62334,12 @@ pub struct LoadTPUEmbeddingAdagradMomentumParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingAdagradMomentumParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingAdagradMomentumParametersInst { + /// An instance of a fully built LoadTPUEmbeddingAdagradMomentumParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingAdagradMomentumParameters { /// Creates a new `LoadTPUEmbeddingAdagradMomentumParameters`. @@ -51027,10 +62354,7 @@ impl LoadTPUEmbeddingAdagradMomentumParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -51048,10 +62372,7 @@ impl LoadTPUEmbeddingAdagradMomentumParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -51063,32 +62384,10 @@ impl LoadTPUEmbeddingAdagradMomentumParameters { } /// Builds the `LoadTPUEmbeddingAdagradMomentumParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - parameters: O0, - accumulators: O1, - momenta: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - parameters.into(), - accumulators.into(), - momenta.into(), - scope, - ) - } - - fn build_impl( - &self, - parameters: crate::Output, - accumulators: crate::Output, - momenta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, momenta: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(parameters.into(), accumulators.into(), momenta.into(), scope) + } + fn build_impl(&self, parameters: crate::Output, accumulators: crate::Output, momenta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingAdagradMomentumParameters", |nd| { nd.add_input(parameters); nd.add_input(accumulators); @@ -51096,39 +62395,69 @@ impl LoadTPUEmbeddingAdagradMomentumParameters { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingAdagradMomentumParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, momenta: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), accumulators.into(), momenta.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, accumulators: crate::Output, momenta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingAdagradMomentumParameters", |nd| { + nd.add_input(parameters); + nd.add_input(accumulators); + nd.add_input(momenta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingAdagradMomentumParametersInst{op}) + } +} +impl LoadTPUEmbeddingAdagradMomentumParametersInst { +} +impl Into for LoadTPUEmbeddingAdagradMomentumParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingAdagradMomentumParameters::new().build(parameters, accumulators, momenta, scope)`. -pub fn load_tpuembedding_adagrad_momentum_parameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - parameters: O0, - accumulators: O1, - momenta: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_adagrad_momentum_parameters, O1: ::std::convert::Into, O2: ::std::convert::Into>(parameters: O0, accumulators: O1, momenta: O2, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingAdagradMomentumParameters::new().build(parameters, accumulators, momenta, scope) } + /// Builder for the `LoadTPUEmbeddingAdagradParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingAdagradParameters { @@ -51139,6 +62468,12 @@ pub struct LoadTPUEmbeddingAdagradParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingAdagradParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingAdagradParametersInst { + /// An instance of a fully built LoadTPUEmbeddingAdagradParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingAdagradParameters { /// Creates a new `LoadTPUEmbeddingAdagradParameters`. @@ -51153,10 +62488,7 @@ impl LoadTPUEmbeddingAdagradParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -51174,10 +62506,7 @@ impl LoadTPUEmbeddingAdagradParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -51189,61 +62518,78 @@ impl LoadTPUEmbeddingAdagradParameters { } /// Builds the `LoadTPUEmbeddingAdagradParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - parameters: O0, - accumulators: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(parameters.into(), accumulators.into(), scope) } - - fn build_impl( - &self, - parameters: crate::Output, - accumulators: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, parameters: crate::Output, accumulators: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingAdagradParameters", |nd| { nd.add_input(parameters); nd.add_input(accumulators); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingAdagradParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), accumulators.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, accumulators: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingAdagradParameters", |nd| { + nd.add_input(parameters); + nd.add_input(accumulators); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingAdagradParametersInst{op}) + } +} +impl LoadTPUEmbeddingAdagradParametersInst { +} +impl Into for LoadTPUEmbeddingAdagradParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingAdagradParameters::new().build(parameters, accumulators, scope)`. -pub fn load_tpuembedding_adagrad_parameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - parameters: O0, - accumulators: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_adagrad_parameters, O1: ::std::convert::Into>(parameters: O0, accumulators: O1, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingAdagradParameters::new().build(parameters, accumulators, scope) } + /// Builder for the `LoadTPUEmbeddingCenteredRMSPropParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingCenteredRMSPropParameters { @@ -51254,6 +62600,12 @@ pub struct LoadTPUEmbeddingCenteredRMSPropParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingCenteredRMSPropParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingCenteredRMSPropParametersInst { + /// An instance of a fully built LoadTPUEmbeddingCenteredRMSPropParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingCenteredRMSPropParameters { /// Creates a new `LoadTPUEmbeddingCenteredRMSPropParameters`. @@ -51268,10 +62620,7 @@ impl LoadTPUEmbeddingCenteredRMSPropParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -51289,10 +62638,7 @@ impl LoadTPUEmbeddingCenteredRMSPropParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -51304,30 +62650,10 @@ impl LoadTPUEmbeddingCenteredRMSPropParameters { } /// Builds the `LoadTPUEmbeddingCenteredRMSPropParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - parameters: O0, - ms: O1, - mom: O2, - mg: O3, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, parameters: O0, ms: O1, mom: O2, mg: O3, scope: &mut crate::Scope) -> crate::Result { self.build_impl(parameters.into(), ms.into(), mom.into(), mg.into(), scope) } - - fn build_impl( - &self, - parameters: crate::Output, - ms: crate::Output, - mom: crate::Output, - mg: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, parameters: crate::Output, ms: crate::Output, mom: crate::Output, mg: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingCenteredRMSPropParameters", |nd| { nd.add_input(parameters); nd.add_input(ms); @@ -51336,41 +62662,70 @@ impl LoadTPUEmbeddingCenteredRMSPropParameters { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingCenteredRMSPropParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, parameters: O0, ms: O1, mom: O2, mg: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), ms.into(), mom.into(), mg.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, ms: crate::Output, mom: crate::Output, mg: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingCenteredRMSPropParameters", |nd| { + nd.add_input(parameters); + nd.add_input(ms); + nd.add_input(mom); + nd.add_input(mg); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingCenteredRMSPropParametersInst{op}) + } +} +impl LoadTPUEmbeddingCenteredRMSPropParametersInst { +} +impl Into for LoadTPUEmbeddingCenteredRMSPropParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingCenteredRMSPropParameters::new().build(parameters, ms, mom, mg, scope)`. -pub fn load_tpuembedding_centered_rmsprop_parameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - parameters: O0, - ms: O1, - mom: O2, - mg: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_centered_rmsprop_parameters, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(parameters: O0, ms: O1, mom: O2, mg: O3, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingCenteredRMSPropParameters::new().build(parameters, ms, mom, mg, scope) } + /// Builder for the `LoadTPUEmbeddingFTRLParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingFTRLParameters { @@ -51381,6 +62736,12 @@ pub struct LoadTPUEmbeddingFTRLParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingFTRLParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingFTRLParametersInst { + /// An instance of a fully built LoadTPUEmbeddingFTRLParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingFTRLParameters { /// Creates a new `LoadTPUEmbeddingFTRLParameters`. @@ -51395,10 +62756,7 @@ impl LoadTPUEmbeddingFTRLParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -51416,10 +62774,7 @@ impl LoadTPUEmbeddingFTRLParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -51431,32 +62786,10 @@ impl LoadTPUEmbeddingFTRLParameters { } /// Builds the `LoadTPUEmbeddingFTRLParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - parameters: O0, - accumulators: O1, - linears: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - parameters.into(), - accumulators.into(), - linears.into(), - scope, - ) - } - - fn build_impl( - &self, - parameters: crate::Output, - accumulators: crate::Output, - linears: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, linears: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(parameters.into(), accumulators.into(), linears.into(), scope) + } + fn build_impl(&self, parameters: crate::Output, accumulators: crate::Output, linears: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingFTRLParameters", |nd| { nd.add_input(parameters); nd.add_input(accumulators); @@ -51464,39 +62797,69 @@ impl LoadTPUEmbeddingFTRLParameters { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingFTRLParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, linears: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), accumulators.into(), linears.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, accumulators: crate::Output, linears: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingFTRLParameters", |nd| { + nd.add_input(parameters); + nd.add_input(accumulators); + nd.add_input(linears); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingFTRLParametersInst{op}) + } +} +impl LoadTPUEmbeddingFTRLParametersInst { +} +impl Into for LoadTPUEmbeddingFTRLParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingFTRLParameters::new().build(parameters, accumulators, linears, scope)`. -pub fn load_tpuembedding_ftrlparameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - parameters: O0, - accumulators: O1, - linears: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_ftrlparameters, O1: ::std::convert::Into, O2: ::std::convert::Into>(parameters: O0, accumulators: O1, linears: O2, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingFTRLParameters::new().build(parameters, accumulators, linears, scope) } + /// Builder for the `LoadTPUEmbeddingFrequencyEstimatorParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingFrequencyEstimatorParameters { @@ -51507,6 +62870,12 @@ pub struct LoadTPUEmbeddingFrequencyEstimatorParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingFrequencyEstimatorParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingFrequencyEstimatorParametersInst { + /// An instance of a fully built LoadTPUEmbeddingFrequencyEstimatorParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingFrequencyEstimatorParameters { /// Creates a new `LoadTPUEmbeddingFrequencyEstimatorParameters`. @@ -51521,10 +62890,7 @@ impl LoadTPUEmbeddingFrequencyEstimatorParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -51542,10 +62908,7 @@ impl LoadTPUEmbeddingFrequencyEstimatorParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -51557,61 +62920,78 @@ impl LoadTPUEmbeddingFrequencyEstimatorParameters { } /// Builds the `LoadTPUEmbeddingFrequencyEstimatorParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - parameters: O0, - last_hit_step: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, parameters: O0, last_hit_step: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(parameters.into(), last_hit_step.into(), scope) } - - fn build_impl( - &self, - parameters: crate::Output, - last_hit_step: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, parameters: crate::Output, last_hit_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingFrequencyEstimatorParameters", |nd| { nd.add_input(parameters); nd.add_input(last_hit_step); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingFrequencyEstimatorParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, parameters: O0, last_hit_step: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), last_hit_step.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, last_hit_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingFrequencyEstimatorParameters", |nd| { + nd.add_input(parameters); + nd.add_input(last_hit_step); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingFrequencyEstimatorParametersInst{op}) + } +} +impl LoadTPUEmbeddingFrequencyEstimatorParametersInst { +} +impl Into for LoadTPUEmbeddingFrequencyEstimatorParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingFrequencyEstimatorParameters::new().build(parameters, last_hit_step, scope)`. -pub fn load_tpuembedding_frequency_estimator_parameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - parameters: O0, - last_hit_step: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_frequency_estimator_parameters, O1: ::std::convert::Into>(parameters: O0, last_hit_step: O1, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingFrequencyEstimatorParameters::new().build(parameters, last_hit_step, scope) } + /// Builder for the `LoadTPUEmbeddingMDLAdagradLightParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingMDLAdagradLightParameters { @@ -51622,6 +63002,12 @@ pub struct LoadTPUEmbeddingMDLAdagradLightParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingMDLAdagradLightParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingMDLAdagradLightParametersInst { + /// An instance of a fully built LoadTPUEmbeddingMDLAdagradLightParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingMDLAdagradLightParameters { /// Creates a new `LoadTPUEmbeddingMDLAdagradLightParameters`. @@ -51636,10 +63022,7 @@ impl LoadTPUEmbeddingMDLAdagradLightParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -51657,10 +63040,7 @@ impl LoadTPUEmbeddingMDLAdagradLightParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -51672,36 +63052,10 @@ impl LoadTPUEmbeddingMDLAdagradLightParameters { } /// Builds the `LoadTPUEmbeddingMDLAdagradLightParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - parameters: O0, - accumulators: O1, - weights: O2, - benefits: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - parameters.into(), - accumulators.into(), - weights.into(), - benefits.into(), - scope, - ) - } - - fn build_impl( - &self, - parameters: crate::Output, - accumulators: crate::Output, - weights: crate::Output, - benefits: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, weights: O2, benefits: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(parameters.into(), accumulators.into(), weights.into(), benefits.into(), scope) + } + fn build_impl(&self, parameters: crate::Output, accumulators: crate::Output, weights: crate::Output, benefits: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingMDLAdagradLightParameters", |nd| { nd.add_input(parameters); nd.add_input(accumulators); @@ -51710,47 +63064,70 @@ impl LoadTPUEmbeddingMDLAdagradLightParameters { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingMDLAdagradLightParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, weights: O2, benefits: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), accumulators.into(), weights.into(), benefits.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, accumulators: crate::Output, weights: crate::Output, benefits: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingMDLAdagradLightParameters", |nd| { + nd.add_input(parameters); + nd.add_input(accumulators); + nd.add_input(weights); + nd.add_input(benefits); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingMDLAdagradLightParametersInst{op}) + } +} +impl LoadTPUEmbeddingMDLAdagradLightParametersInst { +} +impl Into for LoadTPUEmbeddingMDLAdagradLightParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingMDLAdagradLightParameters::new().build(parameters, accumulators, weights, benefits, scope)`. -pub fn load_tpuembedding_mdladagrad_light_parameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - parameters: O0, - accumulators: O1, - weights: O2, - benefits: O3, - scope: &mut crate::Scope, -) -> crate::Result { - LoadTPUEmbeddingMDLAdagradLightParameters::new().build( - parameters, - accumulators, - weights, - benefits, - scope, - ) +pub fn load_tpuembedding_mdladagrad_light_parameters, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(parameters: O0, accumulators: O1, weights: O2, benefits: O3, scope: &mut crate::Scope) -> crate::Result { + LoadTPUEmbeddingMDLAdagradLightParameters::new().build(parameters, accumulators, weights, benefits, scope) } + /// Builder for the `LoadTPUEmbeddingMomentumParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingMomentumParameters { @@ -51761,6 +63138,12 @@ pub struct LoadTPUEmbeddingMomentumParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingMomentumParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingMomentumParametersInst { + /// An instance of a fully built LoadTPUEmbeddingMomentumParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingMomentumParameters { /// Creates a new `LoadTPUEmbeddingMomentumParameters`. @@ -51775,10 +63158,7 @@ impl LoadTPUEmbeddingMomentumParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -51796,10 +63176,7 @@ impl LoadTPUEmbeddingMomentumParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -51811,61 +63188,78 @@ impl LoadTPUEmbeddingMomentumParameters { } /// Builds the `LoadTPUEmbeddingMomentumParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - parameters: O0, - momenta: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, parameters: O0, momenta: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(parameters.into(), momenta.into(), scope) } - - fn build_impl( - &self, - parameters: crate::Output, - momenta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, parameters: crate::Output, momenta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingMomentumParameters", |nd| { nd.add_input(parameters); nd.add_input(momenta); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingMomentumParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, parameters: O0, momenta: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), momenta.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, momenta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingMomentumParameters", |nd| { + nd.add_input(parameters); + nd.add_input(momenta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingMomentumParametersInst{op}) + } +} +impl LoadTPUEmbeddingMomentumParametersInst { +} +impl Into for LoadTPUEmbeddingMomentumParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingMomentumParameters::new().build(parameters, momenta, scope)`. -pub fn load_tpuembedding_momentum_parameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - parameters: O0, - momenta: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_momentum_parameters, O1: ::std::convert::Into>(parameters: O0, momenta: O1, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingMomentumParameters::new().build(parameters, momenta, scope) } + /// Builder for the `LoadTPUEmbeddingProximalAdagradParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingProximalAdagradParameters { @@ -51876,6 +63270,12 @@ pub struct LoadTPUEmbeddingProximalAdagradParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingProximalAdagradParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingProximalAdagradParametersInst { + /// An instance of a fully built LoadTPUEmbeddingProximalAdagradParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingProximalAdagradParameters { /// Creates a new `LoadTPUEmbeddingProximalAdagradParameters`. @@ -51890,10 +63290,7 @@ impl LoadTPUEmbeddingProximalAdagradParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -51911,10 +63308,7 @@ impl LoadTPUEmbeddingProximalAdagradParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -51926,61 +63320,78 @@ impl LoadTPUEmbeddingProximalAdagradParameters { } /// Builds the `LoadTPUEmbeddingProximalAdagradParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - parameters: O0, - accumulators: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(parameters.into(), accumulators.into(), scope) } - - fn build_impl( - &self, - parameters: crate::Output, - accumulators: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, parameters: crate::Output, accumulators: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingProximalAdagradParameters", |nd| { nd.add_input(parameters); nd.add_input(accumulators); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingProximalAdagradParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, parameters: O0, accumulators: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), accumulators.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, accumulators: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingProximalAdagradParameters", |nd| { + nd.add_input(parameters); + nd.add_input(accumulators); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingProximalAdagradParametersInst{op}) + } +} +impl LoadTPUEmbeddingProximalAdagradParametersInst { +} +impl Into for LoadTPUEmbeddingProximalAdagradParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingProximalAdagradParameters::new().build(parameters, accumulators, scope)`. -pub fn load_tpuembedding_proximal_adagrad_parameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - parameters: O0, - accumulators: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_proximal_adagrad_parameters, O1: ::std::convert::Into>(parameters: O0, accumulators: O1, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingProximalAdagradParameters::new().build(parameters, accumulators, scope) } + /// Builder for the `LoadTPUEmbeddingProximalYogiParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingProximalYogiParameters { @@ -51991,6 +63402,12 @@ pub struct LoadTPUEmbeddingProximalYogiParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingProximalYogiParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingProximalYogiParametersInst { + /// An instance of a fully built LoadTPUEmbeddingProximalYogiParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingProximalYogiParameters { /// Creates a new `LoadTPUEmbeddingProximalYogiParameters`. @@ -52005,10 +63422,7 @@ impl LoadTPUEmbeddingProximalYogiParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -52026,10 +63440,7 @@ impl LoadTPUEmbeddingProximalYogiParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -52041,27 +63452,10 @@ impl LoadTPUEmbeddingProximalYogiParameters { } /// Builds the `LoadTPUEmbeddingProximalYogiParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - parameters: O0, - v: O1, - m: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, v: O1, m: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(parameters.into(), v.into(), m.into(), scope) } - - fn build_impl( - &self, - parameters: crate::Output, - v: crate::Output, - m: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, parameters: crate::Output, v: crate::Output, m: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingProximalYogiParameters", |nd| { nd.add_input(parameters); nd.add_input(v); @@ -52069,39 +63463,69 @@ impl LoadTPUEmbeddingProximalYogiParameters { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingProximalYogiParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, v: O1, m: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), v.into(), m.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, v: crate::Output, m: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingProximalYogiParameters", |nd| { + nd.add_input(parameters); + nd.add_input(v); + nd.add_input(m); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingProximalYogiParametersInst{op}) + } +} +impl LoadTPUEmbeddingProximalYogiParametersInst { +} +impl Into for LoadTPUEmbeddingProximalYogiParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingProximalYogiParameters::new().build(parameters, v, m, scope)`. -pub fn load_tpuembedding_proximal_yogi_parameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - parameters: O0, - v: O1, - m: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_proximal_yogi_parameters, O1: ::std::convert::Into, O2: ::std::convert::Into>(parameters: O0, v: O1, m: O2, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingProximalYogiParameters::new().build(parameters, v, m, scope) } + /// Builder for the `LoadTPUEmbeddingRMSPropParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingRMSPropParameters { @@ -52112,6 +63536,12 @@ pub struct LoadTPUEmbeddingRMSPropParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingRMSPropParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingRMSPropParametersInst { + /// An instance of a fully built LoadTPUEmbeddingRMSPropParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingRMSPropParameters { /// Creates a new `LoadTPUEmbeddingRMSPropParameters`. @@ -52126,10 +63556,7 @@ impl LoadTPUEmbeddingRMSPropParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -52147,10 +63574,7 @@ impl LoadTPUEmbeddingRMSPropParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -52162,27 +63586,10 @@ impl LoadTPUEmbeddingRMSPropParameters { } /// Builds the `LoadTPUEmbeddingRMSPropParameters` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - parameters: O0, - ms: O1, - mom: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, ms: O1, mom: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(parameters.into(), ms.into(), mom.into(), scope) } - - fn build_impl( - &self, - parameters: crate::Output, - ms: crate::Output, - mom: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, parameters: crate::Output, ms: crate::Output, mom: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoadTPUEmbeddingRMSPropParameters", |nd| { nd.add_input(parameters); nd.add_input(ms); @@ -52190,39 +63597,69 @@ impl LoadTPUEmbeddingRMSPropParameters { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoadTPUEmbeddingRMSPropParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, parameters: O0, ms: O1, mom: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), ms.into(), mom.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, ms: crate::Output, mom: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingRMSPropParameters", |nd| { + nd.add_input(parameters); + nd.add_input(ms); + nd.add_input(mom); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingRMSPropParametersInst{op}) + } +} +impl LoadTPUEmbeddingRMSPropParametersInst { +} +impl Into for LoadTPUEmbeddingRMSPropParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoadTPUEmbeddingRMSPropParameters::new().build(parameters, ms, mom, scope)`. -pub fn load_tpuembedding_rmsprop_parameters< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - parameters: O0, - ms: O1, - mom: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_rmsprop_parameters, O1: ::std::convert::Into, O2: ::std::convert::Into>(parameters: O0, ms: O1, mom: O2, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingRMSPropParameters::new().build(parameters, ms, mom, scope) } + /// Builder for the `LoadTPUEmbeddingStochasticGradientDescentParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoadTPUEmbeddingStochasticGradientDescentParameters { @@ -52233,6 +63670,12 @@ pub struct LoadTPUEmbeddingStochasticGradientDescentParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'LoadTPUEmbeddingStochasticGradientDescentParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoadTPUEmbeddingStochasticGradientDescentParametersInst { + /// An instance of a fully built LoadTPUEmbeddingStochasticGradientDescentParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoadTPUEmbeddingStochasticGradientDescentParameters { /// Creates a new `LoadTPUEmbeddingStochasticGradientDescentParameters`. @@ -52247,10 +63690,7 @@ impl LoadTPUEmbeddingStochasticGradientDescentParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -52268,10 +63708,7 @@ impl LoadTPUEmbeddingStochasticGradientDescentParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -52283,62 +63720,88 @@ impl LoadTPUEmbeddingStochasticGradientDescentParameters { } /// Builds the `LoadTPUEmbeddingStochasticGradientDescentParameters` operation. - pub fn build>( - &self, - parameters: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, parameters: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(parameters.into(), scope) } + fn build_impl(&self, parameters: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("LoadTPUEmbeddingStochasticGradientDescentParameters", |nd| { + nd.add_input(parameters); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + }) + } - fn build_impl( - &self, - parameters: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation( - "LoadTPUEmbeddingStochasticGradientDescentParameters", - |nd| { - nd.add_input(parameters); - for op in &self.control_inputs { - nd.add_control_input(op); - } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } - ::std::result::Result::Ok(()) - }, - ) + /// Builds the `LoadTPUEmbeddingStochasticGradientDescentParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, parameters: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(parameters.into(), scope) + } + fn build_instance_impl(&self, parameters: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoadTPUEmbeddingStochasticGradientDescentParameters", |nd| { + nd.add_input(parameters); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LoadTPUEmbeddingStochasticGradientDescentParametersInst{op}) + } +} +impl LoadTPUEmbeddingStochasticGradientDescentParametersInst { +} +impl Into for LoadTPUEmbeddingStochasticGradientDescentParametersInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `LoadTPUEmbeddingStochasticGradientDescentParameters::new().build(parameters, scope)`. -pub fn load_tpuembedding_stochastic_gradient_descent_parameters< - O0: ::std::convert::Into, ->( - parameters: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn load_tpuembedding_stochastic_gradient_descent_parameters>(parameters: O0, scope: &mut crate::Scope) -> crate::Result { LoadTPUEmbeddingStochasticGradientDescentParameters::new().build(parameters, scope) } + /// Builder for the `Log` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Log { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Log' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LogInst { + /// An instance of a fully built Log Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Log { /// Creates a new `Log`. @@ -52359,45 +63822,71 @@ impl Log { } /// Builds the `Log` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Log", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Log` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Log", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LogInst{op}) + } +} +impl LogInst { + /// Returns the 'y' output of this 'Log' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LogInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Log::new().build(x, scope)`. -pub fn log>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn log>(x: O0, scope: &mut crate::Scope) -> crate::Result { Log::new().build(x, scope) } + /// Builder for the `Log1p` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Log1p { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Log1p' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Log1pInst { + /// An instance of a fully built Log1p Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Log1p { /// Creates a new `Log1p`. @@ -52418,45 +63907,71 @@ impl Log1p { } /// Builds the `Log1p` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Log1p", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Log1p` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Log1p", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Log1pInst{op}) + } +} +impl Log1pInst { + /// Returns the 'y' output of this 'Log1p' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Log1pInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Log1p::new().build(x, scope)`. -pub fn log1p>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn log1p>(x: O0, scope: &mut crate::Scope) -> crate::Result { Log1p::new().build(x, scope) } + /// Builder for the `LogMatrixDeterminant` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LogMatrixDeterminant { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LogMatrixDeterminant' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LogMatrixDeterminantInst { + /// An instance of a fully built LogMatrixDeterminant Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LogMatrixDeterminant { /// Creates a new `LogMatrixDeterminant`. @@ -52477,45 +63992,78 @@ impl LogMatrixDeterminant { } /// Builds the `LogMatrixDeterminant` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LogMatrixDeterminant", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LogMatrixDeterminant` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LogMatrixDeterminant", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LogMatrixDeterminantInst{op}) + } +} +impl LogMatrixDeterminantInst { + /// Returns the 'sign' output of this 'LogMatrixDeterminant' operation. + pub fn sign(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'log_abs_determinant' output of this 'LogMatrixDeterminant' operation. + pub fn log_abs_determinant(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for LogMatrixDeterminantInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LogMatrixDeterminant::new().build(input, scope)`. -pub fn log_matrix_determinant>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn log_matrix_determinant>(input: O0, scope: &mut crate::Scope) -> crate::Result { LogMatrixDeterminant::new().build(input, scope) } + /// Builder for the `LogSoftmax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LogSoftmax { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LogSoftmax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LogSoftmaxInst { + /// An instance of a fully built LogSoftmax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LogSoftmax { /// Creates a new `LogSoftmax`. @@ -52536,39 +64084,59 @@ impl LogSoftmax { } /// Builds the `LogSoftmax` operation. - pub fn build>( - &self, - logits: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, logits: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(logits.into(), scope) } - - fn build_impl( - &self, - logits: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, logits: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LogSoftmax", |nd| { nd.add_input(logits); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LogSoftmax` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, logits: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(logits.into(), scope) + } + fn build_instance_impl(&self, logits: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LogSoftmax", |nd| { + nd.add_input(logits); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LogSoftmaxInst{op}) + } +} +impl LogSoftmaxInst { + /// Returns the 'logsoftmax' output of this 'LogSoftmax' operation. + pub fn logsoftmax(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LogSoftmaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LogSoftmax::new().build(logits, scope)`. -pub fn log_softmax>( - logits: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn log_softmax>(logits: O0, scope: &mut crate::Scope) -> crate::Result { LogSoftmax::new().build(logits, scope) } + /// Builder for the `LogUniformCandidateSampler` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LogUniformCandidateSampler { @@ -52580,6 +64148,12 @@ pub struct LogUniformCandidateSampler { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LogUniformCandidateSampler' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LogUniformCandidateSamplerInst { + /// An instance of a fully built LogUniformCandidateSampler Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LogUniformCandidateSampler { /// Creates a new `LogUniformCandidateSampler`. @@ -52630,59 +64204,114 @@ impl LogUniformCandidateSampler { } /// Builds the `LogUniformCandidateSampler` operation. - pub fn build>( - &self, - true_classes: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(true_classes.into(), scope) } - - fn build_impl( - &self, - true_classes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LogUniformCandidateSampler", |nd| { nd.add_input(true_classes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_true { - nd.set_attr_int("num_true", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sampled { - nd.set_attr_int("num_sampled", *value)?; - } - if let ::std::option::Option::Some(value) = &self.unique { - nd.set_attr_bool("unique", *value)?; - } - if let ::std::option::Option::Some(value) = &self.range_max { - nd.set_attr_int("range_max", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_max { + nd.set_attr_int("range_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LogUniformCandidateSampler` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(true_classes.into(), scope) + } + fn build_instance_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LogUniformCandidateSampler", |nd| { + nd.add_input(true_classes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_max { + nd.set_attr_int("range_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LogUniformCandidateSamplerInst{op}) + } +} +impl LogUniformCandidateSamplerInst { + /// Returns the 'sampled_candidates' output of this 'LogUniformCandidateSampler' operation. + pub fn sampled_candidates(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'true_expected_count' output of this 'LogUniformCandidateSampler' operation. + pub fn true_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sampled_expected_count' output of this 'LogUniformCandidateSampler' operation. + pub fn sampled_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for LogUniformCandidateSamplerInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LogUniformCandidateSampler::new().build(true_classes, scope)`. -pub fn log_uniform_candidate_sampler>( - true_classes: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn log_uniform_candidate_sampler>(true_classes: O0, scope: &mut crate::Scope) -> crate::Result { LogUniformCandidateSampler::new().build(true_classes, scope) } + /// Builder for the `LogicalAnd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LogicalAnd { control_inputs: ::std::vec::Vec, } +/// An instance of 'LogicalAnd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LogicalAndInst { + /// An instance of a fully built LogicalAnd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LogicalAnd { /// Creates a new `LogicalAnd`. @@ -52697,24 +64326,10 @@ impl LogicalAnd { } /// Builds the `LogicalAnd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LogicalAnd", |nd| { nd.add_input(x); nd.add_input(y); @@ -52724,24 +64339,53 @@ impl LogicalAnd { ::std::result::Result::Ok(()) }) } -} + /// Builds the `LogicalAnd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LogicalAnd", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(LogicalAndInst{op}) + } +} +impl LogicalAndInst { + /// Returns the 'z' output of this 'LogicalAnd' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LogicalAndInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LogicalAnd::new().build(x, y, scope)`. -pub fn logical_and< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn logical_and, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { LogicalAnd::new().build(x, y, scope) } + /// Builder for the `LogicalNot` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LogicalNot { control_inputs: ::std::vec::Vec, } +/// An instance of 'LogicalNot' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LogicalNotInst { + /// An instance of a fully built LogicalNot Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LogicalNot { /// Creates a new `LogicalNot`. @@ -52756,19 +64400,10 @@ impl LogicalNot { } /// Builds the `LogicalNot` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LogicalNot", |nd| { nd.add_input(x); for op in &self.control_inputs { @@ -52777,20 +64412,52 @@ impl LogicalNot { ::std::result::Result::Ok(()) }) } -} + /// Builds the `LogicalNot` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LogicalNot", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(LogicalNotInst{op}) + } +} +impl LogicalNotInst { + /// Returns the 'y' output of this 'LogicalNot' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LogicalNotInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LogicalNot::new().build(x, scope)`. -pub fn logical_not>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn logical_not>(x: O0, scope: &mut crate::Scope) -> crate::Result { LogicalNot::new().build(x, scope) } + /// Builder for the `LogicalOr` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LogicalOr { control_inputs: ::std::vec::Vec, } +/// An instance of 'LogicalOr' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LogicalOrInst { + /// An instance of a fully built LogicalOr Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LogicalOr { /// Creates a new `LogicalOr`. @@ -52805,24 +64472,10 @@ impl LogicalOr { } /// Builds the `LogicalOr` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LogicalOr", |nd| { nd.add_input(x); nd.add_input(y); @@ -52832,19 +64485,42 @@ impl LogicalOr { ::std::result::Result::Ok(()) }) } -} + /// Builds the `LogicalOr` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LogicalOr", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(LogicalOrInst{op}) + } +} +impl LogicalOrInst { + /// Returns the 'z' output of this 'LogicalOr' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LogicalOrInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LogicalOr::new().build(x, y, scope)`. -pub fn logical_or< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn logical_or, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { LogicalOr::new().build(x, y, scope) } + /// Builder for the `LookupTableExport` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableExport { @@ -52852,6 +64528,12 @@ pub struct LookupTableExport { Tvalues: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableExport' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableExportInst { + /// An instance of a fully built LookupTableExport Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableExport { /// Creates a new `LookupTableExport`. @@ -52866,10 +64548,7 @@ impl LookupTableExport { } /// Sets the `Tvalues` attribute. - pub fn Tvalues>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tvalues>(mut self, value: ArgType) -> Self { self.Tvalues = ::std::option::Option::Some(value.into()); self } @@ -52881,42 +64560,72 @@ impl LookupTableExport { } /// Builds the `LookupTableExport` operation. - pub fn build>( - &self, - table_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, table_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableExport", |nd| { nd.add_input(table_handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tkeys { - nd.set_attr_type("Tkeys", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tvalues { - nd.set_attr_type("Tvalues", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tkeys { + nd.set_attr_type("Tkeys", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableExport` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, table_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableExport", |nd| { + nd.add_input(table_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tkeys { + nd.set_attr_type("Tkeys", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableExportInst{op}) + } +} +impl LookupTableExportInst { + /// Returns the 'keys' output of this 'LookupTableExport' operation. + pub fn keys(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'LookupTableExport' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for LookupTableExportInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableExport::new().build(table_handle, scope)`. -pub fn lookup_table_export>( - table_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_export>(table_handle: O0, scope: &mut crate::Scope) -> crate::Result { LookupTableExport::new().build(table_handle, scope) } + /// Builder for the `LookupTableExportV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableExportV2 { @@ -52924,6 +64633,12 @@ pub struct LookupTableExportV2 { Tvalues: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableExportV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableExportV2Inst { + /// An instance of a fully built LookupTableExportV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableExportV2 { /// Creates a new `LookupTableExportV2`. @@ -52938,10 +64653,7 @@ impl LookupTableExportV2 { } /// Sets the `Tvalues` attribute. - pub fn Tvalues>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tvalues>(mut self, value: ArgType) -> Self { self.Tvalues = ::std::option::Option::Some(value.into()); self } @@ -52953,42 +64665,72 @@ impl LookupTableExportV2 { } /// Builds the `LookupTableExportV2` operation. - pub fn build>( - &self, - table_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, table_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableExportV2", |nd| { nd.add_input(table_handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tkeys { - nd.set_attr_type("Tkeys", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tvalues { - nd.set_attr_type("Tvalues", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tkeys { + nd.set_attr_type("Tkeys", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableExportV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, table_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableExportV2", |nd| { + nd.add_input(table_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tkeys { + nd.set_attr_type("Tkeys", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableExportV2Inst{op}) + } +} +impl LookupTableExportV2Inst { + /// Returns the 'keys' output of this 'LookupTableExportV2' operation. + pub fn keys(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'LookupTableExportV2' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for LookupTableExportV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableExportV2::new().build(table_handle, scope)`. -pub fn lookup_table_export_v2>( - table_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_export_v2>(table_handle: O0, scope: &mut crate::Scope) -> crate::Result { LookupTableExportV2::new().build(table_handle, scope) } + /// Builder for the `LookupTableFind` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableFind { @@ -52996,6 +64738,12 @@ pub struct LookupTableFind { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableFind' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableFindInst { + /// An instance of a fully built LookupTableFind Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableFind { /// Creates a new `LookupTableFind`. @@ -53022,32 +64770,10 @@ impl LookupTableFind { } /// Builds the `LookupTableFind` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - table_handle: O0, - keys: O1, - default_value: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - table_handle.into(), - keys.into(), - default_value.into(), - scope, - ) - } - - fn build_impl( - &self, - table_handle: crate::Output, - keys: crate::Output, - default_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, default_value: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(table_handle.into(), keys.into(), default_value.into(), scope) + } + fn build_impl(&self, table_handle: crate::Output, keys: crate::Output, default_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableFind", |nd| { nd.add_input(table_handle); nd.add_input(keys); @@ -53055,30 +64781,58 @@ impl LookupTableFind { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type("Tin", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableFind` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, default_value: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), keys.into(), default_value.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, keys: crate::Output, default_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableFind", |nd| { + nd.add_input(table_handle); + nd.add_input(keys); + nd.add_input(default_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableFindInst{op}) + } +} +impl LookupTableFindInst { + /// Returns the 'values' output of this 'LookupTableFind' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LookupTableFindInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableFind::new().build(table_handle, keys, default_value, scope)`. -pub fn lookup_table_find< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - table_handle: O0, - keys: O1, - default_value: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_find, O1: ::std::convert::Into, O2: ::std::convert::Into>(table_handle: O0, keys: O1, default_value: O2, scope: &mut crate::Scope) -> crate::Result { LookupTableFind::new().build(table_handle, keys, default_value, scope) } + /// Builder for the `LookupTableFindV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableFindV2 { @@ -53086,6 +64840,12 @@ pub struct LookupTableFindV2 { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableFindV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableFindV2Inst { + /// An instance of a fully built LookupTableFindV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableFindV2 { /// Creates a new `LookupTableFindV2`. @@ -53112,32 +64872,10 @@ impl LookupTableFindV2 { } /// Builds the `LookupTableFindV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - table_handle: O0, - keys: O1, - default_value: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - table_handle.into(), - keys.into(), - default_value.into(), - scope, - ) - } - - fn build_impl( - &self, - table_handle: crate::Output, - keys: crate::Output, - default_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, default_value: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(table_handle.into(), keys.into(), default_value.into(), scope) + } + fn build_impl(&self, table_handle: crate::Output, keys: crate::Output, default_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableFindV2", |nd| { nd.add_input(table_handle); nd.add_input(keys); @@ -53145,30 +64883,58 @@ impl LookupTableFindV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type("Tin", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableFindV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, default_value: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), keys.into(), default_value.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, keys: crate::Output, default_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableFindV2", |nd| { + nd.add_input(table_handle); + nd.add_input(keys); + nd.add_input(default_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableFindV2Inst{op}) + } +} +impl LookupTableFindV2Inst { + /// Returns the 'values' output of this 'LookupTableFindV2' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LookupTableFindV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableFindV2::new().build(table_handle, keys, default_value, scope)`. -pub fn lookup_table_find_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - table_handle: O0, - keys: O1, - default_value: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_find_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(table_handle: O0, keys: O1, default_value: O2, scope: &mut crate::Scope) -> crate::Result { LookupTableFindV2::new().build(table_handle, keys, default_value, scope) } + /// Builder for the `LookupTableImport` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableImport { @@ -53176,6 +64942,12 @@ pub struct LookupTableImport { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableImport' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableImportInst { + /// An instance of a fully built LookupTableImport Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableImport { /// Creates a new `LookupTableImport`. @@ -53202,27 +64974,10 @@ impl LookupTableImport { } /// Builds the `LookupTableImport` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), keys.into(), values.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - keys: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableImport", |nd| { nd.add_input(table_handle); nd.add_input(keys); @@ -53230,30 +64985,51 @@ impl LookupTableImport { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type("Tin", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableImport` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), keys.into(), values.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableImport", |nd| { + nd.add_input(table_handle); + nd.add_input(keys); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableImportInst{op}) + } +} +impl LookupTableImportInst { +} +impl Into for LookupTableImportInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableImport::new().build(table_handle, keys, values, scope)`. -pub fn lookup_table_import< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_import, O1: ::std::convert::Into, O2: ::std::convert::Into>(table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { LookupTableImport::new().build(table_handle, keys, values, scope) } + /// Builder for the `LookupTableImportV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableImportV2 { @@ -53261,6 +65037,12 @@ pub struct LookupTableImportV2 { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableImportV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableImportV2Inst { + /// An instance of a fully built LookupTableImportV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableImportV2 { /// Creates a new `LookupTableImportV2`. @@ -53287,27 +65069,10 @@ impl LookupTableImportV2 { } /// Builds the `LookupTableImportV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), keys.into(), values.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - keys: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableImportV2", |nd| { nd.add_input(table_handle); nd.add_input(keys); @@ -53315,30 +65080,51 @@ impl LookupTableImportV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type("Tin", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableImportV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), keys.into(), values.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableImportV2", |nd| { + nd.add_input(table_handle); + nd.add_input(keys); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableImportV2Inst{op}) + } +} +impl LookupTableImportV2Inst { +} +impl Into for LookupTableImportV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableImportV2::new().build(table_handle, keys, values, scope)`. -pub fn lookup_table_import_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_import_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { LookupTableImportV2::new().build(table_handle, keys, values, scope) } + /// Builder for the `LookupTableInsert` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableInsert { @@ -53346,6 +65132,12 @@ pub struct LookupTableInsert { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableInsert' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableInsertInst { + /// An instance of a fully built LookupTableInsert Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableInsert { /// Creates a new `LookupTableInsert`. @@ -53372,27 +65164,10 @@ impl LookupTableInsert { } /// Builds the `LookupTableInsert` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), keys.into(), values.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - keys: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableInsert", |nd| { nd.add_input(table_handle); nd.add_input(keys); @@ -53400,30 +65175,51 @@ impl LookupTableInsert { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type("Tin", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableInsert` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), keys.into(), values.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableInsert", |nd| { + nd.add_input(table_handle); + nd.add_input(keys); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableInsertInst{op}) + } +} +impl LookupTableInsertInst { +} +impl Into for LookupTableInsertInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableInsert::new().build(table_handle, keys, values, scope)`. -pub fn lookup_table_insert< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_insert, O1: ::std::convert::Into, O2: ::std::convert::Into>(table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { LookupTableInsert::new().build(table_handle, keys, values, scope) } + /// Builder for the `LookupTableInsertV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableInsertV2 { @@ -53431,6 +65227,12 @@ pub struct LookupTableInsertV2 { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableInsertV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableInsertV2Inst { + /// An instance of a fully built LookupTableInsertV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableInsertV2 { /// Creates a new `LookupTableInsertV2`. @@ -53457,27 +65259,10 @@ impl LookupTableInsertV2 { } /// Builds the `LookupTableInsertV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), keys.into(), values.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - keys: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableInsertV2", |nd| { nd.add_input(table_handle); nd.add_input(keys); @@ -53485,36 +65270,63 @@ impl LookupTableInsertV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type("Tin", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableInsertV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), keys.into(), values.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, keys: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableInsertV2", |nd| { + nd.add_input(table_handle); + nd.add_input(keys); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableInsertV2Inst{op}) + } +} +impl LookupTableInsertV2Inst { +} +impl Into for LookupTableInsertV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableInsertV2::new().build(table_handle, keys, values, scope)`. -pub fn lookup_table_insert_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - table_handle: O0, - keys: O1, - values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_insert_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(table_handle: O0, keys: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { LookupTableInsertV2::new().build(table_handle, keys, values, scope) } + /// Builder for the `LookupTableRemoveV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableRemoveV2 { Tin: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableRemoveV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableRemoveV2Inst { + /// An instance of a fully built LookupTableRemoveV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableRemoveV2 { /// Creates a new `LookupTableRemoveV2`. @@ -53535,54 +65347,65 @@ impl LookupTableRemoveV2 { } /// Builds the `LookupTableRemoveV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - table_handle: O0, - keys: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, table_handle: O0, keys: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), keys.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - keys: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, keys: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableRemoveV2", |nd| { nd.add_input(table_handle); nd.add_input(keys); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type("Tin", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableRemoveV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, table_handle: O0, keys: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), keys.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, keys: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableRemoveV2", |nd| { + nd.add_input(table_handle); + nd.add_input(keys); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type("Tin", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableRemoveV2Inst{op}) + } +} +impl LookupTableRemoveV2Inst { +} +impl Into for LookupTableRemoveV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableRemoveV2::new().build(table_handle, keys, scope)`. -pub fn lookup_table_remove_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - table_handle: O0, - keys: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_remove_v2, O1: ::std::convert::Into>(table_handle: O0, keys: O1, scope: &mut crate::Scope) -> crate::Result { LookupTableRemoveV2::new().build(table_handle, keys, scope) } + /// Builder for the `LookupTableSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableSize { control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableSizeInst { + /// An instance of a fully built LookupTableSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableSize { /// Creates a new `LookupTableSize`. @@ -53597,19 +65420,10 @@ impl LookupTableSize { } /// Builds the `LookupTableSize` operation. - pub fn build>( - &self, - table_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, table_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableSize", |nd| { nd.add_input(table_handle); for op in &self.control_inputs { @@ -53618,20 +65432,52 @@ impl LookupTableSize { ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, table_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableSize", |nd| { + nd.add_input(table_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableSizeInst{op}) + } +} +impl LookupTableSizeInst { + /// Returns the 'size' output of this 'LookupTableSize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LookupTableSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableSize::new().build(table_handle, scope)`. -pub fn lookup_table_size>( - table_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_size>(table_handle: O0, scope: &mut crate::Scope) -> crate::Result { LookupTableSize::new().build(table_handle, scope) } + /// Builder for the `LookupTableSizeV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LookupTableSizeV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'LookupTableSizeV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LookupTableSizeV2Inst { + /// An instance of a fully built LookupTableSizeV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LookupTableSizeV2 { /// Creates a new `LookupTableSizeV2`. @@ -53646,19 +65492,10 @@ impl LookupTableSizeV2 { } /// Builds the `LookupTableSizeV2` operation. - pub fn build>( - &self, - table_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, table_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(table_handle.into(), scope) } - - fn build_impl( - &self, - table_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, table_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LookupTableSizeV2", |nd| { nd.add_input(table_handle); for op in &self.control_inputs { @@ -53667,20 +65504,52 @@ impl LookupTableSizeV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `LookupTableSizeV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, table_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(table_handle.into(), scope) + } + fn build_instance_impl(&self, table_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LookupTableSizeV2", |nd| { + nd.add_input(table_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(LookupTableSizeV2Inst{op}) + } +} +impl LookupTableSizeV2Inst { + /// Returns the 'size' output of this 'LookupTableSizeV2' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LookupTableSizeV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LookupTableSizeV2::new().build(table_handle, scope)`. -pub fn lookup_table_size_v2>( - table_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lookup_table_size_v2>(table_handle: O0, scope: &mut crate::Scope) -> crate::Result { LookupTableSizeV2::new().build(table_handle, scope) } + /// Builder for the `LoopCond` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LoopCond { control_inputs: ::std::vec::Vec, } +/// An instance of 'LoopCond' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LoopCondInst { + /// An instance of a fully built LoopCond Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LoopCond { /// Creates a new `LoopCond`. @@ -53695,19 +65564,10 @@ impl LoopCond { } /// Builds the `LoopCond` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LoopCond", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -53716,15 +65576,41 @@ impl LoopCond { ::std::result::Result::Ok(()) }) } -} + /// Builds the `LoopCond` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LoopCond", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(LoopCondInst{op}) + } +} +impl LoopCondInst { + /// Returns the 'output' output of this 'LoopCond' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LoopCondInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LoopCond::new().build(input, scope)`. -pub fn loop_cond>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn loop_cond>(input: O0, scope: &mut crate::Scope) -> crate::Result { LoopCond::new().build(input, scope) } + /// Builder for the `LowerBound` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct LowerBound { @@ -53732,6 +65618,12 @@ pub struct LowerBound { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'LowerBound' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LowerBoundInst { + /// An instance of a fully built LowerBound Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl LowerBound { /// Creates a new `LowerBound`. @@ -53746,10 +65638,7 @@ impl LowerBound { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -53761,52 +65650,67 @@ impl LowerBound { } /// Builds the `LowerBound` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - sorted_inputs: O0, - values: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, sorted_inputs: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(sorted_inputs.into(), values.into(), scope) } - - fn build_impl( - &self, - sorted_inputs: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, sorted_inputs: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("LowerBound", |nd| { nd.add_input(sorted_inputs); nd.add_input(values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `LowerBound` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, sorted_inputs: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sorted_inputs.into(), values.into(), scope) + } + fn build_instance_impl(&self, sorted_inputs: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("LowerBound", |nd| { + nd.add_input(sorted_inputs); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LowerBoundInst{op}) + } +} +impl LowerBoundInst { + /// Returns the 'output' output of this 'LowerBound' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for LowerBoundInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `LowerBound::new().build(sorted_inputs, values, scope)`. -pub fn lower_bound< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - sorted_inputs: O0, - values: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lower_bound, O1: ::std::convert::Into>(sorted_inputs: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { LowerBound::new().build(sorted_inputs, values, scope) } + /// Builder for the `Lu` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Lu { @@ -53814,6 +65718,12 @@ pub struct Lu { output_idx_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Lu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct LuInst { + /// An instance of a fully built Lu Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Lu { /// Creates a new `Lu`. @@ -53828,10 +65738,7 @@ impl Lu { } /// Sets the `output_idx_type` attribute. - pub fn output_idx_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_idx_type>(mut self, value: ArgType) -> Self { self.output_idx_type = ::std::option::Option::Some(value.into()); self } @@ -53843,47 +65750,83 @@ impl Lu { } /// Builds the `Lu` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Lu", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_idx_type { - nd.set_attr_type("output_idx_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_idx_type { + nd.set_attr_type("output_idx_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Lu` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Lu", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_idx_type { + nd.set_attr_type("output_idx_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(LuInst{op}) + } +} +impl LuInst { + /// Returns the 'lu' output of this 'Lu' operation. + pub fn lu(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'p' output of this 'Lu' operation. + pub fn p(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for LuInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Lu::new().build(input, scope)`. -pub fn lu>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn lu>(input: O0, scope: &mut crate::Scope) -> crate::Result { Lu::new().build(input, scope) } + /// Builder for the `MakeIterator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MakeIterator { control_inputs: ::std::vec::Vec, } +/// An instance of 'MakeIterator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MakeIteratorInst { + /// An instance of a fully built MakeIterator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MakeIterator { /// Creates a new `MakeIterator`. @@ -53898,24 +65841,10 @@ impl MakeIterator { } /// Builds the `MakeIterator` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - dataset: O0, - iterator: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, dataset: O0, iterator: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(dataset.into(), iterator.into(), scope) } - - fn build_impl( - &self, - dataset: crate::Output, - iterator: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, dataset: crate::Output, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MakeIterator", |nd| { nd.add_input(dataset); nd.add_input(iterator); @@ -53925,24 +65854,46 @@ impl MakeIterator { ::std::result::Result::Ok(()) }) } -} + /// Builds the `MakeIterator` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, dataset: O0, iterator: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dataset.into(), iterator.into(), scope) + } + fn build_instance_impl(&self, dataset: crate::Output, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MakeIterator", |nd| { + nd.add_input(dataset); + nd.add_input(iterator); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(MakeIteratorInst{op}) + } +} +impl MakeIteratorInst { +} +impl Into for MakeIteratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MakeIterator::new().build(dataset, iterator, scope)`. -pub fn make_iterator< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - dataset: O0, - iterator: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn make_iterator, O1: ::std::convert::Into>(dataset: O0, iterator: O1, scope: &mut crate::Scope) -> crate::Result { MakeIterator::new().build(dataset, iterator, scope) } + /// Builder for the `MakeUnique` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MakeUnique { control_inputs: ::std::vec::Vec, } +/// An instance of 'MakeUnique' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MakeUniqueInst { + /// An instance of a fully built MakeUnique Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MakeUnique { /// Creates a new `MakeUnique`. @@ -53957,19 +65908,10 @@ impl MakeUnique { } /// Builds the `MakeUnique` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MakeUnique", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -53978,15 +65920,41 @@ impl MakeUnique { ::std::result::Result::Ok(()) }) } -} + /// Builds the `MakeUnique` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MakeUnique", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(MakeUniqueInst{op}) + } +} +impl MakeUniqueInst { + /// Returns the 'output' output of this 'MakeUnique' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MakeUniqueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MakeUnique::new().build(input, scope)`. -pub fn make_unique>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn make_unique>(input: O0, scope: &mut crate::Scope) -> crate::Result { MakeUnique::new().build(input, scope) } + /// Builder for the `MapAndBatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MapAndBatchDataset { @@ -53998,6 +65966,12 @@ pub struct MapAndBatchDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MapAndBatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MapAndBatchDatasetInst { + /// An instance of a fully built MapAndBatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MapAndBatchDataset { /// Creates a new `MapAndBatchDataset`. @@ -54006,55 +65980,37 @@ impl MapAndBatchDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `preserve_cardinality` attribute. - pub fn preserve_cardinality>( - mut self, - value: ArgType, - ) -> Self { + pub fn preserve_cardinality>(mut self, value: ArgType) -> Self { self.preserve_cardinality = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -54066,40 +66022,10 @@ impl MapAndBatchDataset { } /// Builds the `MapAndBatchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - batch_size: O2, - num_parallel_calls: O3, - drop_remainder: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - batch_size.into(), - num_parallel_calls.into(), - drop_remainder.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - batch_size: crate::Output, - num_parallel_calls: crate::Output, - drop_remainder: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, batch_size: O2, num_parallel_calls: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), batch_size.into(), num_parallel_calls.into(), drop_remainder.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, batch_size: crate::Output, num_parallel_calls: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MapAndBatchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -54109,53 +66035,84 @@ impl MapAndBatchDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.preserve_cardinality { - nd.set_attr_bool("preserve_cardinality", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MapAndBatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, batch_size: O2, num_parallel_calls: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), batch_size.into(), num_parallel_calls.into(), drop_remainder.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, batch_size: crate::Output, num_parallel_calls: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MapAndBatchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(batch_size); + nd.add_input(num_parallel_calls); + nd.add_input(drop_remainder); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MapAndBatchDatasetInst{op}) + } +} +impl MapAndBatchDatasetInst { + /// Returns the 'handle' output of this 'MapAndBatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MapAndBatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MapAndBatchDataset::new().build(input_dataset, other_arguments, batch_size, num_parallel_calls, drop_remainder, scope)`. -pub fn map_and_batch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - batch_size: O2, - num_parallel_calls: O3, - drop_remainder: O4, - scope: &mut crate::Scope, -) -> crate::Result { - MapAndBatchDataset::new().build( - input_dataset, - other_arguments, - batch_size, - num_parallel_calls, - drop_remainder, - scope, - ) +pub fn map_and_batch_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, batch_size: O2, num_parallel_calls: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + MapAndBatchDataset::new().build(input_dataset, other_arguments, batch_size, num_parallel_calls, drop_remainder, scope) } + /// Builder for the `MapClear` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MapClear { @@ -54166,6 +66123,12 @@ pub struct MapClear { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MapClear' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MapClearInst { + /// An instance of a fully built MapClear Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MapClear { /// Creates a new `MapClear`. @@ -54186,28 +66149,19 @@ impl MapClear { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -54219,39 +66173,74 @@ impl MapClear { } /// Builds the `MapClear` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MapClear", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MapClear` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MapClear", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MapClearInst{op}) + } +} +impl MapClearInst { +} +impl Into for MapClearInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MapClear::new().build(scope)`. -pub fn map_clear(scope: &mut crate::Scope) -> crate::Result { +pub fn map_clear<>(scope: &mut crate::Scope) -> crate::Result { MapClear::new().build(scope) } + /// Builder for the `MapDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MapDataset { @@ -54264,6 +66253,12 @@ pub struct MapDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MapDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MapDatasetInst { + /// An instance of a fully built MapDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MapDataset { /// Creates a new `MapDataset`. @@ -54272,64 +66267,43 @@ impl MapDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `use_inter_op_parallelism` attribute. - pub fn use_inter_op_parallelism>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_inter_op_parallelism>(mut self, value: ArgType) -> Self { self.use_inter_op_parallelism = ::std::option::Option::Some(value.into()); self } /// Sets the `preserve_cardinality` attribute. - pub fn preserve_cardinality>( - mut self, - value: ArgType, - ) -> Self { + pub fn preserve_cardinality>(mut self, value: ArgType) -> Self { self.preserve_cardinality = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -54341,67 +66315,97 @@ impl MapDataset { } /// Builds the `MapDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), other_arguments.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MapDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { - nd.set_attr_bool("use_inter_op_parallelism", *value)?; - } - if let ::std::option::Option::Some(value) = &self.preserve_cardinality { - nd.set_attr_bool("preserve_cardinality", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { + nd.set_attr_bool("use_inter_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MapDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MapDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { + nd.set_attr_bool("use_inter_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MapDatasetInst{op}) + } +} +impl MapDatasetInst { + /// Returns the 'handle' output of this 'MapDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MapDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MapDataset::new().build(input_dataset, other_arguments, scope)`. -pub fn map_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn map_dataset, O1: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { MapDataset::new().build(input_dataset, other_arguments, scope) } + /// Builder for the `MapDefun` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MapDefun { @@ -54413,6 +66417,12 @@ pub struct MapDefun { max_intra_op_parallelism: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MapDefun' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MapDefunInst { + /// An instance of a fully built MapDefun Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MapDefun { /// Creates a new `MapDefun`. @@ -54421,55 +66431,37 @@ impl MapDefun { } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `Tcaptured` attribute. - pub fn Tcaptured>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcaptured>>(mut self, value: ArgType) -> Self { self.Tcaptured = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `max_intra_op_parallelism` attribute. - pub fn max_intra_op_parallelism>( - mut self, - value: ArgType, - ) -> Self { + pub fn max_intra_op_parallelism>(mut self, value: ArgType) -> Self { self.max_intra_op_parallelism = ::std::option::Option::Some(value.into()); self } @@ -54481,64 +66473,91 @@ impl MapDefun { } /// Builds the `MapDefun` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - arguments: O0, - captured_inputs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, arguments: O0, captured_inputs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(arguments.into(), captured_inputs.into(), scope) } - - fn build_impl( - &self, - arguments: crate::Output, - captured_inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, arguments: crate::Output, captured_inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MapDefun", |nd| { nd.add_input(arguments); nd.add_input(captured_inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcaptured { - nd.set_attr_type_list("Tcaptured", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.max_intra_op_parallelism { - nd.set_attr_int("max_intra_op_parallelism", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcaptured { + nd.set_attr_type_list("Tcaptured", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_intra_op_parallelism { + nd.set_attr_int("max_intra_op_parallelism", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MapDefun` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, arguments: O0, captured_inputs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(arguments.into(), captured_inputs.into(), scope) + } + fn build_instance_impl(&self, arguments: crate::Output, captured_inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MapDefun", |nd| { + nd.add_input(arguments); + nd.add_input(captured_inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcaptured { + nd.set_attr_type_list("Tcaptured", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_intra_op_parallelism { + nd.set_attr_int("max_intra_op_parallelism", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MapDefunInst{op}) + } +} +impl MapDefunInst { + /// Returns the 'output' output of this 'MapDefun' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MapDefunInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MapDefun::new().build(arguments, captured_inputs, scope)`. -pub fn map_defun< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - arguments: O0, - captured_inputs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn map_defun, O1: ::std::convert::Into>(arguments: O0, captured_inputs: O1, scope: &mut crate::Scope) -> crate::Result { MapDefun::new().build(arguments, captured_inputs, scope) } + /// Builder for the `MapIncompleteSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MapIncompleteSize { @@ -54549,6 +66568,12 @@ pub struct MapIncompleteSize { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MapIncompleteSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MapIncompleteSizeInst { + /// An instance of a fully built MapIncompleteSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MapIncompleteSize { /// Creates a new `MapIncompleteSize`. @@ -54569,28 +66594,19 @@ impl MapIncompleteSize { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -54602,39 +66618,81 @@ impl MapIncompleteSize { } /// Builds the `MapIncompleteSize` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MapIncompleteSize", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MapIncompleteSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MapIncompleteSize", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MapIncompleteSizeInst{op}) + } +} +impl MapIncompleteSizeInst { + /// Returns the 'size' output of this 'MapIncompleteSize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MapIncompleteSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MapIncompleteSize::new().build(scope)`. -pub fn map_incomplete_size(scope: &mut crate::Scope) -> crate::Result { +pub fn map_incomplete_size<>(scope: &mut crate::Scope) -> crate::Result { MapIncompleteSize::new().build(scope) } + /// Builder for the `MapPeek` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MapPeek { @@ -54645,6 +66703,12 @@ pub struct MapPeek { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MapPeek' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MapPeekInst { + /// An instance of a fully built MapPeek Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MapPeek { /// Creates a new `MapPeek`. @@ -54665,28 +66729,19 @@ impl MapPeek { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -54698,61 +66753,85 @@ impl MapPeek { } /// Builds the `MapPeek` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - key: O0, - indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(key.into(), indices.into(), scope) } - - fn build_impl( - &self, - key: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, key: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MapPeek", |nd| { nd.add_input(key); nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MapPeek` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(key.into(), indices.into(), scope) + } + fn build_instance_impl(&self, key: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MapPeek", |nd| { + nd.add_input(key); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MapPeekInst{op}) + } +} +impl MapPeekInst { + /// Returns the 'values' output of this 'MapPeek' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MapPeekInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MapPeek::new().build(key, indices, scope)`. -pub fn map_peek< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - key: O0, - indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn map_peek, O1: ::std::convert::Into>(key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { MapPeek::new().build(key, indices, scope) } + /// Builder for the `MapSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MapSize { @@ -54763,6 +66842,12 @@ pub struct MapSize { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MapSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MapSizeInst { + /// An instance of a fully built MapSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MapSize { /// Creates a new `MapSize`. @@ -54783,28 +66868,19 @@ impl MapSize { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -54816,39 +66892,81 @@ impl MapSize { } /// Builds the `MapSize` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MapSize", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MapSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MapSize", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MapSizeInst{op}) + } +} +impl MapSizeInst { + /// Returns the 'size' output of this 'MapSize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MapSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MapSize::new().build(scope)`. -pub fn map_size(scope: &mut crate::Scope) -> crate::Result { +pub fn map_size<>(scope: &mut crate::Scope) -> crate::Result { MapSize::new().build(scope) } + /// Builder for the `MapStage` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MapStage { @@ -54860,6 +66978,12 @@ pub struct MapStage { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MapStage' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MapStageInst { + /// An instance of a fully built MapStage Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MapStage { /// Creates a new `MapStage`. @@ -54880,37 +67004,25 @@ impl MapStage { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `fake_dtypes` attribute. - pub fn fake_dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn fake_dtypes>>(mut self, value: ArgType) -> Self { self.fake_dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -54922,27 +67034,10 @@ impl MapStage { } /// Builds the `MapStage` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - key: O0, - indices: O1, - values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, key: O0, indices: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(key.into(), indices.into(), values.into(), scope) } - - fn build_impl( - &self, - key: crate::Output, - indices: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, key: crate::Output, indices: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MapStage", |nd| { nd.add_input(key); nd.add_input(indices); @@ -54950,42 +67045,75 @@ impl MapStage { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.fake_dtypes { - nd.set_attr_type_list("fake_dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.fake_dtypes { + nd.set_attr_type_list("fake_dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MapStage` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, key: O0, indices: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(key.into(), indices.into(), values.into(), scope) + } + fn build_instance_impl(&self, key: crate::Output, indices: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MapStage", |nd| { + nd.add_input(key); + nd.add_input(indices); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.fake_dtypes { + nd.set_attr_type_list("fake_dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MapStageInst{op}) + } +} +impl MapStageInst { +} +impl Into for MapStageInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MapStage::new().build(key, indices, values, scope)`. -pub fn map_stage< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - key: O0, - indices: O1, - values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn map_stage, O1: ::std::convert::Into, O2: ::std::convert::Into>(key: O0, indices: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { MapStage::new().build(key, indices, values, scope) } + /// Builder for the `MapUnstage` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MapUnstage { @@ -54996,6 +67124,12 @@ pub struct MapUnstage { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MapUnstage' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MapUnstageInst { + /// An instance of a fully built MapUnstage Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MapUnstage { /// Creates a new `MapUnstage`. @@ -55016,28 +67150,19 @@ impl MapUnstage { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -55049,61 +67174,85 @@ impl MapUnstage { } /// Builds the `MapUnstage` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - key: O0, - indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(key.into(), indices.into(), scope) } - - fn build_impl( - &self, - key: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, key: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MapUnstage", |nd| { nd.add_input(key); nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MapUnstage` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(key.into(), indices.into(), scope) + } + fn build_instance_impl(&self, key: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MapUnstage", |nd| { + nd.add_input(key); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MapUnstageInst{op}) + } +} +impl MapUnstageInst { + /// Returns the 'values' output of this 'MapUnstage' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MapUnstageInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MapUnstage::new().build(key, indices, scope)`. -pub fn map_unstage< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - key: O0, - indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn map_unstage, O1: ::std::convert::Into>(key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { MapUnstage::new().build(key, indices, scope) } + /// Builder for the `MapUnstageNoKey` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MapUnstageNoKey { @@ -55114,6 +67263,12 @@ pub struct MapUnstageNoKey { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MapUnstageNoKey' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MapUnstageNoKeyInst { + /// An instance of a fully built MapUnstageNoKey Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MapUnstageNoKey { /// Creates a new `MapUnstageNoKey`. @@ -55134,28 +67289,19 @@ impl MapUnstageNoKey { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -55167,51 +67313,90 @@ impl MapUnstageNoKey { } /// Builds the `MapUnstageNoKey` operation. - pub fn build>( - &self, - indices: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, indices: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(indices.into(), scope) } - - fn build_impl( - &self, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MapUnstageNoKey", |nd| { nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MapUnstageNoKey` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, indices: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MapUnstageNoKey", |nd| { + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MapUnstageNoKeyInst{op}) + } +} +impl MapUnstageNoKeyInst { + /// Returns the 'key' output of this 'MapUnstageNoKey' operation. + pub fn key(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'MapUnstageNoKey' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for MapUnstageNoKeyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MapUnstageNoKey::new().build(indices, scope)`. -pub fn map_unstage_no_key>( - indices: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn map_unstage_no_key>(indices: O0, scope: &mut crate::Scope) -> crate::Result { MapUnstageNoKey::new().build(indices, scope) } + /// Builder for the `MatMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatMul { @@ -55220,6 +67405,12 @@ pub struct MatMul { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatMulInst { + /// An instance of a fully built MatMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatMul { /// Creates a new `MatMul`. @@ -55252,57 +67443,84 @@ impl MatMul { } /// Builds the `MatMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), b.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatMul", |nd| { nd.add_input(a); nd.add_input(b); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatMul", |nd| { + nd.add_input(a); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatMulInst{op}) + } +} +impl MatMulInst { + /// Returns the 'product' output of this 'MatMul' operation. + pub fn product(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatMul::new().build(a, b, scope)`. -pub fn mat_mul, O1: ::std::convert::Into>( - a: O0, - b: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mat_mul, O1: ::std::convert::Into>(a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { MatMul::new().build(a, b, scope) } + /// Builder for the `MatchingFiles` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatchingFiles { control_inputs: ::std::vec::Vec, } +/// An instance of 'MatchingFiles' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatchingFilesInst { + /// An instance of a fully built MatchingFiles Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatchingFiles { /// Creates a new `MatchingFiles`. @@ -55317,19 +67535,10 @@ impl MatchingFiles { } /// Builds the `MatchingFiles` operation. - pub fn build>( - &self, - pattern: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, pattern: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(pattern.into(), scope) } - - fn build_impl( - &self, - pattern: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, pattern: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatchingFiles", |nd| { nd.add_input(pattern); for op in &self.control_inputs { @@ -55338,20 +67547,52 @@ impl MatchingFiles { ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatchingFiles` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, pattern: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(pattern.into(), scope) + } + fn build_instance_impl(&self, pattern: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatchingFiles", |nd| { + nd.add_input(pattern); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(MatchingFilesInst{op}) + } +} +impl MatchingFilesInst { + /// Returns the 'filenames' output of this 'MatchingFiles' operation. + pub fn filenames(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatchingFilesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatchingFiles::new().build(pattern, scope)`. -pub fn matching_files>( - pattern: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matching_files>(pattern: O0, scope: &mut crate::Scope) -> crate::Result { MatchingFiles::new().build(pattern, scope) } + /// Builder for the `MatchingFilesDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatchingFilesDataset { control_inputs: ::std::vec::Vec, } +/// An instance of 'MatchingFilesDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatchingFilesDatasetInst { + /// An instance of a fully built MatchingFilesDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatchingFilesDataset { /// Creates a new `MatchingFilesDataset`. @@ -55366,19 +67607,10 @@ impl MatchingFilesDataset { } /// Builds the `MatchingFilesDataset` operation. - pub fn build>( - &self, - patterns: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, patterns: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(patterns.into(), scope) } - - fn build_impl( - &self, - patterns: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, patterns: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatchingFilesDataset", |nd| { nd.add_input(patterns); for op in &self.control_inputs { @@ -55387,15 +67619,41 @@ impl MatchingFilesDataset { ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatchingFilesDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, patterns: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(patterns.into(), scope) + } + fn build_instance_impl(&self, patterns: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatchingFilesDataset", |nd| { + nd.add_input(patterns); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(MatchingFilesDatasetInst{op}) + } +} +impl MatchingFilesDatasetInst { + /// Returns the 'handle' output of this 'MatchingFilesDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatchingFilesDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatchingFilesDataset::new().build(patterns, scope)`. -pub fn matching_files_dataset>( - patterns: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matching_files_dataset>(patterns: O0, scope: &mut crate::Scope) -> crate::Result { MatchingFilesDataset::new().build(patterns, scope) } + /// Builder for the `MatrixBandPart` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixBandPart { @@ -55403,6 +67661,12 @@ pub struct MatrixBandPart { Tindex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixBandPart' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixBandPartInst { + /// An instance of a fully built MatrixBandPart Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixBandPart { /// Creates a new `MatrixBandPart`. @@ -55417,10 +67681,7 @@ impl MatrixBandPart { } /// Sets the `Tindex` attribute. - pub fn Tindex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindex>(mut self, value: ArgType) -> Self { self.Tindex = ::std::option::Option::Some(value.into()); self } @@ -55432,27 +67693,10 @@ impl MatrixBandPart { } /// Builds the `MatrixBandPart` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - num_lower: O1, - num_upper: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, num_lower: O1, num_upper: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), num_lower.into(), num_upper.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - num_lower: crate::Output, - num_upper: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, num_lower: crate::Output, num_upper: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixBandPart", |nd| { nd.add_input(input); nd.add_input(num_lower); @@ -55460,36 +67704,70 @@ impl MatrixBandPart { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindex { - nd.set_attr_type("Tindex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindex { + nd.set_attr_type("Tindex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixBandPart` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, num_lower: O1, num_upper: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), num_lower.into(), num_upper.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, num_lower: crate::Output, num_upper: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixBandPart", |nd| { + nd.add_input(input); + nd.add_input(num_lower); + nd.add_input(num_upper); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindex { + nd.set_attr_type("Tindex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixBandPartInst{op}) + } +} +impl MatrixBandPartInst { + /// Returns the 'band' output of this 'MatrixBandPart' operation. + pub fn band(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixBandPartInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixBandPart::new().build(input, num_lower, num_upper, scope)`. -pub fn matrix_band_part< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - num_lower: O1, - num_upper: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_band_part, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, num_lower: O1, num_upper: O2, scope: &mut crate::Scope) -> crate::Result { MatrixBandPart::new().build(input, num_lower, num_upper, scope) } + /// Builder for the `MatrixDeterminant` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixDeterminant { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixDeterminant' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixDeterminantInst { + /// An instance of a fully built MatrixDeterminant Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixDeterminant { /// Creates a new `MatrixDeterminant`. @@ -55510,45 +67788,71 @@ impl MatrixDeterminant { } /// Builds the `MatrixDeterminant` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixDeterminant", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixDeterminant` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixDeterminant", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixDeterminantInst{op}) + } +} +impl MatrixDeterminantInst { + /// Returns the 'output' output of this 'MatrixDeterminant' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixDeterminantInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixDeterminant::new().build(input, scope)`. -pub fn matrix_determinant>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_determinant>(input: O0, scope: &mut crate::Scope) -> crate::Result { MatrixDeterminant::new().build(input, scope) } + /// Builder for the `MatrixDiag` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixDiag { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixDiag' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixDiagInst { + /// An instance of a fully built MatrixDiag Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixDiag { /// Creates a new `MatrixDiag`. @@ -55569,45 +67873,71 @@ impl MatrixDiag { } /// Builds the `MatrixDiag` operation. - pub fn build>( - &self, - diagonal: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, diagonal: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(diagonal.into(), scope) } - - fn build_impl( - &self, - diagonal: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, diagonal: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixDiag", |nd| { nd.add_input(diagonal); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixDiag` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, diagonal: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(diagonal.into(), scope) + } + fn build_instance_impl(&self, diagonal: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixDiag", |nd| { + nd.add_input(diagonal); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixDiagInst{op}) + } +} +impl MatrixDiagInst { + /// Returns the 'output' output of this 'MatrixDiag' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixDiagInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixDiag::new().build(diagonal, scope)`. -pub fn matrix_diag>( - diagonal: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_diag>(diagonal: O0, scope: &mut crate::Scope) -> crate::Result { MatrixDiag::new().build(diagonal, scope) } + /// Builder for the `MatrixDiagPart` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixDiagPart { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixDiagPart' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixDiagPartInst { + /// An instance of a fully built MatrixDiagPart Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixDiagPart { /// Creates a new `MatrixDiagPart`. @@ -55628,45 +67958,71 @@ impl MatrixDiagPart { } /// Builds the `MatrixDiagPart` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixDiagPart", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixDiagPart` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixDiagPart", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixDiagPartInst{op}) + } +} +impl MatrixDiagPartInst { + /// Returns the 'diagonal' output of this 'MatrixDiagPart' operation. + pub fn diagonal(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixDiagPartInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixDiagPart::new().build(input, scope)`. -pub fn matrix_diag_part>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_diag_part>(input: O0, scope: &mut crate::Scope) -> crate::Result { MatrixDiagPart::new().build(input, scope) } + /// Builder for the `MatrixDiagPartV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixDiagPartV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixDiagPartV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixDiagPartV2Inst { + /// An instance of a fully built MatrixDiagPartV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixDiagPartV2 { /// Creates a new `MatrixDiagPartV2`. @@ -55687,27 +68043,10 @@ impl MatrixDiagPartV2 { } /// Builds the `MatrixDiagPartV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - k: O1, - padding_value: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, k: O1, padding_value: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), k.into(), padding_value.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - k: crate::Output, - padding_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, k: crate::Output, padding_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixDiagPartV2", |nd| { nd.add_input(input); nd.add_input(k); @@ -55715,27 +68054,52 @@ impl MatrixDiagPartV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixDiagPartV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, k: O1, padding_value: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), k.into(), padding_value.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, k: crate::Output, padding_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixDiagPartV2", |nd| { + nd.add_input(input); + nd.add_input(k); + nd.add_input(padding_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixDiagPartV2Inst{op}) + } +} +impl MatrixDiagPartV2Inst { + /// Returns the 'diagonal' output of this 'MatrixDiagPartV2' operation. + pub fn diagonal(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixDiagPartV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixDiagPartV2::new().build(input, k, padding_value, scope)`. -pub fn matrix_diag_part_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - k: O1, - padding_value: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_diag_part_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, k: O1, padding_value: O2, scope: &mut crate::Scope) -> crate::Result { MatrixDiagPartV2::new().build(input, k, padding_value, scope) } + /// Builder for the `MatrixDiagPartV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixDiagPartV3 { @@ -55743,6 +68107,12 @@ pub struct MatrixDiagPartV3 { align: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixDiagPartV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixDiagPartV3Inst { + /// An instance of a fully built MatrixDiagPartV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixDiagPartV3 { /// Creates a new `MatrixDiagPartV3`. @@ -55757,10 +68127,7 @@ impl MatrixDiagPartV3 { } /// Sets the `align` attribute. - pub fn align>( - mut self, - value: ArgType, - ) -> Self { + pub fn align>(mut self, value: ArgType) -> Self { self.align = ::std::option::Option::Some(value.into()); self } @@ -55772,27 +68139,10 @@ impl MatrixDiagPartV3 { } /// Builds the `MatrixDiagPartV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - k: O1, - padding_value: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, k: O1, padding_value: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), k.into(), padding_value.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - k: crate::Output, - padding_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, k: crate::Output, padding_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixDiagPartV3", |nd| { nd.add_input(input); nd.add_input(k); @@ -55800,36 +68150,70 @@ impl MatrixDiagPartV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align { - nd.set_attr_string("align", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align { + nd.set_attr_string("align", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixDiagPartV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, k: O1, padding_value: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), k.into(), padding_value.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, k: crate::Output, padding_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixDiagPartV3", |nd| { + nd.add_input(input); + nd.add_input(k); + nd.add_input(padding_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align { + nd.set_attr_string("align", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixDiagPartV3Inst{op}) + } +} +impl MatrixDiagPartV3Inst { + /// Returns the 'diagonal' output of this 'MatrixDiagPartV3' operation. + pub fn diagonal(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixDiagPartV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixDiagPartV3::new().build(input, k, padding_value, scope)`. -pub fn matrix_diag_part_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - k: O1, - padding_value: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_diag_part_v3, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, k: O1, padding_value: O2, scope: &mut crate::Scope) -> crate::Result { MatrixDiagPartV3::new().build(input, k, padding_value, scope) } + /// Builder for the `MatrixDiagV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixDiagV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixDiagV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixDiagV2Inst { + /// An instance of a fully built MatrixDiagV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixDiagV2 { /// Creates a new `MatrixDiagV2`. @@ -55850,40 +68234,10 @@ impl MatrixDiagV2 { } /// Builds the `MatrixDiagV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - diagonal: O0, - k: O1, - num_rows: O2, - num_cols: O3, - padding_value: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - diagonal.into(), - k.into(), - num_rows.into(), - num_cols.into(), - padding_value.into(), - scope, - ) - } - - fn build_impl( - &self, - diagonal: crate::Output, - k: crate::Output, - num_rows: crate::Output, - num_cols: crate::Output, - padding_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, diagonal: O0, k: O1, num_rows: O2, num_cols: O3, padding_value: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(diagonal.into(), k.into(), num_rows.into(), num_cols.into(), padding_value.into(), scope) + } + fn build_impl(&self, diagonal: crate::Output, k: crate::Output, num_rows: crate::Output, num_cols: crate::Output, padding_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixDiagV2", |nd| { nd.add_input(diagonal); nd.add_input(k); @@ -55893,31 +68247,54 @@ impl MatrixDiagV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixDiagV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, diagonal: O0, k: O1, num_rows: O2, num_cols: O3, padding_value: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(diagonal.into(), k.into(), num_rows.into(), num_cols.into(), padding_value.into(), scope) + } + fn build_instance_impl(&self, diagonal: crate::Output, k: crate::Output, num_rows: crate::Output, num_cols: crate::Output, padding_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixDiagV2", |nd| { + nd.add_input(diagonal); + nd.add_input(k); + nd.add_input(num_rows); + nd.add_input(num_cols); + nd.add_input(padding_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixDiagV2Inst{op}) + } +} +impl MatrixDiagV2Inst { + /// Returns the 'output' output of this 'MatrixDiagV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixDiagV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixDiagV2::new().build(diagonal, k, num_rows, num_cols, padding_value, scope)`. -pub fn matrix_diag_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - diagonal: O0, - k: O1, - num_rows: O2, - num_cols: O3, - padding_value: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_diag_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(diagonal: O0, k: O1, num_rows: O2, num_cols: O3, padding_value: O4, scope: &mut crate::Scope) -> crate::Result { MatrixDiagV2::new().build(diagonal, k, num_rows, num_cols, padding_value, scope) } + /// Builder for the `MatrixDiagV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixDiagV3 { @@ -55925,6 +68302,12 @@ pub struct MatrixDiagV3 { align: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixDiagV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixDiagV3Inst { + /// An instance of a fully built MatrixDiagV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixDiagV3 { /// Creates a new `MatrixDiagV3`. @@ -55939,10 +68322,7 @@ impl MatrixDiagV3 { } /// Sets the `align` attribute. - pub fn align>( - mut self, - value: ArgType, - ) -> Self { + pub fn align>(mut self, value: ArgType) -> Self { self.align = ::std::option::Option::Some(value.into()); self } @@ -55954,40 +68334,10 @@ impl MatrixDiagV3 { } /// Builds the `MatrixDiagV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - diagonal: O0, - k: O1, - num_rows: O2, - num_cols: O3, - padding_value: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - diagonal.into(), - k.into(), - num_rows.into(), - num_cols.into(), - padding_value.into(), - scope, - ) - } - - fn build_impl( - &self, - diagonal: crate::Output, - k: crate::Output, - num_rows: crate::Output, - num_cols: crate::Output, - padding_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, diagonal: O0, k: O1, num_rows: O2, num_cols: O3, padding_value: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(diagonal.into(), k.into(), num_rows.into(), num_cols.into(), padding_value.into(), scope) + } + fn build_impl(&self, diagonal: crate::Output, k: crate::Output, num_rows: crate::Output, num_cols: crate::Output, padding_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixDiagV3", |nd| { nd.add_input(diagonal); nd.add_input(k); @@ -55997,40 +68347,72 @@ impl MatrixDiagV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align { - nd.set_attr_string("align", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align { + nd.set_attr_string("align", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixDiagV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, diagonal: O0, k: O1, num_rows: O2, num_cols: O3, padding_value: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(diagonal.into(), k.into(), num_rows.into(), num_cols.into(), padding_value.into(), scope) + } + fn build_instance_impl(&self, diagonal: crate::Output, k: crate::Output, num_rows: crate::Output, num_cols: crate::Output, padding_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixDiagV3", |nd| { + nd.add_input(diagonal); + nd.add_input(k); + nd.add_input(num_rows); + nd.add_input(num_cols); + nd.add_input(padding_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align { + nd.set_attr_string("align", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixDiagV3Inst{op}) + } +} +impl MatrixDiagV3Inst { + /// Returns the 'output' output of this 'MatrixDiagV3' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixDiagV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixDiagV3::new().build(diagonal, k, num_rows, num_cols, padding_value, scope)`. -pub fn matrix_diag_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - diagonal: O0, - k: O1, - num_rows: O2, - num_cols: O3, - padding_value: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_diag_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(diagonal: O0, k: O1, num_rows: O2, num_cols: O3, padding_value: O4, scope: &mut crate::Scope) -> crate::Result { MatrixDiagV3::new().build(diagonal, k, num_rows, num_cols, padding_value, scope) } + /// Builder for the `MatrixExponential` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixExponential { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixExponential' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixExponentialInst { + /// An instance of a fully built MatrixExponential Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixExponential { /// Creates a new `MatrixExponential`. @@ -56051,39 +68433,59 @@ impl MatrixExponential { } /// Builds the `MatrixExponential` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixExponential", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixExponential` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixExponential", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixExponentialInst{op}) + } +} +impl MatrixExponentialInst { + /// Returns the 'output' output of this 'MatrixExponential' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixExponentialInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixExponential::new().build(input, scope)`. -pub fn matrix_exponential>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_exponential>(input: O0, scope: &mut crate::Scope) -> crate::Result { MatrixExponential::new().build(input, scope) } + /// Builder for the `MatrixInverse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixInverse { @@ -56091,6 +68493,12 @@ pub struct MatrixInverse { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixInverse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixInverseInst { + /// An instance of a fully built MatrixInverse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixInverse { /// Creates a new `MatrixInverse`. @@ -56117,48 +68525,77 @@ impl MatrixInverse { } /// Builds the `MatrixInverse` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixInverse", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.adjoint { - nd.set_attr_bool("adjoint", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixInverse` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixInverse", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixInverseInst{op}) + } +} +impl MatrixInverseInst { + /// Returns the 'output' output of this 'MatrixInverse' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixInverseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixInverse::new().build(input, scope)`. -pub fn matrix_inverse>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_inverse>(input: O0, scope: &mut crate::Scope) -> crate::Result { MatrixInverse::new().build(input, scope) } + /// Builder for the `MatrixLogarithm` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixLogarithm { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixLogarithm' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixLogarithmInst { + /// An instance of a fully built MatrixLogarithm Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixLogarithm { /// Creates a new `MatrixLogarithm`. @@ -56179,45 +68616,71 @@ impl MatrixLogarithm { } /// Builds the `MatrixLogarithm` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixLogarithm", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixLogarithm` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixLogarithm", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixLogarithmInst{op}) + } +} +impl MatrixLogarithmInst { + /// Returns the 'output' output of this 'MatrixLogarithm' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixLogarithmInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixLogarithm::new().build(input, scope)`. -pub fn matrix_logarithm>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_logarithm>(input: O0, scope: &mut crate::Scope) -> crate::Result { MatrixLogarithm::new().build(input, scope) } + /// Builder for the `MatrixSetDiag` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixSetDiag { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixSetDiag' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixSetDiagInst { + /// An instance of a fully built MatrixSetDiag Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixSetDiag { /// Creates a new `MatrixSetDiag`. @@ -56238,55 +68701,73 @@ impl MatrixSetDiag { } /// Builds the `MatrixSetDiag` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - diagonal: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, diagonal: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), diagonal.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - diagonal: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, diagonal: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixSetDiag", |nd| { nd.add_input(input); nd.add_input(diagonal); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixSetDiag` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, diagonal: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), diagonal.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, diagonal: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixSetDiag", |nd| { + nd.add_input(input); + nd.add_input(diagonal); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixSetDiagInst{op}) + } +} +impl MatrixSetDiagInst { + /// Returns the 'output' output of this 'MatrixSetDiag' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixSetDiagInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixSetDiag::new().build(input, diagonal, scope)`. -pub fn matrix_set_diag< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - diagonal: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_set_diag, O1: ::std::convert::Into>(input: O0, diagonal: O1, scope: &mut crate::Scope) -> crate::Result { MatrixSetDiag::new().build(input, diagonal, scope) } + /// Builder for the `MatrixSetDiagV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixSetDiagV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixSetDiagV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixSetDiagV2Inst { + /// An instance of a fully built MatrixSetDiagV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixSetDiagV2 { /// Creates a new `MatrixSetDiagV2`. @@ -56307,27 +68788,10 @@ impl MatrixSetDiagV2 { } /// Builds the `MatrixSetDiagV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - diagonal: O1, - k: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, diagonal: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), diagonal.into(), k.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - diagonal: crate::Output, - k: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, diagonal: crate::Output, k: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixSetDiagV2", |nd| { nd.add_input(input); nd.add_input(diagonal); @@ -56335,27 +68799,52 @@ impl MatrixSetDiagV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixSetDiagV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, diagonal: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), diagonal.into(), k.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, diagonal: crate::Output, k: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixSetDiagV2", |nd| { + nd.add_input(input); + nd.add_input(diagonal); + nd.add_input(k); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixSetDiagV2Inst{op}) + } +} +impl MatrixSetDiagV2Inst { + /// Returns the 'output' output of this 'MatrixSetDiagV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixSetDiagV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixSetDiagV2::new().build(input, diagonal, k, scope)`. -pub fn matrix_set_diag_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - diagonal: O1, - k: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_set_diag_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, diagonal: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { MatrixSetDiagV2::new().build(input, diagonal, k, scope) } + /// Builder for the `MatrixSetDiagV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixSetDiagV3 { @@ -56363,6 +68852,12 @@ pub struct MatrixSetDiagV3 { align: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixSetDiagV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixSetDiagV3Inst { + /// An instance of a fully built MatrixSetDiagV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixSetDiagV3 { /// Creates a new `MatrixSetDiagV3`. @@ -56377,10 +68872,7 @@ impl MatrixSetDiagV3 { } /// Sets the `align` attribute. - pub fn align>( - mut self, - value: ArgType, - ) -> Self { + pub fn align>(mut self, value: ArgType) -> Self { self.align = ::std::option::Option::Some(value.into()); self } @@ -56392,27 +68884,10 @@ impl MatrixSetDiagV3 { } /// Builds the `MatrixSetDiagV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - diagonal: O1, - k: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, diagonal: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), diagonal.into(), k.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - diagonal: crate::Output, - k: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, diagonal: crate::Output, k: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixSetDiagV3", |nd| { nd.add_input(input); nd.add_input(diagonal); @@ -56420,30 +68895,58 @@ impl MatrixSetDiagV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align { - nd.set_attr_string("align", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align { + nd.set_attr_string("align", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixSetDiagV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, diagonal: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), diagonal.into(), k.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, diagonal: crate::Output, k: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixSetDiagV3", |nd| { + nd.add_input(input); + nd.add_input(diagonal); + nd.add_input(k); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align { + nd.set_attr_string("align", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixSetDiagV3Inst{op}) + } +} +impl MatrixSetDiagV3Inst { + /// Returns the 'output' output of this 'MatrixSetDiagV3' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixSetDiagV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixSetDiagV3::new().build(input, diagonal, k, scope)`. -pub fn matrix_set_diag_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - diagonal: O1, - k: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_set_diag_v3, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, diagonal: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { MatrixSetDiagV3::new().build(input, diagonal, k, scope) } + /// Builder for the `MatrixSolve` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixSolve { @@ -56451,6 +68954,12 @@ pub struct MatrixSolve { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixSolve' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixSolveInst { + /// An instance of a fully built MatrixSolve Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixSolve { /// Creates a new `MatrixSolve`. @@ -56477,52 +68986,67 @@ impl MatrixSolve { } /// Builds the `MatrixSolve` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(matrix.into(), rhs.into(), scope) } - - fn build_impl( - &self, - matrix: crate::Output, - rhs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixSolve", |nd| { nd.add_input(matrix); nd.add_input(rhs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.adjoint { - nd.set_attr_bool("adjoint", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixSolve` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(matrix.into(), rhs.into(), scope) + } + fn build_instance_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixSolve", |nd| { + nd.add_input(matrix); + nd.add_input(rhs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixSolveInst{op}) + } +} +impl MatrixSolveInst { + /// Returns the 'output' output of this 'MatrixSolve' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixSolveInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixSolve::new().build(matrix, rhs, scope)`. -pub fn matrix_solve< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_solve, O1: ::std::convert::Into>(matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { MatrixSolve::new().build(matrix, rhs, scope) } + /// Builder for the `MatrixSolveLs` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixSolveLs { @@ -56530,6 +69054,12 @@ pub struct MatrixSolveLs { fast: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixSolveLs' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixSolveLsInst { + /// An instance of a fully built MatrixSolveLs Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixSolveLs { /// Creates a new `MatrixSolveLs`. @@ -56556,27 +69086,10 @@ impl MatrixSolveLs { } /// Builds the `MatrixSolveLs` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - matrix: O0, - rhs: O1, - l2_regularizer: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, matrix: O0, rhs: O1, l2_regularizer: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(matrix.into(), rhs.into(), l2_regularizer.into(), scope) } - - fn build_impl( - &self, - matrix: crate::Output, - rhs: crate::Output, - l2_regularizer: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, matrix: crate::Output, rhs: crate::Output, l2_regularizer: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixSolveLs", |nd| { nd.add_input(matrix); nd.add_input(rhs); @@ -56584,36 +69097,70 @@ impl MatrixSolveLs { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.fast { - nd.set_attr_bool("fast", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.fast { + nd.set_attr_bool("fast", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixSolveLs` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, matrix: O0, rhs: O1, l2_regularizer: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(matrix.into(), rhs.into(), l2_regularizer.into(), scope) + } + fn build_instance_impl(&self, matrix: crate::Output, rhs: crate::Output, l2_regularizer: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixSolveLs", |nd| { + nd.add_input(matrix); + nd.add_input(rhs); + nd.add_input(l2_regularizer); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.fast { + nd.set_attr_bool("fast", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixSolveLsInst{op}) + } +} +impl MatrixSolveLsInst { + /// Returns the 'output' output of this 'MatrixSolveLs' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixSolveLsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixSolveLs::new().build(matrix, rhs, l2_regularizer, scope)`. -pub fn matrix_solve_ls< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - matrix: O0, - rhs: O1, - l2_regularizer: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_solve_ls, O1: ::std::convert::Into, O2: ::std::convert::Into>(matrix: O0, rhs: O1, l2_regularizer: O2, scope: &mut crate::Scope) -> crate::Result { MatrixSolveLs::new().build(matrix, rhs, l2_regularizer, scope) } + /// Builder for the `MatrixSquareRoot` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixSquareRoot { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixSquareRoot' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixSquareRootInst { + /// An instance of a fully built MatrixSquareRoot Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixSquareRoot { /// Creates a new `MatrixSquareRoot`. @@ -56634,39 +69181,59 @@ impl MatrixSquareRoot { } /// Builds the `MatrixSquareRoot` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixSquareRoot", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixSquareRoot` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixSquareRoot", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixSquareRootInst{op}) + } +} +impl MatrixSquareRootInst { + /// Returns the 'output' output of this 'MatrixSquareRoot' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixSquareRootInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixSquareRoot::new().build(input, scope)`. -pub fn matrix_square_root>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_square_root>(input: O0, scope: &mut crate::Scope) -> crate::Result { MatrixSquareRoot::new().build(input, scope) } + /// Builder for the `MatrixTriangularSolve` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MatrixTriangularSolve { @@ -56675,6 +69242,12 @@ pub struct MatrixTriangularSolve { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MatrixTriangularSolve' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MatrixTriangularSolveInst { + /// An instance of a fully built MatrixTriangularSolve Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MatrixTriangularSolve { /// Creates a new `MatrixTriangularSolve`. @@ -56707,55 +69280,73 @@ impl MatrixTriangularSolve { } /// Builds the `MatrixTriangularSolve` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(matrix.into(), rhs.into(), scope) } - - fn build_impl( - &self, - matrix: crate::Output, - rhs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MatrixTriangularSolve", |nd| { nd.add_input(matrix); nd.add_input(rhs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.lower { - nd.set_attr_bool("lower", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adjoint { - nd.set_attr_bool("adjoint", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.lower { + nd.set_attr_bool("lower", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MatrixTriangularSolve` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(matrix.into(), rhs.into(), scope) + } + fn build_instance_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MatrixTriangularSolve", |nd| { + nd.add_input(matrix); + nd.add_input(rhs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.lower { + nd.set_attr_bool("lower", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MatrixTriangularSolveInst{op}) + } +} +impl MatrixTriangularSolveInst { + /// Returns the 'output' output of this 'MatrixTriangularSolve' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MatrixTriangularSolveInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MatrixTriangularSolve::new().build(matrix, rhs, scope)`. -pub fn matrix_triangular_solve< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn matrix_triangular_solve, O1: ::std::convert::Into>(matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { MatrixTriangularSolve::new().build(matrix, rhs, scope) } + /// Builder for the `Max` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Max { @@ -56764,6 +69355,12 @@ pub struct Max { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Max' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxInst { + /// An instance of a fully built Max Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Max { /// Creates a new `Max`. @@ -56796,52 +69393,73 @@ impl Max { } /// Builds the `Max` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), reduction_indices.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - reduction_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Max", |nd| { nd.add_input(input); nd.add_input(reduction_indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Max` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), reduction_indices.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Max", |nd| { + nd.add_input(input); + nd.add_input(reduction_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxInst{op}) + } +} +impl MaxInst { + /// Returns the 'output' output of this 'Max' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Max::new().build(input, reduction_indices, scope)`. -pub fn max, O1: ::std::convert::Into>( - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max, O1: ::std::convert::Into>(input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { Max::new().build(input, reduction_indices, scope) } + /// Builder for the `MaxIntraOpParallelismDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxIntraOpParallelismDataset { @@ -56849,6 +69467,12 @@ pub struct MaxIntraOpParallelismDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxIntraOpParallelismDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxIntraOpParallelismDatasetInst { + /// An instance of a fully built MaxIntraOpParallelismDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxIntraOpParallelismDataset { /// Creates a new `MaxIntraOpParallelismDataset`. @@ -56857,19 +69481,13 @@ impl MaxIntraOpParallelismDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -56881,52 +69499,67 @@ impl MaxIntraOpParallelismDataset { } /// Builds the `MaxIntraOpParallelismDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - max_intra_op_parallelism: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, max_intra_op_parallelism: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), max_intra_op_parallelism.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - max_intra_op_parallelism: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, max_intra_op_parallelism: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxIntraOpParallelismDataset", |nd| { nd.add_input(input_dataset); nd.add_input(max_intra_op_parallelism); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxIntraOpParallelismDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, max_intra_op_parallelism: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), max_intra_op_parallelism.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, max_intra_op_parallelism: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxIntraOpParallelismDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(max_intra_op_parallelism); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxIntraOpParallelismDatasetInst{op}) + } +} +impl MaxIntraOpParallelismDatasetInst { + /// Returns the 'handle' output of this 'MaxIntraOpParallelismDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxIntraOpParallelismDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxIntraOpParallelismDataset::new().build(input_dataset, max_intra_op_parallelism, scope)`. -pub fn max_intra_op_parallelism_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - max_intra_op_parallelism: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_intra_op_parallelism_dataset, O1: ::std::convert::Into>(input_dataset: O0, max_intra_op_parallelism: O1, scope: &mut crate::Scope) -> crate::Result { MaxIntraOpParallelismDataset::new().build(input_dataset, max_intra_op_parallelism, scope) } + /// Builder for the `MaxPool` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPool { @@ -56938,6 +69571,12 @@ pub struct MaxPool { data_format: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPool' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPoolInst { + /// An instance of a fully built MaxPool Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPool { /// Creates a new `MaxPool`. @@ -56952,46 +69591,31 @@ impl MaxPool { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `explicit_paddings` attribute. - pub fn explicit_paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn explicit_paddings>>(mut self, value: ArgType) -> Self { self.explicit_paddings = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -57003,54 +69627,89 @@ impl MaxPool { } /// Builds the `MaxPool` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPool", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.explicit_paddings { - nd.set_attr_int_list("explicit_paddings", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPool` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPool", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPoolInst{op}) + } +} +impl MaxPoolInst { + /// Returns the 'output' output of this 'MaxPool' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPoolInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPool::new().build(input, scope)`. -pub fn max_pool>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool>(input: O0, scope: &mut crate::Scope) -> crate::Result { MaxPool::new().build(input, scope) } + /// Builder for the `MaxPool3D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPool3D { @@ -57061,6 +69720,12 @@ pub struct MaxPool3D { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPool3D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPool3DInst { + /// An instance of a fully built MaxPool3D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPool3D { /// Creates a new `MaxPool3D`. @@ -57069,37 +69734,25 @@ impl MaxPool3D { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -57117,51 +69770,83 @@ impl MaxPool3D { } /// Builds the `MaxPool3D` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPool3D", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPool3D` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPool3D", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPool3DInst{op}) + } +} +impl MaxPool3DInst { + /// Returns the 'output' output of this 'MaxPool3D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPool3DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPool3D::new().build(input, scope)`. -pub fn max_pool3_d>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool3_d>(input: O0, scope: &mut crate::Scope) -> crate::Result { MaxPool3D::new().build(input, scope) } + /// Builder for the `MaxPool3DGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPool3DGrad { @@ -57173,6 +69858,12 @@ pub struct MaxPool3DGrad { TInput: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPool3DGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPool3DGradInst { + /// An instance of a fully built MaxPool3DGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPool3DGrad { /// Creates a new `MaxPool3DGrad`. @@ -57181,37 +69872,25 @@ impl MaxPool3DGrad { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -57223,10 +69902,7 @@ impl MaxPool3DGrad { } /// Sets the `TInput` attribute. - pub fn TInput>( - mut self, - value: ArgType, - ) -> Self { + pub fn TInput>(mut self, value: ArgType) -> Self { self.TInput = ::std::option::Option::Some(value.into()); self } @@ -57238,27 +69914,10 @@ impl MaxPool3DGrad { } /// Builds the `MaxPool3DGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - orig_input: O0, - orig_output: O1, - grad: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(orig_input.into(), orig_output.into(), grad.into(), scope) } - - fn build_impl( - &self, - orig_input: crate::Output, - orig_output: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPool3DGrad", |nd| { nd.add_input(orig_input); nd.add_input(orig_output); @@ -57266,42 +69925,82 @@ impl MaxPool3DGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.TInput { - nd.set_attr_type("TInput", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.TInput { + nd.set_attr_type("TInput", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPool3DGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(orig_input.into(), orig_output.into(), grad.into(), scope) + } + fn build_instance_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPool3DGrad", |nd| { + nd.add_input(orig_input); + nd.add_input(orig_output); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.TInput { + nd.set_attr_type("TInput", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPool3DGradInst{op}) + } +} +impl MaxPool3DGradInst { + /// Returns the 'output' output of this 'MaxPool3DGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPool3DGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPool3DGrad::new().build(orig_input, orig_output, grad, scope)`. -pub fn max_pool3_dgrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - orig_input: O0, - orig_output: O1, - grad: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool3_dgrad, O1: ::std::convert::Into, O2: ::std::convert::Into>(orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { MaxPool3DGrad::new().build(orig_input, orig_output, grad, scope) } + /// Builder for the `MaxPool3DGradGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPool3DGradGrad { @@ -57312,6 +70011,12 @@ pub struct MaxPool3DGradGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPool3DGradGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPool3DGradGradInst { + /// An instance of a fully built MaxPool3DGradGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPool3DGradGrad { /// Creates a new `MaxPool3DGradGrad`. @@ -57320,37 +70025,25 @@ impl MaxPool3DGradGrad { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -57368,27 +70061,10 @@ impl MaxPool3DGradGrad { } /// Builds the `MaxPool3DGradGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - orig_input: O0, - orig_output: O1, - grad: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(orig_input.into(), orig_output.into(), grad.into(), scope) } - - fn build_impl( - &self, - orig_input: crate::Output, - orig_output: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPool3DGradGrad", |nd| { nd.add_input(orig_input); nd.add_input(orig_output); @@ -57396,39 +70072,76 @@ impl MaxPool3DGradGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPool3DGradGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(orig_input.into(), orig_output.into(), grad.into(), scope) + } + fn build_instance_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPool3DGradGrad", |nd| { + nd.add_input(orig_input); + nd.add_input(orig_output); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPool3DGradGradInst{op}) + } +} +impl MaxPool3DGradGradInst { + /// Returns the 'output' output of this 'MaxPool3DGradGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPool3DGradGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPool3DGradGrad::new().build(orig_input, orig_output, grad, scope)`. -pub fn max_pool3_dgrad_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - orig_input: O0, - orig_output: O1, - grad: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool3_dgrad_grad, O1: ::std::convert::Into, O2: ::std::convert::Into>(orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { MaxPool3DGradGrad::new().build(orig_input, orig_output, grad, scope) } + /// Builder for the `MaxPoolGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPoolGrad { @@ -57440,6 +70153,12 @@ pub struct MaxPoolGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPoolGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPoolGradInst { + /// An instance of a fully built MaxPoolGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPoolGrad { /// Creates a new `MaxPoolGrad`. @@ -57448,46 +70167,31 @@ impl MaxPoolGrad { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `explicit_paddings` attribute. - pub fn explicit_paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn explicit_paddings>>(mut self, value: ArgType) -> Self { self.explicit_paddings = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -57505,27 +70209,10 @@ impl MaxPoolGrad { } /// Builds the `MaxPoolGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - orig_input: O0, - orig_output: O1, - grad: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(orig_input.into(), orig_output.into(), grad.into(), scope) } - - fn build_impl( - &self, - orig_input: crate::Output, - orig_output: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPoolGrad", |nd| { nd.add_input(orig_input); nd.add_input(orig_output); @@ -57533,42 +70220,82 @@ impl MaxPoolGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.explicit_paddings { - nd.set_attr_int_list("explicit_paddings", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPoolGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(orig_input.into(), orig_output.into(), grad.into(), scope) + } + fn build_instance_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPoolGrad", |nd| { + nd.add_input(orig_input); + nd.add_input(orig_output); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.explicit_paddings { + nd.set_attr_int_list("explicit_paddings", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPoolGradInst{op}) + } +} +impl MaxPoolGradInst { + /// Returns the 'output' output of this 'MaxPoolGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPoolGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPoolGrad::new().build(orig_input, orig_output, grad, scope)`. -pub fn max_pool_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - orig_input: O0, - orig_output: O1, - grad: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool_grad, O1: ::std::convert::Into, O2: ::std::convert::Into>(orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { MaxPoolGrad::new().build(orig_input, orig_output, grad, scope) } + /// Builder for the `MaxPoolGradGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPoolGradGrad { @@ -57579,6 +70306,12 @@ pub struct MaxPoolGradGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPoolGradGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPoolGradGradInst { + /// An instance of a fully built MaxPoolGradGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPoolGradGrad { /// Creates a new `MaxPoolGradGrad`. @@ -57587,37 +70320,25 @@ impl MaxPoolGradGrad { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -57635,27 +70356,10 @@ impl MaxPoolGradGrad { } /// Builds the `MaxPoolGradGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - orig_input: O0, - orig_output: O1, - grad: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(orig_input.into(), orig_output.into(), grad.into(), scope) } - - fn build_impl( - &self, - orig_input: crate::Output, - orig_output: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPoolGradGrad", |nd| { nd.add_input(orig_input); nd.add_input(orig_output); @@ -57663,39 +70367,76 @@ impl MaxPoolGradGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPoolGradGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(orig_input.into(), orig_output.into(), grad.into(), scope) + } + fn build_instance_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPoolGradGrad", |nd| { + nd.add_input(orig_input); + nd.add_input(orig_output); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPoolGradGradInst{op}) + } +} +impl MaxPoolGradGradInst { + /// Returns the 'output' output of this 'MaxPoolGradGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPoolGradGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPoolGradGrad::new().build(orig_input, orig_output, grad, scope)`. -pub fn max_pool_grad_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - orig_input: O0, - orig_output: O1, - grad: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool_grad_grad, O1: ::std::convert::Into, O2: ::std::convert::Into>(orig_input: O0, orig_output: O1, grad: O2, scope: &mut crate::Scope) -> crate::Result { MaxPoolGradGrad::new().build(orig_input, orig_output, grad, scope) } + /// Builder for the `MaxPoolGradGradV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPoolGradGradV2 { @@ -57704,6 +70445,12 @@ pub struct MaxPoolGradGradV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPoolGradGradV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPoolGradGradV2Inst { + /// An instance of a fully built MaxPoolGradGradV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPoolGradGradV2 { /// Creates a new `MaxPoolGradGradV2`. @@ -57712,19 +70459,13 @@ impl MaxPoolGradGradV2 { } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -57742,40 +70483,10 @@ impl MaxPoolGradGradV2 { } /// Builds the `MaxPoolGradGradV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - orig_input: O0, - orig_output: O1, - grad: O2, - ksize: O3, - strides: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - orig_input.into(), - orig_output.into(), - grad.into(), - ksize.into(), - strides.into(), - scope, - ) - } - - fn build_impl( - &self, - orig_input: crate::Output, - orig_output: crate::Output, - grad: crate::Output, - ksize: crate::Output, - strides: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, ksize: O3, strides: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(orig_input.into(), orig_output.into(), grad.into(), ksize.into(), strides.into(), scope) + } + fn build_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, ksize: crate::Output, strides: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPoolGradGradV2", |nd| { nd.add_input(orig_input); nd.add_input(orig_output); @@ -57785,37 +70496,66 @@ impl MaxPoolGradGradV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPoolGradGradV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, ksize: O3, strides: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(orig_input.into(), orig_output.into(), grad.into(), ksize.into(), strides.into(), scope) + } + fn build_instance_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, ksize: crate::Output, strides: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPoolGradGradV2", |nd| { + nd.add_input(orig_input); + nd.add_input(orig_output); + nd.add_input(grad); + nd.add_input(ksize); + nd.add_input(strides); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPoolGradGradV2Inst{op}) + } +} +impl MaxPoolGradGradV2Inst { + /// Returns the 'output' output of this 'MaxPoolGradGradV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPoolGradGradV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPoolGradGradV2::new().build(orig_input, orig_output, grad, ksize, strides, scope)`. -pub fn max_pool_grad_grad_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - orig_input: O0, - orig_output: O1, - grad: O2, - ksize: O3, - strides: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool_grad_grad_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(orig_input: O0, orig_output: O1, grad: O2, ksize: O3, strides: O4, scope: &mut crate::Scope) -> crate::Result { MaxPoolGradGradV2::new().build(orig_input, orig_output, grad, ksize, strides, scope) } + /// Builder for the `MaxPoolGradGradWithArgmax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPoolGradGradWithArgmax { @@ -57827,6 +70567,12 @@ pub struct MaxPoolGradGradWithArgmax { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPoolGradGradWithArgmax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPoolGradGradWithArgmaxInst { + /// An instance of a fully built MaxPoolGradGradWithArgmax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPoolGradGradWithArgmax { /// Creates a new `MaxPoolGradGradWithArgmax`. @@ -57835,46 +70581,31 @@ impl MaxPoolGradGradWithArgmax { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `include_batch_in_index` attribute. - pub fn include_batch_in_index>( - mut self, - value: ArgType, - ) -> Self { + pub fn include_batch_in_index>(mut self, value: ArgType) -> Self { self.include_batch_in_index = ::std::option::Option::Some(value.into()); self } /// Sets the `Targmax` attribute. - pub fn Targmax>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targmax>(mut self, value: ArgType) -> Self { self.Targmax = ::std::option::Option::Some(value.into()); self } @@ -57892,27 +70623,10 @@ impl MaxPoolGradGradWithArgmax { } /// Builds the `MaxPoolGradGradWithArgmax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - grad: O1, - argmax: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, grad: O1, argmax: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), grad.into(), argmax.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - grad: crate::Output, - argmax: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, grad: crate::Output, argmax: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPoolGradGradWithArgmax", |nd| { nd.add_input(input); nd.add_input(grad); @@ -57920,42 +70634,82 @@ impl MaxPoolGradGradWithArgmax { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.include_batch_in_index { - nd.set_attr_bool("include_batch_in_index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Targmax { - nd.set_attr_type("Targmax", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.include_batch_in_index { + nd.set_attr_bool("include_batch_in_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Targmax { + nd.set_attr_type("Targmax", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPoolGradGradWithArgmax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, grad: O1, argmax: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), grad.into(), argmax.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, grad: crate::Output, argmax: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPoolGradGradWithArgmax", |nd| { + nd.add_input(input); + nd.add_input(grad); + nd.add_input(argmax); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.include_batch_in_index { + nd.set_attr_bool("include_batch_in_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Targmax { + nd.set_attr_type("Targmax", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPoolGradGradWithArgmaxInst{op}) + } +} +impl MaxPoolGradGradWithArgmaxInst { + /// Returns the 'output' output of this 'MaxPoolGradGradWithArgmax' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPoolGradGradWithArgmaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPoolGradGradWithArgmax::new().build(input, grad, argmax, scope)`. -pub fn max_pool_grad_grad_with_argmax< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - grad: O1, - argmax: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool_grad_grad_with_argmax, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, grad: O1, argmax: O2, scope: &mut crate::Scope) -> crate::Result { MaxPoolGradGradWithArgmax::new().build(input, grad, argmax, scope) } + /// Builder for the `MaxPoolGradV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPoolGradV2 { @@ -57964,6 +70718,12 @@ pub struct MaxPoolGradV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPoolGradV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPoolGradV2Inst { + /// An instance of a fully built MaxPoolGradV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPoolGradV2 { /// Creates a new `MaxPoolGradV2`. @@ -57972,19 +70732,13 @@ impl MaxPoolGradV2 { } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -58002,40 +70756,10 @@ impl MaxPoolGradV2 { } /// Builds the `MaxPoolGradV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - orig_input: O0, - orig_output: O1, - grad: O2, - ksize: O3, - strides: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - orig_input.into(), - orig_output.into(), - grad.into(), - ksize.into(), - strides.into(), - scope, - ) - } - - fn build_impl( - &self, - orig_input: crate::Output, - orig_output: crate::Output, - grad: crate::Output, - ksize: crate::Output, - strides: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, ksize: O3, strides: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(orig_input.into(), orig_output.into(), grad.into(), ksize.into(), strides.into(), scope) + } + fn build_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, ksize: crate::Output, strides: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPoolGradV2", |nd| { nd.add_input(orig_input); nd.add_input(orig_output); @@ -58045,37 +70769,66 @@ impl MaxPoolGradV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPoolGradV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, orig_input: O0, orig_output: O1, grad: O2, ksize: O3, strides: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(orig_input.into(), orig_output.into(), grad.into(), ksize.into(), strides.into(), scope) + } + fn build_instance_impl(&self, orig_input: crate::Output, orig_output: crate::Output, grad: crate::Output, ksize: crate::Output, strides: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPoolGradV2", |nd| { + nd.add_input(orig_input); + nd.add_input(orig_output); + nd.add_input(grad); + nd.add_input(ksize); + nd.add_input(strides); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPoolGradV2Inst{op}) + } +} +impl MaxPoolGradV2Inst { + /// Returns the 'output' output of this 'MaxPoolGradV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPoolGradV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPoolGradV2::new().build(orig_input, orig_output, grad, ksize, strides, scope)`. -pub fn max_pool_grad_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - orig_input: O0, - orig_output: O1, - grad: O2, - ksize: O3, - strides: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool_grad_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(orig_input: O0, orig_output: O1, grad: O2, ksize: O3, strides: O4, scope: &mut crate::Scope) -> crate::Result { MaxPoolGradV2::new().build(orig_input, orig_output, grad, ksize, strides, scope) } + /// Builder for the `MaxPoolGradWithArgmax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPoolGradWithArgmax { @@ -58087,6 +70840,12 @@ pub struct MaxPoolGradWithArgmax { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPoolGradWithArgmax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPoolGradWithArgmaxInst { + /// An instance of a fully built MaxPoolGradWithArgmax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPoolGradWithArgmax { /// Creates a new `MaxPoolGradWithArgmax`. @@ -58095,46 +70854,31 @@ impl MaxPoolGradWithArgmax { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `include_batch_in_index` attribute. - pub fn include_batch_in_index>( - mut self, - value: ArgType, - ) -> Self { + pub fn include_batch_in_index>(mut self, value: ArgType) -> Self { self.include_batch_in_index = ::std::option::Option::Some(value.into()); self } /// Sets the `Targmax` attribute. - pub fn Targmax>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targmax>(mut self, value: ArgType) -> Self { self.Targmax = ::std::option::Option::Some(value.into()); self } @@ -58152,27 +70896,10 @@ impl MaxPoolGradWithArgmax { } /// Builds the `MaxPoolGradWithArgmax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - grad: O1, - argmax: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, grad: O1, argmax: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), grad.into(), argmax.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - grad: crate::Output, - argmax: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, grad: crate::Output, argmax: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPoolGradWithArgmax", |nd| { nd.add_input(input); nd.add_input(grad); @@ -58180,42 +70907,82 @@ impl MaxPoolGradWithArgmax { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.include_batch_in_index { - nd.set_attr_bool("include_batch_in_index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Targmax { - nd.set_attr_type("Targmax", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.include_batch_in_index { + nd.set_attr_bool("include_batch_in_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Targmax { + nd.set_attr_type("Targmax", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPoolGradWithArgmax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, grad: O1, argmax: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), grad.into(), argmax.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, grad: crate::Output, argmax: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPoolGradWithArgmax", |nd| { + nd.add_input(input); + nd.add_input(grad); + nd.add_input(argmax); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.include_batch_in_index { + nd.set_attr_bool("include_batch_in_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Targmax { + nd.set_attr_type("Targmax", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPoolGradWithArgmaxInst{op}) + } +} +impl MaxPoolGradWithArgmaxInst { + /// Returns the 'output' output of this 'MaxPoolGradWithArgmax' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPoolGradWithArgmaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPoolGradWithArgmax::new().build(input, grad, argmax, scope)`. -pub fn max_pool_grad_with_argmax< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - grad: O1, - argmax: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool_grad_with_argmax, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, grad: O1, argmax: O2, scope: &mut crate::Scope) -> crate::Result { MaxPoolGradWithArgmax::new().build(input, grad, argmax, scope) } + /// Builder for the `MaxPoolV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPoolV2 { @@ -58224,6 +70991,12 @@ pub struct MaxPoolV2 { data_format: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPoolV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPoolV2Inst { + /// An instance of a fully built MaxPoolV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPoolV2 { /// Creates a new `MaxPoolV2`. @@ -58238,19 +71011,13 @@ impl MaxPoolV2 { } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -58262,27 +71029,10 @@ impl MaxPoolV2 { } /// Builds the `MaxPoolV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - ksize: O1, - strides: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, ksize: O1, strides: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), ksize.into(), strides.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - ksize: crate::Output, - strides: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, ksize: crate::Output, strides: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPoolV2", |nd| { nd.add_input(input); nd.add_input(ksize); @@ -58290,33 +71040,64 @@ impl MaxPoolV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPoolV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, ksize: O1, strides: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), ksize.into(), strides.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, ksize: crate::Output, strides: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPoolV2", |nd| { + nd.add_input(input); + nd.add_input(ksize); + nd.add_input(strides); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPoolV2Inst{op}) + } +} +impl MaxPoolV2Inst { + /// Returns the 'output' output of this 'MaxPoolV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaxPoolV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPoolV2::new().build(input, ksize, strides, scope)`. -pub fn max_pool_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - ksize: O1, - strides: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, ksize: O1, strides: O2, scope: &mut crate::Scope) -> crate::Result { MaxPoolV2::new().build(input, ksize, strides, scope) } + /// Builder for the `MaxPoolWithArgmax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MaxPoolWithArgmax { @@ -58328,6 +71109,12 @@ pub struct MaxPoolWithArgmax { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MaxPoolWithArgmax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaxPoolWithArgmaxInst { + /// An instance of a fully built MaxPoolWithArgmax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MaxPoolWithArgmax { /// Creates a new `MaxPoolWithArgmax`. @@ -58336,46 +71123,31 @@ impl MaxPoolWithArgmax { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `Targmax` attribute. - pub fn Targmax>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targmax>(mut self, value: ArgType) -> Self { self.Targmax = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `include_batch_in_index` attribute. - pub fn include_batch_in_index>( - mut self, - value: ArgType, - ) -> Self { + pub fn include_batch_in_index>(mut self, value: ArgType) -> Self { self.include_batch_in_index = ::std::option::Option::Some(value.into()); self } @@ -58393,60 +71165,108 @@ impl MaxPoolWithArgmax { } /// Builds the `MaxPoolWithArgmax` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MaxPoolWithArgmax", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targmax { - nd.set_attr_type("Targmax", *value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.include_batch_in_index { - nd.set_attr_bool("include_batch_in_index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targmax { + nd.set_attr_type("Targmax", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.include_batch_in_index { + nd.set_attr_bool("include_batch_in_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MaxPoolWithArgmax` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MaxPoolWithArgmax", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targmax { + nd.set_attr_type("Targmax", *value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.include_batch_in_index { + nd.set_attr_bool("include_batch_in_index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaxPoolWithArgmaxInst{op}) + } +} +impl MaxPoolWithArgmaxInst { + /// Returns the 'output' output of this 'MaxPoolWithArgmax' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'argmax' output of this 'MaxPoolWithArgmax' operation. + pub fn argmax(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for MaxPoolWithArgmaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MaxPoolWithArgmax::new().build(input, scope)`. -pub fn max_pool_with_argmax>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn max_pool_with_argmax>(input: O0, scope: &mut crate::Scope) -> crate::Result { MaxPoolWithArgmax::new().build(input, scope) } + /// Builder for the `Maximum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Maximum { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Maximum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MaximumInst { + /// An instance of a fully built Maximum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Maximum { /// Creates a new `Maximum`. @@ -58467,46 +71287,61 @@ impl Maximum { } /// Builds the `Maximum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Maximum", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Maximum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Maximum", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MaximumInst{op}) + } +} +impl MaximumInst { + /// Returns the 'z' output of this 'Maximum' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MaximumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Maximum::new().build(x, y, scope)`. -pub fn maximum, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn maximum, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Maximum::new().build(x, y, scope) } + /// Builder for the `Mean` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Mean { @@ -58515,6 +71350,12 @@ pub struct Mean { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Mean' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MeanInst { + /// An instance of a fully built Mean Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Mean { /// Creates a new `Mean`. @@ -58547,52 +71388,73 @@ impl Mean { } /// Builds the `Mean` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), reduction_indices.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - reduction_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Mean", |nd| { nd.add_input(input); nd.add_input(reduction_indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Mean` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), reduction_indices.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Mean", |nd| { + nd.add_input(input); + nd.add_input(reduction_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MeanInst{op}) + } +} +impl MeanInst { + /// Returns the 'output' output of this 'Mean' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MeanInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Mean::new().build(input, reduction_indices, scope)`. -pub fn mean, O1: ::std::convert::Into>( - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mean, O1: ::std::convert::Into>(input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { Mean::new().build(input, reduction_indices, scope) } + /// Builder for the `Merge` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Merge { @@ -58600,6 +71462,12 @@ pub struct Merge { N: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Merge' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MergeInst { + /// An instance of a fully built Merge Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Merge { /// Creates a new `Merge`. @@ -58626,48 +71494,84 @@ impl Merge { } /// Builds the `Merge` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Merge", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Merge` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Merge", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MergeInst{op}) + } +} +impl MergeInst { + /// Returns the 'output' output of this 'Merge' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'value_index' output of this 'Merge' operation. + pub fn value_index(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for MergeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Merge::new().build(inputs, scope)`. -pub fn merge>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn merge>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { Merge::new().build(inputs, scope) } + /// Builder for the `MergeSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MergeSummary { N: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MergeSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MergeSummaryInst { + /// An instance of a fully built MergeSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MergeSummary { /// Creates a new `MergeSummary`. @@ -58688,45 +71592,71 @@ impl MergeSummary { } /// Builds the `MergeSummary` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MergeSummary", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MergeSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MergeSummary", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MergeSummaryInst{op}) + } +} +impl MergeSummaryInst { + /// Returns the 'summary' output of this 'MergeSummary' operation. + pub fn summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MergeSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MergeSummary::new().build(inputs, scope)`. -pub fn merge_summary>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn merge_summary>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { MergeSummary::new().build(inputs, scope) } + /// Builder for the `MergeV2Checkpoints` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MergeV2Checkpoints { delete_old_dirs: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MergeV2Checkpoints' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MergeV2CheckpointsInst { + /// An instance of a fully built MergeV2Checkpoints Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MergeV2Checkpoints { /// Creates a new `MergeV2Checkpoints`. @@ -58747,49 +71677,54 @@ impl MergeV2Checkpoints { } /// Builds the `MergeV2Checkpoints` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - checkpoint_prefixes: O0, - destination_prefix: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, checkpoint_prefixes: O0, destination_prefix: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(checkpoint_prefixes.into(), destination_prefix.into(), scope) } - - fn build_impl( - &self, - checkpoint_prefixes: crate::Output, - destination_prefix: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, checkpoint_prefixes: crate::Output, destination_prefix: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MergeV2Checkpoints", |nd| { nd.add_input(checkpoint_prefixes); nd.add_input(destination_prefix); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.delete_old_dirs { - nd.set_attr_bool("delete_old_dirs", *value)?; - } + if let ::std::option::Option::Some(value) = &self.delete_old_dirs { + nd.set_attr_bool("delete_old_dirs", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MergeV2Checkpoints` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, checkpoint_prefixes: O0, destination_prefix: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(checkpoint_prefixes.into(), destination_prefix.into(), scope) + } + fn build_instance_impl(&self, checkpoint_prefixes: crate::Output, destination_prefix: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MergeV2Checkpoints", |nd| { + nd.add_input(checkpoint_prefixes); + nd.add_input(destination_prefix); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.delete_old_dirs { + nd.set_attr_bool("delete_old_dirs", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MergeV2CheckpointsInst{op}) + } +} +impl MergeV2CheckpointsInst { +} +impl Into for MergeV2CheckpointsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MergeV2Checkpoints::new().build(checkpoint_prefixes, destination_prefix, scope)`. -pub fn merge_v2_checkpoints< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - checkpoint_prefixes: O0, - destination_prefix: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn merge_v2_checkpoints, O1: ::std::convert::Into>(checkpoint_prefixes: O0, destination_prefix: O1, scope: &mut crate::Scope) -> crate::Result { MergeV2Checkpoints::new().build(checkpoint_prefixes, destination_prefix, scope) } + /// Builder for the `Mfcc` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Mfcc { @@ -58799,6 +71734,12 @@ pub struct Mfcc { dct_coefficient_count: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Mfcc' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MfccInst { + /// An instance of a fully built Mfcc Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Mfcc { /// Creates a new `Mfcc`. @@ -58807,37 +71748,25 @@ impl Mfcc { } /// Sets the `upper_frequency_limit` attribute. - pub fn upper_frequency_limit>( - mut self, - value: ArgType, - ) -> Self { + pub fn upper_frequency_limit>(mut self, value: ArgType) -> Self { self.upper_frequency_limit = ::std::option::Option::Some(value.into()); self } /// Sets the `lower_frequency_limit` attribute. - pub fn lower_frequency_limit>( - mut self, - value: ArgType, - ) -> Self { + pub fn lower_frequency_limit>(mut self, value: ArgType) -> Self { self.lower_frequency_limit = ::std::option::Option::Some(value.into()); self } /// Sets the `filterbank_channel_count` attribute. - pub fn filterbank_channel_count>( - mut self, - value: ArgType, - ) -> Self { + pub fn filterbank_channel_count>(mut self, value: ArgType) -> Self { self.filterbank_channel_count = ::std::option::Option::Some(value.into()); self } /// Sets the `dct_coefficient_count` attribute. - pub fn dct_coefficient_count>( - mut self, - value: ArgType, - ) -> Self { + pub fn dct_coefficient_count>(mut self, value: ArgType) -> Self { self.dct_coefficient_count = ::std::option::Option::Some(value.into()); self } @@ -58849,55 +71778,79 @@ impl Mfcc { } /// Builds the `Mfcc` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - spectrogram: O0, - sample_rate: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, spectrogram: O0, sample_rate: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(spectrogram.into(), sample_rate.into(), scope) } - - fn build_impl( - &self, - spectrogram: crate::Output, - sample_rate: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, spectrogram: crate::Output, sample_rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Mfcc", |nd| { nd.add_input(spectrogram); nd.add_input(sample_rate); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.upper_frequency_limit { - nd.set_attr_float("upper_frequency_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.lower_frequency_limit { - nd.set_attr_float("lower_frequency_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.filterbank_channel_count { - nd.set_attr_int("filterbank_channel_count", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dct_coefficient_count { - nd.set_attr_int("dct_coefficient_count", *value)?; - } + if let ::std::option::Option::Some(value) = &self.upper_frequency_limit { + nd.set_attr_float("upper_frequency_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.lower_frequency_limit { + nd.set_attr_float("lower_frequency_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.filterbank_channel_count { + nd.set_attr_int("filterbank_channel_count", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dct_coefficient_count { + nd.set_attr_int("dct_coefficient_count", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Mfcc` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, spectrogram: O0, sample_rate: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(spectrogram.into(), sample_rate.into(), scope) + } + fn build_instance_impl(&self, spectrogram: crate::Output, sample_rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Mfcc", |nd| { + nd.add_input(spectrogram); + nd.add_input(sample_rate); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.upper_frequency_limit { + nd.set_attr_float("upper_frequency_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.lower_frequency_limit { + nd.set_attr_float("lower_frequency_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.filterbank_channel_count { + nd.set_attr_int("filterbank_channel_count", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dct_coefficient_count { + nd.set_attr_int("dct_coefficient_count", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MfccInst{op}) + } +} +impl MfccInst { + /// Returns the 'output' output of this 'Mfcc' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MfccInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Mfcc::new().build(spectrogram, sample_rate, scope)`. -pub fn mfcc, O1: ::std::convert::Into>( - spectrogram: O0, - sample_rate: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mfcc, O1: ::std::convert::Into>(spectrogram: O0, sample_rate: O1, scope: &mut crate::Scope) -> crate::Result { Mfcc::new().build(spectrogram, sample_rate, scope) } + /// Builder for the `Min` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Min { @@ -58906,6 +71859,12 @@ pub struct Min { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Min' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MinInst { + /// An instance of a fully built Min Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Min { /// Creates a new `Min`. @@ -58938,58 +71897,85 @@ impl Min { } /// Builds the `Min` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), reduction_indices.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - reduction_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Min", |nd| { nd.add_input(input); nd.add_input(reduction_indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Min` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), reduction_indices.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Min", |nd| { + nd.add_input(input); + nd.add_input(reduction_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MinInst{op}) + } +} +impl MinInst { + /// Returns the 'output' output of this 'Min' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Min::new().build(input, reduction_indices, scope)`. -pub fn min, O1: ::std::convert::Into>( - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn min, O1: ::std::convert::Into>(input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { Min::new().build(input, reduction_indices, scope) } + /// Builder for the `Minimum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Minimum { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Minimum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MinimumInst { + /// An instance of a fully built Minimum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Minimum { /// Creates a new `Minimum`. @@ -59010,46 +71996,61 @@ impl Minimum { } /// Builds the `Minimum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Minimum", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Minimum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Minimum", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MinimumInst{op}) + } +} +impl MinimumInst { + /// Returns the 'z' output of this 'Minimum' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MinimumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Minimum::new().build(x, y, scope)`. -pub fn minimum, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn minimum, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Minimum::new().build(x, y, scope) } + /// Builder for the `MirrorPad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MirrorPad { @@ -59058,6 +72059,12 @@ pub struct MirrorPad { mode: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MirrorPad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MirrorPadInst { + /// An instance of a fully built MirrorPad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MirrorPad { /// Creates a new `MirrorPad`. @@ -59072,19 +72079,13 @@ impl MirrorPad { } /// Sets the `Tpaddings` attribute. - pub fn Tpaddings>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tpaddings>(mut self, value: ArgType) -> Self { self.Tpaddings = ::std::option::Option::Some(value.into()); self } /// Sets the `mode` attribute. - pub fn mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn mode>(mut self, value: ArgType) -> Self { self.mode = ::std::option::Option::Some(value.into()); self } @@ -59096,55 +72097,73 @@ impl MirrorPad { } /// Builds the `MirrorPad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - paddings: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), paddings.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - paddings: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, paddings: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MirrorPad", |nd| { nd.add_input(input); nd.add_input(paddings); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tpaddings { - nd.set_attr_type("Tpaddings", *value)?; - } - if let ::std::option::Option::Some(value) = &self.mode { - nd.set_attr_string("mode", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MirrorPad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), paddings.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, paddings: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MirrorPad", |nd| { + nd.add_input(input); + nd.add_input(paddings); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MirrorPadInst{op}) + } +} +impl MirrorPadInst { + /// Returns the 'output' output of this 'MirrorPad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MirrorPadInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MirrorPad::new().build(input, paddings, scope)`. -pub fn mirror_pad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - paddings: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mirror_pad, O1: ::std::convert::Into>(input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { MirrorPad::new().build(input, paddings, scope) } + /// Builder for the `MirrorPadGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MirrorPadGrad { @@ -59153,6 +72172,12 @@ pub struct MirrorPadGrad { mode: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MirrorPadGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MirrorPadGradInst { + /// An instance of a fully built MirrorPadGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MirrorPadGrad { /// Creates a new `MirrorPadGrad`. @@ -59167,19 +72192,13 @@ impl MirrorPadGrad { } /// Sets the `Tpaddings` attribute. - pub fn Tpaddings>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tpaddings>(mut self, value: ArgType) -> Self { self.Tpaddings = ::std::option::Option::Some(value.into()); self } /// Sets the `mode` attribute. - pub fn mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn mode>(mut self, value: ArgType) -> Self { self.mode = ::std::option::Option::Some(value.into()); self } @@ -59191,55 +72210,73 @@ impl MirrorPadGrad { } /// Builds the `MirrorPadGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - paddings: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), paddings.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - paddings: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, paddings: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MirrorPadGrad", |nd| { nd.add_input(input); nd.add_input(paddings); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tpaddings { - nd.set_attr_type("Tpaddings", *value)?; - } - if let ::std::option::Option::Some(value) = &self.mode { - nd.set_attr_string("mode", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MirrorPadGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), paddings.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, paddings: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MirrorPadGrad", |nd| { + nd.add_input(input); + nd.add_input(paddings); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MirrorPadGradInst{op}) + } +} +impl MirrorPadGradInst { + /// Returns the 'output' output of this 'MirrorPadGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MirrorPadGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MirrorPadGrad::new().build(input, paddings, scope)`. -pub fn mirror_pad_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - paddings: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mirror_pad_grad, O1: ::std::convert::Into>(input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { MirrorPadGrad::new().build(input, paddings, scope) } + /// Builder for the `MlirPassthroughOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MlirPassthroughOp { @@ -59248,6 +72285,12 @@ pub struct MlirPassthroughOp { Toutputs: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MlirPassthroughOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MlirPassthroughOpInst { + /// An instance of a fully built MlirPassthroughOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MlirPassthroughOp { /// Creates a new `MlirPassthroughOp`. @@ -59256,28 +72299,19 @@ impl MlirPassthroughOp { } /// Sets the `mlir_module` attribute. - pub fn mlir_module>( - mut self, - value: ArgType, - ) -> Self { + pub fn mlir_module>(mut self, value: ArgType) -> Self { self.mlir_module = ::std::option::Option::Some(value.into()); self } /// Sets the `Tinputs` attribute. - pub fn Tinputs>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinputs>>(mut self, value: ArgType) -> Self { self.Tinputs = ::std::option::Option::Some(value.into()); self } /// Sets the `Toutputs` attribute. - pub fn Toutputs>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutputs>>(mut self, value: ArgType) -> Self { self.Toutputs = ::std::option::Option::Some(value.into()); self } @@ -59289,51 +72323,83 @@ impl MlirPassthroughOp { } /// Builds the `MlirPassthroughOp` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MlirPassthroughOp", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.mlir_module { - nd.set_attr_string("mlir_module", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tinputs { - nd.set_attr_type_list("Tinputs", value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutputs { - nd.set_attr_type_list("Toutputs", value)?; - } + if let ::std::option::Option::Some(value) = &self.mlir_module { + nd.set_attr_string("mlir_module", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinputs { + nd.set_attr_type_list("Tinputs", value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutputs { + nd.set_attr_type_list("Toutputs", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MlirPassthroughOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MlirPassthroughOp", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.mlir_module { + nd.set_attr_string("mlir_module", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinputs { + nd.set_attr_type_list("Tinputs", value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutputs { + nd.set_attr_type_list("Toutputs", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MlirPassthroughOpInst{op}) + } +} +impl MlirPassthroughOpInst { + /// Returns the 'outputs' output of this 'MlirPassthroughOp' operation. + pub fn outputs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MlirPassthroughOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MlirPassthroughOp::new().build(inputs, scope)`. -pub fn mlir_passthrough_op>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mlir_passthrough_op>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { MlirPassthroughOp::new().build(inputs, scope) } + /// Builder for the `Mod` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Mod { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Mod' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ModInst { + /// An instance of a fully built Mod Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Mod { /// Creates a new `Mod`. @@ -59354,46 +72420,61 @@ impl Mod { } /// Builds the `Mod` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Mod", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Mod` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Mod", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ModInst{op}) + } +} +impl ModInst { + /// Returns the 'z' output of this 'Mod' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ModInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Mod::new().build(x, y, scope)`. -pub fn mod_, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mod_, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Mod::new().build(x, y, scope) } + /// Builder for the `ModelDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ModelDataset { @@ -59404,6 +72485,12 @@ pub struct ModelDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ModelDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ModelDatasetInst { + /// An instance of a fully built ModelDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ModelDataset { /// Creates a new `ModelDataset`. @@ -59430,19 +72517,13 @@ impl ModelDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -59454,57 +72535,95 @@ impl ModelDataset { } /// Builds the `ModelDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ModelDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.algorithm { - nd.set_attr_int("algorithm", *value)?; - } - if let ::std::option::Option::Some(value) = &self.cpu_budget { - nd.set_attr_int("cpu_budget", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ram_budget { - nd.set_attr_int("ram_budget", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.algorithm { + nd.set_attr_int("algorithm", *value)?; + } + if let ::std::option::Option::Some(value) = &self.cpu_budget { + nd.set_attr_int("cpu_budget", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ram_budget { + nd.set_attr_int("ram_budget", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ModelDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ModelDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.algorithm { + nd.set_attr_int("algorithm", *value)?; + } + if let ::std::option::Option::Some(value) = &self.cpu_budget { + nd.set_attr_int("cpu_budget", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ram_budget { + nd.set_attr_int("ram_budget", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ModelDatasetInst{op}) + } +} +impl ModelDatasetInst { + /// Returns the 'handle' output of this 'ModelDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ModelDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ModelDataset::new().build(input_dataset, scope)`. -pub fn model_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn model_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { ModelDataset::new().build(input_dataset, scope) } + /// Builder for the `Mul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Mul { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Mul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MulInst { + /// An instance of a fully built Mul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Mul { /// Creates a new `Mul`. @@ -59525,52 +72644,73 @@ impl Mul { } /// Builds the `Mul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Mul", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Mul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Mul", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MulInst{op}) + } +} +impl MulInst { + /// Returns the 'z' output of this 'Mul' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Mul::new().build(x, y, scope)`. -pub fn mul, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mul, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Mul::new().build(x, y, scope) } + /// Builder for the `MulNoNan` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MulNoNan { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MulNoNan' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MulNoNanInst { + /// An instance of a fully built MulNoNan Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MulNoNan { /// Creates a new `MulNoNan`. @@ -59591,49 +72731,61 @@ impl MulNoNan { } /// Builds the `MulNoNan` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MulNoNan", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MulNoNan` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MulNoNan", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MulNoNanInst{op}) + } +} +impl MulNoNanInst { + /// Returns the 'z' output of this 'MulNoNan' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MulNoNanInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MulNoNan::new().build(x, y, scope)`. -pub fn mul_no_nan< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mul_no_nan, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { MulNoNan::new().build(x, y, scope) } + /// Builder for the `MultiDeviceIterator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MultiDeviceIterator { @@ -59644,6 +72796,12 @@ pub struct MultiDeviceIterator { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MultiDeviceIterator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MultiDeviceIteratorInst { + /// An instance of a fully built MultiDeviceIterator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MultiDeviceIterator { /// Creates a new `MultiDeviceIterator`. @@ -59652,46 +72810,31 @@ impl MultiDeviceIterator { } /// Sets the `devices` attribute. - pub fn devices>>( - mut self, - value: ArgType, - ) -> Self { + pub fn devices>>(mut self, value: ArgType) -> Self { self.devices = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -59703,39 +72846,81 @@ impl MultiDeviceIterator { } /// Builds the `MultiDeviceIterator` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MultiDeviceIterator", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.devices { - nd.set_attr_string_list("devices", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.devices { + nd.set_attr_string_list("devices", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MultiDeviceIterator` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MultiDeviceIterator", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.devices { + nd.set_attr_string_list("devices", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MultiDeviceIteratorInst{op}) + } +} +impl MultiDeviceIteratorInst { + /// Returns the 'handle' output of this 'MultiDeviceIterator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MultiDeviceIteratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MultiDeviceIterator::new().build(scope)`. -pub fn multi_device_iterator(scope: &mut crate::Scope) -> crate::Result { +pub fn multi_device_iterator<>(scope: &mut crate::Scope) -> crate::Result { MultiDeviceIterator::new().build(scope) } + /// Builder for the `MultiDeviceIteratorFromStringHandle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MultiDeviceIteratorFromStringHandle { @@ -59743,6 +72928,12 @@ pub struct MultiDeviceIteratorFromStringHandle { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MultiDeviceIteratorFromStringHandle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MultiDeviceIteratorFromStringHandleInst { + /// An instance of a fully built MultiDeviceIteratorFromStringHandle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MultiDeviceIteratorFromStringHandle { /// Creates a new `MultiDeviceIteratorFromStringHandle`. @@ -59751,19 +72942,13 @@ impl MultiDeviceIteratorFromStringHandle { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -59775,42 +72960,65 @@ impl MultiDeviceIteratorFromStringHandle { } /// Builds the `MultiDeviceIteratorFromStringHandle` operation. - pub fn build>( - &self, - string_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, string_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(string_handle.into(), scope) } - - fn build_impl( - &self, - string_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, string_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MultiDeviceIteratorFromStringHandle", |nd| { nd.add_input(string_handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MultiDeviceIteratorFromStringHandle` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, string_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(string_handle.into(), scope) + } + fn build_instance_impl(&self, string_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MultiDeviceIteratorFromStringHandle", |nd| { + nd.add_input(string_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MultiDeviceIteratorFromStringHandleInst{op}) + } +} +impl MultiDeviceIteratorFromStringHandleInst { + /// Returns the 'multi_device_iterator' output of this 'MultiDeviceIteratorFromStringHandle' operation. + pub fn multi_device_iterator(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MultiDeviceIteratorFromStringHandleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MultiDeviceIteratorFromStringHandle::new().build(string_handle, scope)`. -pub fn multi_device_iterator_from_string_handle>( - string_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn multi_device_iterator_from_string_handle>(string_handle: O0, scope: &mut crate::Scope) -> crate::Result { MultiDeviceIteratorFromStringHandle::new().build(string_handle, scope) } + /// Builder for the `MultiDeviceIteratorGetNextFromShard` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MultiDeviceIteratorGetNextFromShard { @@ -59818,6 +73026,12 @@ pub struct MultiDeviceIteratorGetNextFromShard { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MultiDeviceIteratorGetNextFromShard' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MultiDeviceIteratorGetNextFromShardInst { + /// An instance of a fully built MultiDeviceIteratorGetNextFromShard Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MultiDeviceIteratorGetNextFromShard { /// Creates a new `MultiDeviceIteratorGetNextFromShard`. @@ -59826,19 +73040,13 @@ impl MultiDeviceIteratorGetNextFromShard { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -59850,32 +73058,10 @@ impl MultiDeviceIteratorGetNextFromShard { } /// Builds the `MultiDeviceIteratorGetNextFromShard` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - multi_device_iterator: O0, - shard_num: O1, - incarnation_id: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - multi_device_iterator.into(), - shard_num.into(), - incarnation_id.into(), - scope, - ) - } - - fn build_impl( - &self, - multi_device_iterator: crate::Output, - shard_num: crate::Output, - incarnation_id: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, multi_device_iterator: O0, shard_num: O1, incarnation_id: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(multi_device_iterator.into(), shard_num.into(), incarnation_id.into(), scope) + } + fn build_impl(&self, multi_device_iterator: crate::Output, shard_num: crate::Output, incarnation_id: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MultiDeviceIteratorGetNextFromShard", |nd| { nd.add_input(multi_device_iterator); nd.add_input(shard_num); @@ -59883,40 +73069,69 @@ impl MultiDeviceIteratorGetNextFromShard { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MultiDeviceIteratorGetNextFromShard` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, multi_device_iterator: O0, shard_num: O1, incarnation_id: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(multi_device_iterator.into(), shard_num.into(), incarnation_id.into(), scope) + } + fn build_instance_impl(&self, multi_device_iterator: crate::Output, shard_num: crate::Output, incarnation_id: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MultiDeviceIteratorGetNextFromShard", |nd| { + nd.add_input(multi_device_iterator); + nd.add_input(shard_num); + nd.add_input(incarnation_id); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MultiDeviceIteratorGetNextFromShardInst{op}) + } +} +impl MultiDeviceIteratorGetNextFromShardInst { + /// Returns the 'components' output of this 'MultiDeviceIteratorGetNextFromShard' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MultiDeviceIteratorGetNextFromShardInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MultiDeviceIteratorGetNextFromShard::new().build(multi_device_iterator, shard_num, incarnation_id, scope)`. -pub fn multi_device_iterator_get_next_from_shard< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - multi_device_iterator: O0, - shard_num: O1, - incarnation_id: O2, - scope: &mut crate::Scope, -) -> crate::Result { - MultiDeviceIteratorGetNextFromShard::new().build( - multi_device_iterator, - shard_num, - incarnation_id, - scope, - ) +pub fn multi_device_iterator_get_next_from_shard, O1: ::std::convert::Into, O2: ::std::convert::Into>(multi_device_iterator: O0, shard_num: O1, incarnation_id: O2, scope: &mut crate::Scope) -> crate::Result { + MultiDeviceIteratorGetNextFromShard::new().build(multi_device_iterator, shard_num, incarnation_id, scope) } + /// Builder for the `MultiDeviceIteratorInit` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MultiDeviceIteratorInit { control_inputs: ::std::vec::Vec, } +/// An instance of 'MultiDeviceIteratorInit' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MultiDeviceIteratorInitInst { + /// An instance of a fully built MultiDeviceIteratorInit Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MultiDeviceIteratorInit { /// Creates a new `MultiDeviceIteratorInit`. @@ -59931,32 +73146,10 @@ impl MultiDeviceIteratorInit { } /// Builds the `MultiDeviceIteratorInit` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - dataset: O0, - multi_device_iterator: O1, - max_buffer_size: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - dataset.into(), - multi_device_iterator.into(), - max_buffer_size.into(), - scope, - ) - } - - fn build_impl( - &self, - dataset: crate::Output, - multi_device_iterator: crate::Output, - max_buffer_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, dataset: O0, multi_device_iterator: O1, max_buffer_size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(dataset.into(), multi_device_iterator.into(), max_buffer_size.into(), scope) + } + fn build_impl(&self, dataset: crate::Output, multi_device_iterator: crate::Output, max_buffer_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MultiDeviceIteratorInit", |nd| { nd.add_input(dataset); nd.add_input(multi_device_iterator); @@ -59967,26 +73160,54 @@ impl MultiDeviceIteratorInit { ::std::result::Result::Ok(()) }) } -} + /// Builds the `MultiDeviceIteratorInit` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, dataset: O0, multi_device_iterator: O1, max_buffer_size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dataset.into(), multi_device_iterator.into(), max_buffer_size.into(), scope) + } + fn build_instance_impl(&self, dataset: crate::Output, multi_device_iterator: crate::Output, max_buffer_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MultiDeviceIteratorInit", |nd| { + nd.add_input(dataset); + nd.add_input(multi_device_iterator); + nd.add_input(max_buffer_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(MultiDeviceIteratorInitInst{op}) + } +} +impl MultiDeviceIteratorInitInst { + /// Returns the 'incarnation_id' output of this 'MultiDeviceIteratorInit' operation. + pub fn incarnation_id(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MultiDeviceIteratorInitInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MultiDeviceIteratorInit::new().build(dataset, multi_device_iterator, max_buffer_size, scope)`. -pub fn multi_device_iterator_init< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - dataset: O0, - multi_device_iterator: O1, - max_buffer_size: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn multi_device_iterator_init, O1: ::std::convert::Into, O2: ::std::convert::Into>(dataset: O0, multi_device_iterator: O1, max_buffer_size: O2, scope: &mut crate::Scope) -> crate::Result { MultiDeviceIteratorInit::new().build(dataset, multi_device_iterator, max_buffer_size, scope) } + /// Builder for the `MultiDeviceIteratorToStringHandle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MultiDeviceIteratorToStringHandle { control_inputs: ::std::vec::Vec, } +/// An instance of 'MultiDeviceIteratorToStringHandle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MultiDeviceIteratorToStringHandleInst { + /// An instance of a fully built MultiDeviceIteratorToStringHandle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MultiDeviceIteratorToStringHandle { /// Creates a new `MultiDeviceIteratorToStringHandle`. @@ -60001,19 +73222,10 @@ impl MultiDeviceIteratorToStringHandle { } /// Builds the `MultiDeviceIteratorToStringHandle` operation. - pub fn build>( - &self, - multi_device_iterator: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, multi_device_iterator: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(multi_device_iterator.into(), scope) } - - fn build_impl( - &self, - multi_device_iterator: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, multi_device_iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MultiDeviceIteratorToStringHandle", |nd| { nd.add_input(multi_device_iterator); for op in &self.control_inputs { @@ -60022,15 +73234,41 @@ impl MultiDeviceIteratorToStringHandle { ::std::result::Result::Ok(()) }) } -} + /// Builds the `MultiDeviceIteratorToStringHandle` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, multi_device_iterator: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(multi_device_iterator.into(), scope) + } + fn build_instance_impl(&self, multi_device_iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MultiDeviceIteratorToStringHandle", |nd| { + nd.add_input(multi_device_iterator); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(MultiDeviceIteratorToStringHandleInst{op}) + } +} +impl MultiDeviceIteratorToStringHandleInst { + /// Returns the 'string_handle' output of this 'MultiDeviceIteratorToStringHandle' operation. + pub fn string_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MultiDeviceIteratorToStringHandleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MultiDeviceIteratorToStringHandle::new().build(multi_device_iterator, scope)`. -pub fn multi_device_iterator_to_string_handle>( - multi_device_iterator: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn multi_device_iterator_to_string_handle>(multi_device_iterator: O0, scope: &mut crate::Scope) -> crate::Result { MultiDeviceIteratorToStringHandle::new().build(multi_device_iterator, scope) } + /// Builder for the `Multinomial` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Multinomial { @@ -60040,6 +73278,12 @@ pub struct Multinomial { output_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Multinomial' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MultinomialInst { + /// An instance of a fully built Multinomial Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Multinomial { /// Creates a new `Multinomial`. @@ -60066,10 +73310,7 @@ impl Multinomial { } /// Sets the `output_dtype` attribute. - pub fn output_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_dtype>(mut self, value: ArgType) -> Self { self.output_dtype = ::std::option::Option::Some(value.into()); self } @@ -60081,58 +73322,79 @@ impl Multinomial { } /// Builds the `Multinomial` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - logits: O0, - num_samples: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, logits: O0, num_samples: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(logits.into(), num_samples.into(), scope) } - - fn build_impl( - &self, - logits: crate::Output, - num_samples: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, logits: crate::Output, num_samples: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Multinomial", |nd| { nd.add_input(logits); nd.add_input(num_samples); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_dtype { - nd.set_attr_type("output_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_dtype { + nd.set_attr_type("output_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Multinomial` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, logits: O0, num_samples: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(logits.into(), num_samples.into(), scope) + } + fn build_instance_impl(&self, logits: crate::Output, num_samples: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Multinomial", |nd| { + nd.add_input(logits); + nd.add_input(num_samples); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_dtype { + nd.set_attr_type("output_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MultinomialInst{op}) + } +} +impl MultinomialInst { + /// Returns the 'output' output of this 'Multinomial' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MultinomialInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Multinomial::new().build(logits, num_samples, scope)`. -pub fn multinomial< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - logits: O0, - num_samples: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn multinomial, O1: ::std::convert::Into>(logits: O0, num_samples: O1, scope: &mut crate::Scope) -> crate::Result { Multinomial::new().build(logits, num_samples, scope) } + /// Builder for the `MutableDenseHashTable` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MutableDenseHashTable { @@ -60146,6 +73408,12 @@ pub struct MutableDenseHashTable { max_load_factor: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MutableDenseHashTable' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MutableDenseHashTableInst { + /// An instance of a fully built MutableDenseHashTable Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MutableDenseHashTable { /// Creates a new `MutableDenseHashTable`. @@ -60154,64 +73422,43 @@ impl MutableDenseHashTable { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `use_node_name_sharing` attribute. - pub fn use_node_name_sharing>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_node_name_sharing>(mut self, value: ArgType) -> Self { self.use_node_name_sharing = ::std::option::Option::Some(value.into()); self } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_shape` attribute. - pub fn value_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_shape>(mut self, value: ArgType) -> Self { self.value_shape = ::std::option::Option::Some(value.into()); self } /// Sets the `initial_num_buckets` attribute. - pub fn initial_num_buckets>( - mut self, - value: ArgType, - ) -> Self { + pub fn initial_num_buckets>(mut self, value: ArgType) -> Self { self.initial_num_buckets = ::std::option::Option::Some(value.into()); self } @@ -60229,60 +73476,101 @@ impl MutableDenseHashTable { } /// Builds the `MutableDenseHashTable` operation. - pub fn build>( - &self, - empty_key: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, empty_key: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(empty_key.into(), scope) } - - fn build_impl( - &self, - empty_key: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, empty_key: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MutableDenseHashTable", |nd| { nd.add_input(empty_key); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { - nd.set_attr_bool("use_node_name_sharing", *value)?; - } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_shape { - nd.set_attr_shape("value_shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.initial_num_buckets { - nd.set_attr_int("initial_num_buckets", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_load_factor { - nd.set_attr_float("max_load_factor", *value)?; + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.initial_num_buckets { + nd.set_attr_int("initial_num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_load_factor { + nd.set_attr_float("max_load_factor", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `MutableDenseHashTable` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, empty_key: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(empty_key.into(), scope) + } + fn build_instance_impl(&self, empty_key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MutableDenseHashTable", |nd| { + nd.add_input(empty_key); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.initial_num_buckets { + nd.set_attr_int("initial_num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_load_factor { + nd.set_attr_float("max_load_factor", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MutableDenseHashTableInst{op}) + } +} +impl MutableDenseHashTableInst { + /// Returns the 'table_handle' output of this 'MutableDenseHashTable' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MutableDenseHashTableInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `MutableDenseHashTable::new().build(empty_key, scope)`. -pub fn mutable_dense_hash_table>( - empty_key: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mutable_dense_hash_table>(empty_key: O0, scope: &mut crate::Scope) -> crate::Result { MutableDenseHashTable::new().build(empty_key, scope) } + /// Builder for the `MutableDenseHashTableV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MutableDenseHashTableV2 { @@ -60296,6 +73584,12 @@ pub struct MutableDenseHashTableV2 { max_load_factor: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MutableDenseHashTableV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MutableDenseHashTableV2Inst { + /// An instance of a fully built MutableDenseHashTableV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MutableDenseHashTableV2 { /// Creates a new `MutableDenseHashTableV2`. @@ -60304,64 +73598,43 @@ impl MutableDenseHashTableV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `use_node_name_sharing` attribute. - pub fn use_node_name_sharing>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_node_name_sharing>(mut self, value: ArgType) -> Self { self.use_node_name_sharing = ::std::option::Option::Some(value.into()); self } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_shape` attribute. - pub fn value_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_shape>(mut self, value: ArgType) -> Self { self.value_shape = ::std::option::Option::Some(value.into()); self } /// Sets the `initial_num_buckets` attribute. - pub fn initial_num_buckets>( - mut self, - value: ArgType, - ) -> Self { + pub fn initial_num_buckets>(mut self, value: ArgType) -> Self { self.initial_num_buckets = ::std::option::Option::Some(value.into()); self } @@ -60379,70 +73652,103 @@ impl MutableDenseHashTableV2 { } /// Builds the `MutableDenseHashTableV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - empty_key: O0, - deleted_key: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, empty_key: O0, deleted_key: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(empty_key.into(), deleted_key.into(), scope) } - - fn build_impl( - &self, - empty_key: crate::Output, - deleted_key: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, empty_key: crate::Output, deleted_key: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MutableDenseHashTableV2", |nd| { nd.add_input(empty_key); nd.add_input(deleted_key); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { - nd.set_attr_bool("use_node_name_sharing", *value)?; - } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_shape { - nd.set_attr_shape("value_shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.initial_num_buckets { - nd.set_attr_int("initial_num_buckets", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_load_factor { - nd.set_attr_float("max_load_factor", *value)?; + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.initial_num_buckets { + nd.set_attr_int("initial_num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_load_factor { + nd.set_attr_float("max_load_factor", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `MutableDenseHashTableV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, empty_key: O0, deleted_key: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(empty_key.into(), deleted_key.into(), scope) + } + fn build_instance_impl(&self, empty_key: crate::Output, deleted_key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MutableDenseHashTableV2", |nd| { + nd.add_input(empty_key); + nd.add_input(deleted_key); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.initial_num_buckets { + nd.set_attr_int("initial_num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_load_factor { + nd.set_attr_float("max_load_factor", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MutableDenseHashTableV2Inst{op}) + } +} +impl MutableDenseHashTableV2Inst { + /// Returns the 'table_handle' output of this 'MutableDenseHashTableV2' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MutableDenseHashTableV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `MutableDenseHashTableV2::new().build(empty_key, deleted_key, scope)`. -pub fn mutable_dense_hash_table_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - empty_key: O0, - deleted_key: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mutable_dense_hash_table_v2, O1: ::std::convert::Into>(empty_key: O0, deleted_key: O1, scope: &mut crate::Scope) -> crate::Result { MutableDenseHashTableV2::new().build(empty_key, deleted_key, scope) } + /// Builder for the `MutableHashTable` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MutableHashTable { @@ -60453,6 +73759,12 @@ pub struct MutableHashTable { value_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MutableHashTable' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MutableHashTableInst { + /// An instance of a fully built MutableHashTable Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MutableHashTable { /// Creates a new `MutableHashTable`. @@ -60461,46 +73773,31 @@ impl MutableHashTable { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `use_node_name_sharing` attribute. - pub fn use_node_name_sharing>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_node_name_sharing>(mut self, value: ArgType) -> Self { self.use_node_name_sharing = ::std::option::Option::Some(value.into()); self } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } @@ -60512,39 +73809,81 @@ impl MutableHashTable { } /// Builds the `MutableHashTable` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MutableHashTable", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { - nd.set_attr_bool("use_node_name_sharing", *value)?; - } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MutableHashTable` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MutableHashTable", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MutableHashTableInst{op}) + } +} +impl MutableHashTableInst { + /// Returns the 'table_handle' output of this 'MutableHashTable' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MutableHashTableInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MutableHashTable::new().build(scope)`. -pub fn mutable_hash_table(scope: &mut crate::Scope) -> crate::Result { +pub fn mutable_hash_table<>(scope: &mut crate::Scope) -> crate::Result { MutableHashTable::new().build(scope) } + /// Builder for the `MutableHashTableOfTensors` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MutableHashTableOfTensors { @@ -60556,6 +73895,12 @@ pub struct MutableHashTableOfTensors { value_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MutableHashTableOfTensors' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MutableHashTableOfTensorsInst { + /// An instance of a fully built MutableHashTableOfTensors Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MutableHashTableOfTensors { /// Creates a new `MutableHashTableOfTensors`. @@ -60564,55 +73909,37 @@ impl MutableHashTableOfTensors { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `use_node_name_sharing` attribute. - pub fn use_node_name_sharing>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_node_name_sharing>(mut self, value: ArgType) -> Self { self.use_node_name_sharing = ::std::option::Option::Some(value.into()); self } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_shape` attribute. - pub fn value_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_shape>(mut self, value: ArgType) -> Self { self.value_shape = ::std::option::Option::Some(value.into()); self } @@ -60624,42 +73951,87 @@ impl MutableHashTableOfTensors { } /// Builds the `MutableHashTableOfTensors` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MutableHashTableOfTensors", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { - nd.set_attr_bool("use_node_name_sharing", *value)?; - } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_shape { - nd.set_attr_shape("value_shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MutableHashTableOfTensors` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MutableHashTableOfTensors", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MutableHashTableOfTensorsInst{op}) + } +} +impl MutableHashTableOfTensorsInst { + /// Returns the 'table_handle' output of this 'MutableHashTableOfTensors' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MutableHashTableOfTensorsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MutableHashTableOfTensors::new().build(scope)`. -pub fn mutable_hash_table_of_tensors(scope: &mut crate::Scope) -> crate::Result { +pub fn mutable_hash_table_of_tensors<>(scope: &mut crate::Scope) -> crate::Result { MutableHashTableOfTensors::new().build(scope) } + /// Builder for the `MutableHashTableOfTensorsV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MutableHashTableOfTensorsV2 { @@ -60671,6 +74043,12 @@ pub struct MutableHashTableOfTensorsV2 { value_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MutableHashTableOfTensorsV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MutableHashTableOfTensorsV2Inst { + /// An instance of a fully built MutableHashTableOfTensorsV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MutableHashTableOfTensorsV2 { /// Creates a new `MutableHashTableOfTensorsV2`. @@ -60679,55 +74057,37 @@ impl MutableHashTableOfTensorsV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `use_node_name_sharing` attribute. - pub fn use_node_name_sharing>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_node_name_sharing>(mut self, value: ArgType) -> Self { self.use_node_name_sharing = ::std::option::Option::Some(value.into()); self } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_shape` attribute. - pub fn value_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_shape>(mut self, value: ArgType) -> Self { self.value_shape = ::std::option::Option::Some(value.into()); self } @@ -60739,44 +74099,87 @@ impl MutableHashTableOfTensorsV2 { } /// Builds the `MutableHashTableOfTensorsV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MutableHashTableOfTensorsV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { - nd.set_attr_bool("use_node_name_sharing", *value)?; - } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_shape { - nd.set_attr_shape("value_shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MutableHashTableOfTensorsV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MutableHashTableOfTensorsV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_shape { + nd.set_attr_shape("value_shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MutableHashTableOfTensorsV2Inst{op}) + } +} +impl MutableHashTableOfTensorsV2Inst { + /// Returns the 'table_handle' output of this 'MutableHashTableOfTensorsV2' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MutableHashTableOfTensorsV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MutableHashTableOfTensorsV2::new().build(scope)`. -pub fn mutable_hash_table_of_tensors_v2( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mutable_hash_table_of_tensors_v2<>(scope: &mut crate::Scope) -> crate::Result { MutableHashTableOfTensorsV2::new().build(scope) } + /// Builder for the `MutableHashTableV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MutableHashTableV2 { @@ -60787,6 +74190,12 @@ pub struct MutableHashTableV2 { value_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'MutableHashTableV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MutableHashTableV2Inst { + /// An instance of a fully built MutableHashTableV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MutableHashTableV2 { /// Creates a new `MutableHashTableV2`. @@ -60795,46 +74204,31 @@ impl MutableHashTableV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `use_node_name_sharing` attribute. - pub fn use_node_name_sharing>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_node_name_sharing>(mut self, value: ArgType) -> Self { self.use_node_name_sharing = ::std::option::Option::Some(value.into()); self } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } @@ -60846,44 +74240,92 @@ impl MutableHashTableV2 { } /// Builds the `MutableHashTableV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MutableHashTableV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { - nd.set_attr_bool("use_node_name_sharing", *value)?; - } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MutableHashTableV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MutableHashTableV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_node_name_sharing { + nd.set_attr_bool("use_node_name_sharing", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MutableHashTableV2Inst{op}) + } +} +impl MutableHashTableV2Inst { + /// Returns the 'table_handle' output of this 'MutableHashTableV2' operation. + pub fn table_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MutableHashTableV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MutableHashTableV2::new().build(scope)`. -pub fn mutable_hash_table_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn mutable_hash_table_v2<>(scope: &mut crate::Scope) -> crate::Result { MutableHashTableV2::new().build(scope) } + /// Builder for the `MutexLock` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MutexLock { control_inputs: ::std::vec::Vec, } +/// An instance of 'MutexLock' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MutexLockInst { + /// An instance of a fully built MutexLock Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MutexLock { /// Creates a new `MutexLock`. @@ -60898,19 +74340,10 @@ impl MutexLock { } /// Builds the `MutexLock` operation. - pub fn build>( - &self, - mutex: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, mutex: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(mutex.into(), scope) } - - fn build_impl( - &self, - mutex: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, mutex: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MutexLock", |nd| { nd.add_input(mutex); for op in &self.control_inputs { @@ -60919,15 +74352,41 @@ impl MutexLock { ::std::result::Result::Ok(()) }) } -} + /// Builds the `MutexLock` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, mutex: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(mutex.into(), scope) + } + fn build_instance_impl(&self, mutex: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MutexLock", |nd| { + nd.add_input(mutex); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(MutexLockInst{op}) + } +} +impl MutexLockInst { + /// Returns the 'mutex_lock' output of this 'MutexLock' operation. + pub fn mutex_lock(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MutexLockInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MutexLock::new().build(mutex, scope)`. -pub fn mutex_lock>( - mutex: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn mutex_lock>(mutex: O0, scope: &mut crate::Scope) -> crate::Result { MutexLock::new().build(mutex, scope) } + /// Builder for the `MutexV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct MutexV2 { @@ -60935,6 +74394,12 @@ pub struct MutexV2 { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'MutexV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct MutexV2Inst { + /// An instance of a fully built MutexV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl MutexV2 { /// Creates a new `MutexV2`. @@ -60943,19 +74408,13 @@ impl MutexV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -60967,30 +74426,63 @@ impl MutexV2 { } /// Builds the `MutexV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("MutexV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `MutexV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("MutexV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(MutexV2Inst{op}) + } +} +impl MutexV2Inst { + /// Returns the 'resource' output of this 'MutexV2' operation. + pub fn resource(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for MutexV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `MutexV2::new().build(scope)`. -pub fn mutex_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn mutex_v2<>(scope: &mut crate::Scope) -> crate::Result { MutexV2::new().build(scope) } + /// Builder for the `NcclAllReduce` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NcclAllReduce { @@ -61000,6 +74492,12 @@ pub struct NcclAllReduce { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'NcclAllReduce' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NcclAllReduceInst { + /// An instance of a fully built NcclAllReduce Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NcclAllReduce { /// Creates a new `NcclAllReduce`. @@ -61008,10 +74506,7 @@ impl NcclAllReduce { } /// Sets the `reduction` attribute. - pub fn reduction>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduction>(mut self, value: ArgType) -> Self { self.reduction = ::std::option::Option::Some(value.into()); self } @@ -61029,10 +74524,7 @@ impl NcclAllReduce { } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -61044,48 +74536,77 @@ impl NcclAllReduce { } /// Builds the `NcclAllReduce` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NcclAllReduce", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.reduction { - nd.set_attr_string("reduction", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_devices { - nd.set_attr_int("num_devices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.reduction { + nd.set_attr_string("reduction", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_devices { + nd.set_attr_int("num_devices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NcclAllReduce` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NcclAllReduce", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.reduction { + nd.set_attr_string("reduction", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_devices { + nd.set_attr_int("num_devices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NcclAllReduceInst{op}) + } +} +impl NcclAllReduceInst { + /// Returns the 'data' output of this 'NcclAllReduce' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NcclAllReduceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NcclAllReduce::new().build(input, scope)`. -pub fn nccl_all_reduce>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn nccl_all_reduce>(input: O0, scope: &mut crate::Scope) -> crate::Result { NcclAllReduce::new().build(input, scope) } + /// Builder for the `NcclBroadcast` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NcclBroadcast { @@ -61093,6 +74614,12 @@ pub struct NcclBroadcast { shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NcclBroadcast' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NcclBroadcastInst { + /// An instance of a fully built NcclBroadcast Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NcclBroadcast { /// Creates a new `NcclBroadcast`. @@ -61119,42 +74646,65 @@ impl NcclBroadcast { } /// Builds the `NcclBroadcast` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NcclBroadcast", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NcclBroadcast` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NcclBroadcast", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NcclBroadcastInst{op}) + } +} +impl NcclBroadcastInst { + /// Returns the 'output' output of this 'NcclBroadcast' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NcclBroadcastInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NcclBroadcast::new().build(input, scope)`. -pub fn nccl_broadcast>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn nccl_broadcast>(input: O0, scope: &mut crate::Scope) -> crate::Result { NcclBroadcast::new().build(input, scope) } + /// Builder for the `NcclReduce` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NcclReduce { @@ -61163,6 +74713,12 @@ pub struct NcclReduce { num_devices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NcclReduce' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NcclReduceInst { + /// An instance of a fully built NcclReduce Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NcclReduce { /// Creates a new `NcclReduce`. @@ -61171,10 +74727,7 @@ impl NcclReduce { } /// Sets the `reduction` attribute. - pub fn reduction>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduction>(mut self, value: ArgType) -> Self { self.reduction = ::std::option::Option::Some(value.into()); self } @@ -61198,51 +74751,83 @@ impl NcclReduce { } /// Builds the `NcclReduce` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NcclReduce", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.reduction { - nd.set_attr_string("reduction", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_devices { - nd.set_attr_int("num_devices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.reduction { + nd.set_attr_string("reduction", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_devices { + nd.set_attr_int("num_devices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NcclReduce` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NcclReduce", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.reduction { + nd.set_attr_string("reduction", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_devices { + nd.set_attr_int("num_devices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NcclReduceInst{op}) + } +} +impl NcclReduceInst { + /// Returns the 'data' output of this 'NcclReduce' operation. + pub fn data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NcclReduceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NcclReduce::new().build(input, scope)`. -pub fn nccl_reduce>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn nccl_reduce>(input: O0, scope: &mut crate::Scope) -> crate::Result { NcclReduce::new().build(input, scope) } + /// Builder for the `Ndtri` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Ndtri { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Ndtri' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NdtriInst { + /// An instance of a fully built Ndtri Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Ndtri { /// Creates a new `Ndtri`. @@ -61263,44 +74848,70 @@ impl Ndtri { } /// Builds the `Ndtri` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Ndtri", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Ndtri` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Ndtri", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NdtriInst{op}) + } +} +impl NdtriInst { + /// Returns the 'y' output of this 'Ndtri' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NdtriInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Ndtri::new().build(x, scope)`. -pub fn ndtri>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ndtri>(x: O0, scope: &mut crate::Scope) -> crate::Result { Ndtri::new().build(x, scope) } + /// Builder for the `NearestNeighbors` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NearestNeighbors { control_inputs: ::std::vec::Vec, } +/// An instance of 'NearestNeighbors' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NearestNeighborsInst { + /// An instance of a fully built NearestNeighbors Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NearestNeighbors { /// Creates a new `NearestNeighbors`. @@ -61315,27 +74926,10 @@ impl NearestNeighbors { } /// Builds the `NearestNeighbors` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - points: O0, - centers: O1, - k: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, points: O0, centers: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(points.into(), centers.into(), k.into(), scope) } - - fn build_impl( - &self, - points: crate::Output, - centers: crate::Output, - k: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, points: crate::Output, centers: crate::Output, k: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NearestNeighbors", |nd| { nd.add_input(points); nd.add_input(centers); @@ -61346,27 +74940,62 @@ impl NearestNeighbors { ::std::result::Result::Ok(()) }) } -} + /// Builds the `NearestNeighbors` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, points: O0, centers: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(points.into(), centers.into(), k.into(), scope) + } + fn build_instance_impl(&self, points: crate::Output, centers: crate::Output, k: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NearestNeighbors", |nd| { + nd.add_input(points); + nd.add_input(centers); + nd.add_input(k); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(NearestNeighborsInst{op}) + } +} +impl NearestNeighborsInst { + /// Returns the 'nearest_center_indices' output of this 'NearestNeighbors' operation. + pub fn nearest_center_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'nearest_center_distances' output of this 'NearestNeighbors' operation. + pub fn nearest_center_distances(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for NearestNeighborsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NearestNeighbors::new().build(points, centers, k, scope)`. -pub fn nearest_neighbors< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - points: O0, - centers: O1, - k: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn nearest_neighbors, O1: ::std::convert::Into, O2: ::std::convert::Into>(points: O0, centers: O1, k: O2, scope: &mut crate::Scope) -> crate::Result { NearestNeighbors::new().build(points, centers, k, scope) } + /// Builder for the `Neg` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Neg { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Neg' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NegInst { + /// An instance of a fully built Neg Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Neg { /// Creates a new `Neg`. @@ -61387,39 +75016,59 @@ impl Neg { } /// Builds the `Neg` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Neg", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Neg` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Neg", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NegInst{op}) + } +} +impl NegInst { + /// Returns the 'y' output of this 'Neg' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NegInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Neg::new().build(x, scope)`. -pub fn neg>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn neg>(x: O0, scope: &mut crate::Scope) -> crate::Result { Neg::new().build(x, scope) } + /// Builder for the `NegTrain` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NegTrain { @@ -61427,6 +75076,12 @@ pub struct NegTrain { num_negative_samples: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NegTrain' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NegTrainInst { + /// An instance of a fully built NegTrain Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NegTrain { /// Creates a new `NegTrain`. @@ -61435,19 +75090,13 @@ impl NegTrain { } /// Sets the `vocab_count` attribute. - pub fn vocab_count>>( - mut self, - value: ArgType, - ) -> Self { + pub fn vocab_count>>(mut self, value: ArgType) -> Self { self.vocab_count = ::std::option::Option::Some(value.into()); self } /// Sets the `num_negative_samples` attribute. - pub fn num_negative_samples>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_negative_samples>(mut self, value: ArgType) -> Self { self.num_negative_samples = ::std::option::Option::Some(value.into()); self } @@ -61459,40 +75108,10 @@ impl NegTrain { } /// Builds the `NegTrain` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - w_in: O0, - w_out: O1, - examples: O2, - labels: O3, - lr: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - w_in.into(), - w_out.into(), - examples.into(), - labels.into(), - lr.into(), - scope, - ) - } - - fn build_impl( - &self, - w_in: crate::Output, - w_out: crate::Output, - examples: crate::Output, - labels: crate::Output, - lr: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, w_in: O0, w_out: O1, examples: O2, labels: O3, lr: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(w_in.into(), w_out.into(), examples.into(), labels.into(), lr.into(), scope) + } + fn build_impl(&self, w_in: crate::Output, w_out: crate::Output, examples: crate::Output, labels: crate::Output, lr: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NegTrain", |nd| { nd.add_input(w_in); nd.add_input(w_out); @@ -61502,40 +75121,65 @@ impl NegTrain { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.vocab_count { - nd.set_attr_int_list("vocab_count", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_negative_samples { - nd.set_attr_int("num_negative_samples", *value)?; - } + if let ::std::option::Option::Some(value) = &self.vocab_count { + nd.set_attr_int_list("vocab_count", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_negative_samples { + nd.set_attr_int("num_negative_samples", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NegTrain` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, w_in: O0, w_out: O1, examples: O2, labels: O3, lr: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(w_in.into(), w_out.into(), examples.into(), labels.into(), lr.into(), scope) + } + fn build_instance_impl(&self, w_in: crate::Output, w_out: crate::Output, examples: crate::Output, labels: crate::Output, lr: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NegTrain", |nd| { + nd.add_input(w_in); + nd.add_input(w_out); + nd.add_input(examples); + nd.add_input(labels); + nd.add_input(lr); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.vocab_count { + nd.set_attr_int_list("vocab_count", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_negative_samples { + nd.set_attr_int("num_negative_samples", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NegTrainInst{op}) + } +} +impl NegTrainInst { +} +impl Into for NegTrainInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NegTrain::new().build(w_in, w_out, examples, labels, lr, scope)`. -pub fn neg_train< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - w_in: O0, - w_out: O1, - examples: O2, - labels: O3, - lr: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn neg_train, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(w_in: O0, w_out: O1, examples: O2, labels: O3, lr: O4, scope: &mut crate::Scope) -> crate::Result { NegTrain::new().build(w_in, w_out, examples, labels, lr, scope) } + /// Builder for the `NextAfter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NextAfter { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NextAfter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NextAfterInst { + /// An instance of a fully built NextAfter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NextAfter { /// Creates a new `NextAfter`. @@ -61556,55 +75200,73 @@ impl NextAfter { } /// Builds the `NextAfter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x1: O0, - x2: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x1: O0, x2: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x1.into(), x2.into(), scope) } - - fn build_impl( - &self, - x1: crate::Output, - x2: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x1: crate::Output, x2: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NextAfter", |nd| { nd.add_input(x1); nd.add_input(x2); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NextAfter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x1: O0, x2: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x1.into(), x2.into(), scope) + } + fn build_instance_impl(&self, x1: crate::Output, x2: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NextAfter", |nd| { + nd.add_input(x1); + nd.add_input(x2); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NextAfterInst{op}) + } +} +impl NextAfterInst { + /// Returns the 'output' output of this 'NextAfter' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NextAfterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NextAfter::new().build(x1, x2, scope)`. -pub fn next_after< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x1: O0, - x2: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn next_after, O1: ::std::convert::Into>(x1: O0, x2: O1, scope: &mut crate::Scope) -> crate::Result { NextAfter::new().build(x1, x2, scope) } + /// Builder for the `NextIteration` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NextIteration { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NextIteration' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NextIterationInst { + /// An instance of a fully built NextIteration Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NextIteration { /// Creates a new `NextIteration`. @@ -61625,44 +75287,70 @@ impl NextIteration { } /// Builds the `NextIteration` operation. - pub fn build>( - &self, - data: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NextIteration", |nd| { nd.add_input(data); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NextIteration` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NextIteration", |nd| { + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NextIterationInst{op}) + } +} +impl NextIterationInst { + /// Returns the 'output' output of this 'NextIteration' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NextIterationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NextIteration::new().build(data, scope)`. -pub fn next_iteration>( - data: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn next_iteration>(data: O0, scope: &mut crate::Scope) -> crate::Result { NextIteration::new().build(data, scope) } + /// Builder for the `NoOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NoOp { control_inputs: ::std::vec::Vec, } +/// An instance of 'NoOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NoOpInst { + /// An instance of a fully built NoOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NoOp { /// Creates a new `NoOp`. @@ -61677,10 +75365,9 @@ impl NoOp { } /// Builds the `NoOp` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NoOp", |nd| { for op in &self.control_inputs { @@ -61689,12 +75376,33 @@ impl NoOp { ::std::result::Result::Ok(()) }) } -} + /// Builds the `NoOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NoOp", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(NoOpInst{op}) + } +} +impl NoOpInst { +} +impl Into for NoOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NoOp::new().build(scope)`. -pub fn no_op(scope: &mut crate::Scope) -> crate::Result { +pub fn no_op<>(scope: &mut crate::Scope) -> crate::Result { NoOp::new().build(scope) } + /// Builder for the `NonDeterministicInts` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NonDeterministicInts { @@ -61702,6 +75410,12 @@ pub struct NonDeterministicInts { shape_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NonDeterministicInts' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NonDeterministicIntsInst { + /// An instance of a fully built NonDeterministicInts Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NonDeterministicInts { /// Creates a new `NonDeterministicInts`. @@ -61716,10 +75430,7 @@ impl NonDeterministicInts { } /// Sets the `shape_dtype` attribute. - pub fn shape_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_dtype>(mut self, value: ArgType) -> Self { self.shape_dtype = ::std::option::Option::Some(value.into()); self } @@ -61731,48 +75442,77 @@ impl NonDeterministicInts { } /// Builds the `NonDeterministicInts` operation. - pub fn build>( - &self, - shape: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NonDeterministicInts", |nd| { nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_dtype { - nd.set_attr_type("shape_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NonDeterministicInts` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NonDeterministicInts", |nd| { + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NonDeterministicIntsInst{op}) + } +} +impl NonDeterministicIntsInst { + /// Returns the 'output' output of this 'NonDeterministicInts' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NonDeterministicIntsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NonDeterministicInts::new().build(shape, scope)`. -pub fn non_deterministic_ints>( - shape: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn non_deterministic_ints>(shape: O0, scope: &mut crate::Scope) -> crate::Result { NonDeterministicInts::new().build(shape, scope) } + /// Builder for the `NonMaxSuppression` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NonMaxSuppression { iou_threshold: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NonMaxSuppression' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NonMaxSuppressionInst { + /// An instance of a fully built NonMaxSuppression Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NonMaxSuppression { /// Creates a new `NonMaxSuppression`. @@ -61793,27 +75533,10 @@ impl NonMaxSuppression { } /// Builds the `NonMaxSuppression` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - boxes: O0, - scores: O1, - max_output_size: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(boxes.into(), scores.into(), max_output_size.into(), scope) } - - fn build_impl( - &self, - boxes: crate::Output, - scores: crate::Output, - max_output_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NonMaxSuppression", |nd| { nd.add_input(boxes); nd.add_input(scores); @@ -61821,27 +75544,52 @@ impl NonMaxSuppression { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.iou_threshold { - nd.set_attr_float("iou_threshold", *value)?; - } + if let ::std::option::Option::Some(value) = &self.iou_threshold { + nd.set_attr_float("iou_threshold", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NonMaxSuppression` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(boxes.into(), scores.into(), max_output_size.into(), scope) + } + fn build_instance_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NonMaxSuppression", |nd| { + nd.add_input(boxes); + nd.add_input(scores); + nd.add_input(max_output_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.iou_threshold { + nd.set_attr_float("iou_threshold", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NonMaxSuppressionInst{op}) + } +} +impl NonMaxSuppressionInst { + /// Returns the 'selected_indices' output of this 'NonMaxSuppression' operation. + pub fn selected_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NonMaxSuppressionInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NonMaxSuppression::new().build(boxes, scores, max_output_size, scope)`. -pub fn non_max_suppression< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - boxes: O0, - scores: O1, - max_output_size: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn non_max_suppression, O1: ::std::convert::Into, O2: ::std::convert::Into>(boxes: O0, scores: O1, max_output_size: O2, scope: &mut crate::Scope) -> crate::Result { NonMaxSuppression::new().build(boxes, scores, max_output_size, scope) } + /// Builder for the `NonMaxSuppressionV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NonMaxSuppressionV2 { @@ -61849,6 +75597,12 @@ pub struct NonMaxSuppressionV2 { T_threshold: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NonMaxSuppressionV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NonMaxSuppressionV2Inst { + /// An instance of a fully built NonMaxSuppressionV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NonMaxSuppressionV2 { /// Creates a new `NonMaxSuppressionV2`. @@ -61863,10 +75617,7 @@ impl NonMaxSuppressionV2 { } /// Sets the `T_threshold` attribute. - pub fn T_threshold>( - mut self, - value: ArgType, - ) -> Self { + pub fn T_threshold>(mut self, value: ArgType) -> Self { self.T_threshold = ::std::option::Option::Some(value.into()); self } @@ -61878,36 +75629,10 @@ impl NonMaxSuppressionV2 { } /// Builds the `NonMaxSuppressionV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - boxes: O0, - scores: O1, - max_output_size: O2, - iou_threshold: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - boxes.into(), - scores.into(), - max_output_size.into(), - iou_threshold.into(), - scope, - ) - } - - fn build_impl( - &self, - boxes: crate::Output, - scores: crate::Output, - max_output_size: crate::Output, - iou_threshold: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(boxes.into(), scores.into(), max_output_size.into(), iou_threshold.into(), scope) + } + fn build_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size: crate::Output, iou_threshold: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NonMaxSuppressionV2", |nd| { nd.add_input(boxes); nd.add_input(scores); @@ -61916,32 +75641,59 @@ impl NonMaxSuppressionV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T_threshold { - nd.set_attr_type("T_threshold", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T_threshold { + nd.set_attr_type("T_threshold", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NonMaxSuppressionV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(boxes.into(), scores.into(), max_output_size.into(), iou_threshold.into(), scope) + } + fn build_instance_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size: crate::Output, iou_threshold: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NonMaxSuppressionV2", |nd| { + nd.add_input(boxes); + nd.add_input(scores); + nd.add_input(max_output_size); + nd.add_input(iou_threshold); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T_threshold { + nd.set_attr_type("T_threshold", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NonMaxSuppressionV2Inst{op}) + } +} +impl NonMaxSuppressionV2Inst { + /// Returns the 'selected_indices' output of this 'NonMaxSuppressionV2' operation. + pub fn selected_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NonMaxSuppressionV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NonMaxSuppressionV2::new().build(boxes, scores, max_output_size, iou_threshold, scope)`. -pub fn non_max_suppression_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - boxes: O0, - scores: O1, - max_output_size: O2, - iou_threshold: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn non_max_suppression_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, scope: &mut crate::Scope) -> crate::Result { NonMaxSuppressionV2::new().build(boxes, scores, max_output_size, iou_threshold, scope) } + /// Builder for the `NonMaxSuppressionV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NonMaxSuppressionV3 { @@ -61949,6 +75701,12 @@ pub struct NonMaxSuppressionV3 { T_threshold: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NonMaxSuppressionV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NonMaxSuppressionV3Inst { + /// An instance of a fully built NonMaxSuppressionV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NonMaxSuppressionV3 { /// Creates a new `NonMaxSuppressionV3`. @@ -61963,10 +75721,7 @@ impl NonMaxSuppressionV3 { } /// Sets the `T_threshold` attribute. - pub fn T_threshold>( - mut self, - value: ArgType, - ) -> Self { + pub fn T_threshold>(mut self, value: ArgType) -> Self { self.T_threshold = ::std::option::Option::Some(value.into()); self } @@ -61978,40 +75733,10 @@ impl NonMaxSuppressionV3 { } /// Builds the `NonMaxSuppressionV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - boxes: O0, - scores: O1, - max_output_size: O2, - iou_threshold: O3, - score_threshold: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - boxes.into(), - scores.into(), - max_output_size.into(), - iou_threshold.into(), - score_threshold.into(), - scope, - ) - } - - fn build_impl( - &self, - boxes: crate::Output, - scores: crate::Output, - max_output_size: crate::Output, - iou_threshold: crate::Output, - score_threshold: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, score_threshold: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(boxes.into(), scores.into(), max_output_size.into(), iou_threshold.into(), score_threshold.into(), scope) + } + fn build_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size: crate::Output, iou_threshold: crate::Output, score_threshold: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NonMaxSuppressionV3", |nd| { nd.add_input(boxes); nd.add_input(scores); @@ -62021,41 +75746,60 @@ impl NonMaxSuppressionV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T_threshold { - nd.set_attr_type("T_threshold", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T_threshold { + nd.set_attr_type("T_threshold", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NonMaxSuppressionV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, score_threshold: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(boxes.into(), scores.into(), max_output_size.into(), iou_threshold.into(), score_threshold.into(), scope) + } + fn build_instance_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size: crate::Output, iou_threshold: crate::Output, score_threshold: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NonMaxSuppressionV3", |nd| { + nd.add_input(boxes); + nd.add_input(scores); + nd.add_input(max_output_size); + nd.add_input(iou_threshold); + nd.add_input(score_threshold); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T_threshold { + nd.set_attr_type("T_threshold", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NonMaxSuppressionV3Inst{op}) + } +} +impl NonMaxSuppressionV3Inst { + /// Returns the 'selected_indices' output of this 'NonMaxSuppressionV3' operation. + pub fn selected_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NonMaxSuppressionV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NonMaxSuppressionV3::new().build(boxes, scores, max_output_size, iou_threshold, score_threshold, scope)`. -pub fn non_max_suppression_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - boxes: O0, - scores: O1, - max_output_size: O2, - iou_threshold: O3, - score_threshold: O4, - scope: &mut crate::Scope, -) -> crate::Result { - NonMaxSuppressionV3::new().build( - boxes, - scores, - max_output_size, - iou_threshold, - score_threshold, - scope, - ) +pub fn non_max_suppression_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, score_threshold: O4, scope: &mut crate::Scope) -> crate::Result { + NonMaxSuppressionV3::new().build(boxes, scores, max_output_size, iou_threshold, score_threshold, scope) } + /// Builder for the `NonMaxSuppressionV4` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NonMaxSuppressionV4 { @@ -62064,6 +75808,12 @@ pub struct NonMaxSuppressionV4 { pad_to_max_output_size: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NonMaxSuppressionV4' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NonMaxSuppressionV4Inst { + /// An instance of a fully built NonMaxSuppressionV4 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NonMaxSuppressionV4 { /// Creates a new `NonMaxSuppressionV4`. @@ -62078,19 +75828,13 @@ impl NonMaxSuppressionV4 { } /// Sets the `T_threshold` attribute. - pub fn T_threshold>( - mut self, - value: ArgType, - ) -> Self { + pub fn T_threshold>(mut self, value: ArgType) -> Self { self.T_threshold = ::std::option::Option::Some(value.into()); self } /// Sets the `pad_to_max_output_size` attribute. - pub fn pad_to_max_output_size>( - mut self, - value: ArgType, - ) -> Self { + pub fn pad_to_max_output_size>(mut self, value: ArgType) -> Self { self.pad_to_max_output_size = ::std::option::Option::Some(value.into()); self } @@ -62102,40 +75846,10 @@ impl NonMaxSuppressionV4 { } /// Builds the `NonMaxSuppressionV4` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - boxes: O0, - scores: O1, - max_output_size: O2, - iou_threshold: O3, - score_threshold: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - boxes.into(), - scores.into(), - max_output_size.into(), - iou_threshold.into(), - score_threshold.into(), - scope, - ) - } - - fn build_impl( - &self, - boxes: crate::Output, - scores: crate::Output, - max_output_size: crate::Output, - iou_threshold: crate::Output, - score_threshold: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, score_threshold: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(boxes.into(), scores.into(), max_output_size.into(), iou_threshold.into(), score_threshold.into(), scope) + } + fn build_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size: crate::Output, iou_threshold: crate::Output, score_threshold: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NonMaxSuppressionV4", |nd| { nd.add_input(boxes); nd.add_input(scores); @@ -62145,44 +75859,73 @@ impl NonMaxSuppressionV4 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T_threshold { - nd.set_attr_type("T_threshold", *value)?; - } - if let ::std::option::Option::Some(value) = &self.pad_to_max_output_size { - nd.set_attr_bool("pad_to_max_output_size", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T_threshold { + nd.set_attr_type("T_threshold", *value)?; + } + if let ::std::option::Option::Some(value) = &self.pad_to_max_output_size { + nd.set_attr_bool("pad_to_max_output_size", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NonMaxSuppressionV4` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, score_threshold: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(boxes.into(), scores.into(), max_output_size.into(), iou_threshold.into(), score_threshold.into(), scope) + } + fn build_instance_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size: crate::Output, iou_threshold: crate::Output, score_threshold: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NonMaxSuppressionV4", |nd| { + nd.add_input(boxes); + nd.add_input(scores); + nd.add_input(max_output_size); + nd.add_input(iou_threshold); + nd.add_input(score_threshold); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T_threshold { + nd.set_attr_type("T_threshold", *value)?; + } + if let ::std::option::Option::Some(value) = &self.pad_to_max_output_size { + nd.set_attr_bool("pad_to_max_output_size", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NonMaxSuppressionV4Inst{op}) + } +} +impl NonMaxSuppressionV4Inst { + /// Returns the 'selected_indices' output of this 'NonMaxSuppressionV4' operation. + pub fn selected_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'valid_outputs' output of this 'NonMaxSuppressionV4' operation. + pub fn valid_outputs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for NonMaxSuppressionV4Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NonMaxSuppressionV4::new().build(boxes, scores, max_output_size, iou_threshold, score_threshold, scope)`. -pub fn non_max_suppression_v4< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - boxes: O0, - scores: O1, - max_output_size: O2, - iou_threshold: O3, - score_threshold: O4, - scope: &mut crate::Scope, -) -> crate::Result { - NonMaxSuppressionV4::new().build( - boxes, - scores, - max_output_size, - iou_threshold, - score_threshold, - scope, - ) +pub fn non_max_suppression_v4, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, score_threshold: O4, scope: &mut crate::Scope) -> crate::Result { + NonMaxSuppressionV4::new().build(boxes, scores, max_output_size, iou_threshold, score_threshold, scope) } + /// Builder for the `NonMaxSuppressionV5` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NonMaxSuppressionV5 { @@ -62190,6 +75933,12 @@ pub struct NonMaxSuppressionV5 { pad_to_max_output_size: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NonMaxSuppressionV5' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NonMaxSuppressionV5Inst { + /// An instance of a fully built NonMaxSuppressionV5 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NonMaxSuppressionV5 { /// Creates a new `NonMaxSuppressionV5`. @@ -62204,10 +75953,7 @@ impl NonMaxSuppressionV5 { } /// Sets the `pad_to_max_output_size` attribute. - pub fn pad_to_max_output_size>( - mut self, - value: ArgType, - ) -> Self { + pub fn pad_to_max_output_size>(mut self, value: ArgType) -> Self { self.pad_to_max_output_size = ::std::option::Option::Some(value.into()); self } @@ -62219,44 +75965,10 @@ impl NonMaxSuppressionV5 { } /// Builds the `NonMaxSuppressionV5` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - boxes: O0, - scores: O1, - max_output_size: O2, - iou_threshold: O3, - score_threshold: O4, - soft_nms_sigma: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - boxes.into(), - scores.into(), - max_output_size.into(), - iou_threshold.into(), - score_threshold.into(), - soft_nms_sigma.into(), - scope, - ) - } - - fn build_impl( - &self, - boxes: crate::Output, - scores: crate::Output, - max_output_size: crate::Output, - iou_threshold: crate::Output, - score_threshold: crate::Output, - soft_nms_sigma: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, score_threshold: O4, soft_nms_sigma: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(boxes.into(), scores.into(), max_output_size.into(), iou_threshold.into(), score_threshold.into(), soft_nms_sigma.into(), scope) + } + fn build_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size: crate::Output, iou_threshold: crate::Output, score_threshold: crate::Output, soft_nms_sigma: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NonMaxSuppressionV5", |nd| { nd.add_input(boxes); nd.add_input(scores); @@ -62267,49 +75979,86 @@ impl NonMaxSuppressionV5 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.pad_to_max_output_size { - nd.set_attr_bool("pad_to_max_output_size", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.pad_to_max_output_size { + nd.set_attr_bool("pad_to_max_output_size", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NonMaxSuppressionV5` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, score_threshold: O4, soft_nms_sigma: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(boxes.into(), scores.into(), max_output_size.into(), iou_threshold.into(), score_threshold.into(), soft_nms_sigma.into(), scope) + } + fn build_instance_impl(&self, boxes: crate::Output, scores: crate::Output, max_output_size: crate::Output, iou_threshold: crate::Output, score_threshold: crate::Output, soft_nms_sigma: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NonMaxSuppressionV5", |nd| { + nd.add_input(boxes); + nd.add_input(scores); + nd.add_input(max_output_size); + nd.add_input(iou_threshold); + nd.add_input(score_threshold); + nd.add_input(soft_nms_sigma); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.pad_to_max_output_size { + nd.set_attr_bool("pad_to_max_output_size", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NonMaxSuppressionV5Inst{op}) + } +} +impl NonMaxSuppressionV5Inst { + /// Returns the 'selected_indices' output of this 'NonMaxSuppressionV5' operation. + pub fn selected_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'selected_scores' output of this 'NonMaxSuppressionV5' operation. + pub fn selected_scores(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'valid_outputs' output of this 'NonMaxSuppressionV5' operation. + pub fn valid_outputs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for NonMaxSuppressionV5Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NonMaxSuppressionV5::new().build(boxes, scores, max_output_size, iou_threshold, score_threshold, soft_nms_sigma, scope)`. -pub fn non_max_suppression_v5< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - boxes: O0, - scores: O1, - max_output_size: O2, - iou_threshold: O3, - score_threshold: O4, - soft_nms_sigma: O5, - scope: &mut crate::Scope, -) -> crate::Result { - NonMaxSuppressionV5::new().build( - boxes, - scores, - max_output_size, - iou_threshold, - score_threshold, - soft_nms_sigma, - scope, - ) +pub fn non_max_suppression_v5, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(boxes: O0, scores: O1, max_output_size: O2, iou_threshold: O3, score_threshold: O4, soft_nms_sigma: O5, scope: &mut crate::Scope) -> crate::Result { + NonMaxSuppressionV5::new().build(boxes, scores, max_output_size, iou_threshold, score_threshold, soft_nms_sigma, scope) } + /// Builder for the `NonMaxSuppressionWithOverlaps` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NonMaxSuppressionWithOverlaps { control_inputs: ::std::vec::Vec, } +/// An instance of 'NonMaxSuppressionWithOverlaps' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NonMaxSuppressionWithOverlapsInst { + /// An instance of a fully built NonMaxSuppressionWithOverlaps Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NonMaxSuppressionWithOverlaps { /// Creates a new `NonMaxSuppressionWithOverlaps`. @@ -62324,40 +76073,10 @@ impl NonMaxSuppressionWithOverlaps { } /// Builds the `NonMaxSuppressionWithOverlaps` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - overlaps: O0, - scores: O1, - max_output_size: O2, - overlap_threshold: O3, - score_threshold: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - overlaps.into(), - scores.into(), - max_output_size.into(), - overlap_threshold.into(), - score_threshold.into(), - scope, - ) - } - - fn build_impl( - &self, - overlaps: crate::Output, - scores: crate::Output, - max_output_size: crate::Output, - overlap_threshold: crate::Output, - score_threshold: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, overlaps: O0, scores: O1, max_output_size: O2, overlap_threshold: O3, score_threshold: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(overlaps.into(), scores.into(), max_output_size.into(), overlap_threshold.into(), score_threshold.into(), scope) + } + fn build_impl(&self, overlaps: crate::Output, scores: crate::Output, max_output_size: crate::Output, overlap_threshold: crate::Output, score_threshold: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NonMaxSuppressionWithOverlaps", |nd| { nd.add_input(overlaps); nd.add_input(scores); @@ -62370,32 +76089,45 @@ impl NonMaxSuppressionWithOverlaps { ::std::result::Result::Ok(()) }) } -} + /// Builds the `NonMaxSuppressionWithOverlaps` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, overlaps: O0, scores: O1, max_output_size: O2, overlap_threshold: O3, score_threshold: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(overlaps.into(), scores.into(), max_output_size.into(), overlap_threshold.into(), score_threshold.into(), scope) + } + fn build_instance_impl(&self, overlaps: crate::Output, scores: crate::Output, max_output_size: crate::Output, overlap_threshold: crate::Output, score_threshold: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NonMaxSuppressionWithOverlaps", |nd| { + nd.add_input(overlaps); + nd.add_input(scores); + nd.add_input(max_output_size); + nd.add_input(overlap_threshold); + nd.add_input(score_threshold); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(NonMaxSuppressionWithOverlapsInst{op}) + } +} +impl NonMaxSuppressionWithOverlapsInst { + /// Returns the 'selected_indices' output of this 'NonMaxSuppressionWithOverlaps' operation. + pub fn selected_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NonMaxSuppressionWithOverlapsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NonMaxSuppressionWithOverlaps::new().build(overlaps, scores, max_output_size, overlap_threshold, score_threshold, scope)`. -pub fn non_max_suppression_with_overlaps< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - overlaps: O0, - scores: O1, - max_output_size: O2, - overlap_threshold: O3, - score_threshold: O4, - scope: &mut crate::Scope, -) -> crate::Result { - NonMaxSuppressionWithOverlaps::new().build( - overlaps, - scores, - max_output_size, - overlap_threshold, - score_threshold, - scope, - ) +pub fn non_max_suppression_with_overlaps, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(overlaps: O0, scores: O1, max_output_size: O2, overlap_threshold: O3, score_threshold: O4, scope: &mut crate::Scope) -> crate::Result { + NonMaxSuppressionWithOverlaps::new().build(overlaps, scores, max_output_size, overlap_threshold, score_threshold, scope) } + /// Builder for the `NonSerializableDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NonSerializableDataset { @@ -62403,6 +76135,12 @@ pub struct NonSerializableDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'NonSerializableDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NonSerializableDatasetInst { + /// An instance of a fully built NonSerializableDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NonSerializableDataset { /// Creates a new `NonSerializableDataset`. @@ -62411,19 +76149,13 @@ impl NonSerializableDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -62435,42 +76167,65 @@ impl NonSerializableDataset { } /// Builds the `NonSerializableDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NonSerializableDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NonSerializableDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NonSerializableDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NonSerializableDatasetInst{op}) + } +} +impl NonSerializableDatasetInst { + /// Returns the 'handle' output of this 'NonSerializableDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NonSerializableDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NonSerializableDataset::new().build(input_dataset, scope)`. -pub fn non_serializable_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn non_serializable_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { NonSerializableDataset::new().build(input_dataset, scope) } + /// Builder for the `NotEqual` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NotEqual { @@ -62478,6 +76233,12 @@ pub struct NotEqual { incompatible_shape_error: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NotEqual' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NotEqualInst { + /// An instance of a fully built NotEqual Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NotEqual { /// Creates a new `NotEqual`. @@ -62492,10 +76253,7 @@ impl NotEqual { } /// Sets the `incompatible_shape_error` attribute. - pub fn incompatible_shape_error>( - mut self, - value: ArgType, - ) -> Self { + pub fn incompatible_shape_error>(mut self, value: ArgType) -> Self { self.incompatible_shape_error = ::std::option::Option::Some(value.into()); self } @@ -62507,52 +76265,67 @@ impl NotEqual { } /// Builds the `NotEqual` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NotEqual", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.incompatible_shape_error { - nd.set_attr_bool("incompatible_shape_error", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.incompatible_shape_error { + nd.set_attr_bool("incompatible_shape_error", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NotEqual` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NotEqual", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.incompatible_shape_error { + nd.set_attr_bool("incompatible_shape_error", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NotEqualInst{op}) + } +} +impl NotEqualInst { + /// Returns the 'z' output of this 'NotEqual' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NotEqualInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NotEqual::new().build(x, y, scope)`. -pub fn not_equal< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn not_equal, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { NotEqual::new().build(x, y, scope) } + /// Builder for the `NthElement` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct NthElement { @@ -62560,6 +76333,12 @@ pub struct NthElement { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'NthElement' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct NthElementInst { + /// An instance of a fully built NthElement Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl NthElement { /// Creates a new `NthElement`. @@ -62586,52 +76365,67 @@ impl NthElement { } /// Builds the `NthElement` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - n: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), n.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - n: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, n: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("NthElement", |nd| { nd.add_input(input); nd.add_input(n); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.reverse { - nd.set_attr_bool("reverse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.reverse { + nd.set_attr_bool("reverse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `NthElement` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), n.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, n: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("NthElement", |nd| { + nd.add_input(input); + nd.add_input(n); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.reverse { + nd.set_attr_bool("reverse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(NthElementInst{op}) + } +} +impl NthElementInst { + /// Returns the 'values' output of this 'NthElement' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for NthElementInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `NthElement::new().build(input, n, scope)`. -pub fn nth_element< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - n: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn nth_element, O1: ::std::convert::Into>(input: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { NthElement::new().build(input, n, scope) } + /// Builder for the `OneHot` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OneHot { @@ -62640,6 +76434,12 @@ pub struct OneHot { TI: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'OneHot' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OneHotInst { + /// An instance of a fully built OneHot Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OneHot { /// Creates a new `OneHot`. @@ -62672,36 +76472,10 @@ impl OneHot { } /// Builds the `OneHot` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - indices: O0, - depth: O1, - on_value: O2, - off_value: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - indices.into(), - depth.into(), - on_value.into(), - off_value.into(), - scope, - ) - } - - fn build_impl( - &self, - indices: crate::Output, - depth: crate::Output, - on_value: crate::Output, - off_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, indices: O0, depth: O1, on_value: O2, off_value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(indices.into(), depth.into(), on_value.into(), off_value.into(), scope) + } + fn build_impl(&self, indices: crate::Output, depth: crate::Output, on_value: crate::Output, off_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OneHot", |nd| { nd.add_input(indices); nd.add_input(depth); @@ -62710,35 +76484,65 @@ impl OneHot { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.axis { - nd.set_attr_int("axis", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.TI { - nd.set_attr_type("TI", *value)?; - } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.TI { + nd.set_attr_type("TI", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OneHot` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, indices: O0, depth: O1, on_value: O2, off_value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), depth.into(), on_value.into(), off_value.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, depth: crate::Output, on_value: crate::Output, off_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OneHot", |nd| { + nd.add_input(indices); + nd.add_input(depth); + nd.add_input(on_value); + nd.add_input(off_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.TI { + nd.set_attr_type("TI", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OneHotInst{op}) + } +} +impl OneHotInst { + /// Returns the 'output' output of this 'OneHot' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OneHotInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OneHot::new().build(indices, depth, on_value, off_value, scope)`. -pub fn one_hot< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - indices: O0, - depth: O1, - on_value: O2, - off_value: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn one_hot, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(indices: O0, depth: O1, on_value: O2, off_value: O3, scope: &mut crate::Scope) -> crate::Result { OneHot::new().build(indices, depth, on_value, off_value, scope) } + /// Builder for the `OneShotIterator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OneShotIterator { @@ -62749,6 +76553,12 @@ pub struct OneShotIterator { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OneShotIterator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OneShotIteratorInst { + /// An instance of a fully built OneShotIterator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OneShotIterator { /// Creates a new `OneShotIterator`. @@ -62757,46 +76567,31 @@ impl OneShotIterator { } /// Sets the `dataset_factory` attribute. - pub fn dataset_factory>( - mut self, - value: ArgType, - ) -> Self { + pub fn dataset_factory>(mut self, value: ArgType) -> Self { self.dataset_factory = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -62808,45 +76603,93 @@ impl OneShotIterator { } /// Builds the `OneShotIterator` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OneShotIterator", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dataset_factory { - nd.set_attr_string("dataset_factory", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.dataset_factory { + nd.set_attr_string("dataset_factory", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OneShotIterator` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OneShotIterator", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dataset_factory { + nd.set_attr_string("dataset_factory", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OneShotIteratorInst{op}) + } +} +impl OneShotIteratorInst { + /// Returns the 'handle' output of this 'OneShotIterator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OneShotIteratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OneShotIterator::new().build(scope)`. -pub fn one_shot_iterator(scope: &mut crate::Scope) -> crate::Result { +pub fn one_shot_iterator<>(scope: &mut crate::Scope) -> crate::Result { OneShotIterator::new().build(scope) } + /// Builder for the `OnesLike` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OnesLike { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'OnesLike' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OnesLikeInst { + /// An instance of a fully built OnesLike Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OnesLike { /// Creates a new `OnesLike`. @@ -62867,39 +76710,59 @@ impl OnesLike { } /// Builds the `OnesLike` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OnesLike", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OnesLike` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OnesLike", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OnesLikeInst{op}) + } +} +impl OnesLikeInst { + /// Returns the 'y' output of this 'OnesLike' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OnesLikeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OnesLike::new().build(x, scope)`. -pub fn ones_like>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ones_like>(x: O0, scope: &mut crate::Scope) -> crate::Result { OnesLike::new().build(x, scope) } + /// Builder for the `OptimizeDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OptimizeDataset { @@ -62908,6 +76771,12 @@ pub struct OptimizeDataset { optimization_configs: ::std::option::Option<::std::vec::Vec<::std::string::String>>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OptimizeDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OptimizeDatasetInst { + /// An instance of a fully built OptimizeDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OptimizeDataset { /// Creates a new `OptimizeDataset`. @@ -62916,30 +76785,19 @@ impl OptimizeDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `optimization_configs` attribute. - pub fn optimization_configs< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn optimization_configs>>(mut self, value: ArgType) -> Self { self.optimization_configs = ::std::option::Option::Some(value.into()); self } @@ -62951,55 +76809,73 @@ impl OptimizeDataset { } /// Builds the `OptimizeDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - optimizations: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, optimizations: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), optimizations.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - optimizations: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, optimizations: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OptimizeDataset", |nd| { nd.add_input(input_dataset); nd.add_input(optimizations); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.optimization_configs { - nd.set_attr_string_list("optimization_configs", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.optimization_configs { + nd.set_attr_string_list("optimization_configs", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OptimizeDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, optimizations: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), optimizations.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, optimizations: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OptimizeDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(optimizations); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.optimization_configs { + nd.set_attr_string_list("optimization_configs", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OptimizeDatasetInst{op}) + } +} +impl OptimizeDatasetInst { + /// Returns the 'handle' output of this 'OptimizeDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OptimizeDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OptimizeDataset::new().build(input_dataset, optimizations, scope)`. -pub fn optimize_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - optimizations: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn optimize_dataset, O1: ::std::convert::Into>(input_dataset: O0, optimizations: O1, scope: &mut crate::Scope) -> crate::Result { OptimizeDataset::new().build(input_dataset, optimizations, scope) } + /// Builder for the `OptimizeDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OptimizeDatasetV2 { @@ -63008,6 +76884,12 @@ pub struct OptimizeDatasetV2 { optimization_configs: ::std::option::Option<::std::vec::Vec<::std::string::String>>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OptimizeDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OptimizeDatasetV2Inst { + /// An instance of a fully built OptimizeDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OptimizeDatasetV2 { /// Creates a new `OptimizeDatasetV2`. @@ -63016,30 +76898,19 @@ impl OptimizeDatasetV2 { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `optimization_configs` attribute. - pub fn optimization_configs< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn optimization_configs>>(mut self, value: ArgType) -> Self { self.optimization_configs = ::std::option::Option::Some(value.into()); self } @@ -63051,36 +76922,10 @@ impl OptimizeDatasetV2 { } /// Builds the `OptimizeDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - optimizations_enabled: O1, - optimizations_disabled: O2, - optimizations_default: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - optimizations_enabled.into(), - optimizations_disabled.into(), - optimizations_default.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - optimizations_enabled: crate::Output, - optimizations_disabled: crate::Output, - optimizations_default: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, optimizations_enabled: O1, optimizations_disabled: O2, optimizations_default: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), optimizations_enabled.into(), optimizations_disabled.into(), optimizations_default.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, optimizations_enabled: crate::Output, optimizations_disabled: crate::Output, optimizations_default: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OptimizeDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(optimizations_enabled); @@ -63089,47 +76934,77 @@ impl OptimizeDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.optimization_configs { - nd.set_attr_string_list("optimization_configs", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.optimization_configs { + nd.set_attr_string_list("optimization_configs", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OptimizeDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, optimizations_enabled: O1, optimizations_disabled: O2, optimizations_default: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), optimizations_enabled.into(), optimizations_disabled.into(), optimizations_default.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, optimizations_enabled: crate::Output, optimizations_disabled: crate::Output, optimizations_default: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OptimizeDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(optimizations_enabled); + nd.add_input(optimizations_disabled); + nd.add_input(optimizations_default); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.optimization_configs { + nd.set_attr_string_list("optimization_configs", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OptimizeDatasetV2Inst{op}) + } +} +impl OptimizeDatasetV2Inst { + /// Returns the 'handle' output of this 'OptimizeDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OptimizeDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OptimizeDatasetV2::new().build(input_dataset, optimizations_enabled, optimizations_disabled, optimizations_default, scope)`. -pub fn optimize_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - optimizations_enabled: O1, - optimizations_disabled: O2, - optimizations_default: O3, - scope: &mut crate::Scope, -) -> crate::Result { - OptimizeDatasetV2::new().build( - input_dataset, - optimizations_enabled, - optimizations_disabled, - optimizations_default, - scope, - ) +pub fn optimize_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, optimizations_enabled: O1, optimizations_disabled: O2, optimizations_default: O3, scope: &mut crate::Scope) -> crate::Result { + OptimizeDatasetV2::new().build(input_dataset, optimizations_enabled, optimizations_disabled, optimizations_default, scope) } + /// Builder for the `OptionalFromValue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OptionalFromValue { Toutput_types: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OptionalFromValue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OptionalFromValueInst { + /// An instance of a fully built OptionalFromValue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OptionalFromValue { /// Creates a new `OptionalFromValue`. @@ -63138,10 +77013,7 @@ impl OptionalFromValue { } /// Sets the `Toutput_types` attribute. - pub fn Toutput_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput_types>>(mut self, value: ArgType) -> Self { self.Toutput_types = ::std::option::Option::Some(value.into()); self } @@ -63153,39 +77025,59 @@ impl OptionalFromValue { } /// Builds the `OptionalFromValue` operation. - pub fn build>( - &self, - components: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, components: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(components.into(), scope) } - - fn build_impl( - &self, - components: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OptionalFromValue", |nd| { nd.add_input(components); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Toutput_types { - nd.set_attr_type_list("Toutput_types", value)?; - } + if let ::std::option::Option::Some(value) = &self.Toutput_types { + nd.set_attr_type_list("Toutput_types", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OptionalFromValue` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, components: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(components.into(), scope) + } + fn build_instance_impl(&self, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OptionalFromValue", |nd| { + nd.add_input(components); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Toutput_types { + nd.set_attr_type_list("Toutput_types", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OptionalFromValueInst{op}) + } +} +impl OptionalFromValueInst { + /// Returns the 'optional' output of this 'OptionalFromValue' operation. + pub fn optional(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OptionalFromValueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OptionalFromValue::new().build(components, scope)`. -pub fn optional_from_value>( - components: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn optional_from_value>(components: O0, scope: &mut crate::Scope) -> crate::Result { OptionalFromValue::new().build(components, scope) } + /// Builder for the `OptionalGetValue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OptionalGetValue { @@ -63193,6 +77085,12 @@ pub struct OptionalGetValue { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OptionalGetValue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OptionalGetValueInst { + /// An instance of a fully built OptionalGetValue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OptionalGetValue { /// Creates a new `OptionalGetValue`. @@ -63201,19 +77099,13 @@ impl OptionalGetValue { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -63225,47 +77117,76 @@ impl OptionalGetValue { } /// Builds the `OptionalGetValue` operation. - pub fn build>( - &self, - optional: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, optional: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(optional.into(), scope) } - - fn build_impl( - &self, - optional: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, optional: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OptionalGetValue", |nd| { nd.add_input(optional); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OptionalGetValue` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, optional: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(optional.into(), scope) + } + fn build_instance_impl(&self, optional: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OptionalGetValue", |nd| { + nd.add_input(optional); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OptionalGetValueInst{op}) + } +} +impl OptionalGetValueInst { + /// Returns the 'components' output of this 'OptionalGetValue' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OptionalGetValueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OptionalGetValue::new().build(optional, scope)`. -pub fn optional_get_value>( - optional: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn optional_get_value>(optional: O0, scope: &mut crate::Scope) -> crate::Result { OptionalGetValue::new().build(optional, scope) } + /// Builder for the `OptionalHasValue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OptionalHasValue { control_inputs: ::std::vec::Vec, } +/// An instance of 'OptionalHasValue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OptionalHasValueInst { + /// An instance of a fully built OptionalHasValue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OptionalHasValue { /// Creates a new `OptionalHasValue`. @@ -63280,19 +77201,10 @@ impl OptionalHasValue { } /// Builds the `OptionalHasValue` operation. - pub fn build>( - &self, - optional: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, optional: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(optional.into(), scope) } - - fn build_impl( - &self, - optional: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, optional: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OptionalHasValue", |nd| { nd.add_input(optional); for op in &self.control_inputs { @@ -63301,20 +77213,52 @@ impl OptionalHasValue { ::std::result::Result::Ok(()) }) } -} + /// Builds the `OptionalHasValue` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, optional: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(optional.into(), scope) + } + fn build_instance_impl(&self, optional: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OptionalHasValue", |nd| { + nd.add_input(optional); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(OptionalHasValueInst{op}) + } +} +impl OptionalHasValueInst { + /// Returns the 'has_value' output of this 'OptionalHasValue' operation. + pub fn has_value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OptionalHasValueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OptionalHasValue::new().build(optional, scope)`. -pub fn optional_has_value>( - optional: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn optional_has_value>(optional: O0, scope: &mut crate::Scope) -> crate::Result { OptionalHasValue::new().build(optional, scope) } + /// Builder for the `OptionalNone` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OptionalNone { control_inputs: ::std::vec::Vec, } +/// An instance of 'OptionalNone' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OptionalNoneInst { + /// An instance of a fully built OptionalNone Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OptionalNone { /// Creates a new `OptionalNone`. @@ -63329,10 +77273,9 @@ impl OptionalNone { } /// Builds the `OptionalNone` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OptionalNone", |nd| { for op in &self.control_inputs { @@ -63341,12 +77284,40 @@ impl OptionalNone { ::std::result::Result::Ok(()) }) } -} + /// Builds the `OptionalNone` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OptionalNone", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(OptionalNoneInst{op}) + } +} +impl OptionalNoneInst { + /// Returns the 'optional' output of this 'OptionalNone' operation. + pub fn optional(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OptionalNoneInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OptionalNone::new().build(scope)`. -pub fn optional_none(scope: &mut crate::Scope) -> crate::Result { +pub fn optional_none<>(scope: &mut crate::Scope) -> crate::Result { OptionalNone::new().build(scope) } + /// Builder for the `OptionsDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OptionsDataset { @@ -63356,6 +77327,12 @@ pub struct OptionsDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OptionsDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OptionsDatasetInst { + /// An instance of a fully built OptionsDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OptionsDataset { /// Creates a new `OptionsDataset`. @@ -63364,37 +77341,25 @@ impl OptionsDataset { } /// Sets the `serialized_options` attribute. - pub fn serialized_options>( - mut self, - value: ArgType, - ) -> Self { + pub fn serialized_options>(mut self, value: ArgType) -> Self { self.serialized_options = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -63406,48 +77371,77 @@ impl OptionsDataset { } /// Builds the `OptionsDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OptionsDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.serialized_options { - nd.set_attr_string("serialized_options", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.serialized_options { + nd.set_attr_string("serialized_options", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OptionsDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OptionsDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.serialized_options { + nd.set_attr_string("serialized_options", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OptionsDatasetInst{op}) + } +} +impl OptionsDatasetInst { + /// Returns the 'handle' output of this 'OptionsDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OptionsDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OptionsDataset::new().build(input_dataset, scope)`. -pub fn options_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn options_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { OptionsDataset::new().build(input_dataset, scope) } + /// Builder for the `OrderedMapClear` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OrderedMapClear { @@ -63458,6 +77452,12 @@ pub struct OrderedMapClear { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OrderedMapClear' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OrderedMapClearInst { + /// An instance of a fully built OrderedMapClear Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OrderedMapClear { /// Creates a new `OrderedMapClear`. @@ -63478,28 +77478,19 @@ impl OrderedMapClear { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -63511,39 +77502,74 @@ impl OrderedMapClear { } /// Builds the `OrderedMapClear` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OrderedMapClear", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OrderedMapClear` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OrderedMapClear", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OrderedMapClearInst{op}) + } +} +impl OrderedMapClearInst { +} +impl Into for OrderedMapClearInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OrderedMapClear::new().build(scope)`. -pub fn ordered_map_clear(scope: &mut crate::Scope) -> crate::Result { +pub fn ordered_map_clear<>(scope: &mut crate::Scope) -> crate::Result { OrderedMapClear::new().build(scope) } + /// Builder for the `OrderedMapIncompleteSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OrderedMapIncompleteSize { @@ -63554,6 +77580,12 @@ pub struct OrderedMapIncompleteSize { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OrderedMapIncompleteSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OrderedMapIncompleteSizeInst { + /// An instance of a fully built OrderedMapIncompleteSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OrderedMapIncompleteSize { /// Creates a new `OrderedMapIncompleteSize`. @@ -63574,28 +77606,19 @@ impl OrderedMapIncompleteSize { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -63607,39 +77630,81 @@ impl OrderedMapIncompleteSize { } /// Builds the `OrderedMapIncompleteSize` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OrderedMapIncompleteSize", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OrderedMapIncompleteSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OrderedMapIncompleteSize", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OrderedMapIncompleteSizeInst{op}) + } +} +impl OrderedMapIncompleteSizeInst { + /// Returns the 'size' output of this 'OrderedMapIncompleteSize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OrderedMapIncompleteSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OrderedMapIncompleteSize::new().build(scope)`. -pub fn ordered_map_incomplete_size(scope: &mut crate::Scope) -> crate::Result { +pub fn ordered_map_incomplete_size<>(scope: &mut crate::Scope) -> crate::Result { OrderedMapIncompleteSize::new().build(scope) } + /// Builder for the `OrderedMapPeek` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OrderedMapPeek { @@ -63650,6 +77715,12 @@ pub struct OrderedMapPeek { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OrderedMapPeek' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OrderedMapPeekInst { + /// An instance of a fully built OrderedMapPeek Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OrderedMapPeek { /// Creates a new `OrderedMapPeek`. @@ -63670,28 +77741,19 @@ impl OrderedMapPeek { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -63703,61 +77765,85 @@ impl OrderedMapPeek { } /// Builds the `OrderedMapPeek` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - key: O0, - indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(key.into(), indices.into(), scope) } - - fn build_impl( - &self, - key: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, key: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OrderedMapPeek", |nd| { nd.add_input(key); nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OrderedMapPeek` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(key.into(), indices.into(), scope) + } + fn build_instance_impl(&self, key: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OrderedMapPeek", |nd| { + nd.add_input(key); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OrderedMapPeekInst{op}) + } +} +impl OrderedMapPeekInst { + /// Returns the 'values' output of this 'OrderedMapPeek' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OrderedMapPeekInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OrderedMapPeek::new().build(key, indices, scope)`. -pub fn ordered_map_peek< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - key: O0, - indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ordered_map_peek, O1: ::std::convert::Into>(key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { OrderedMapPeek::new().build(key, indices, scope) } + /// Builder for the `OrderedMapSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OrderedMapSize { @@ -63768,6 +77854,12 @@ pub struct OrderedMapSize { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OrderedMapSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OrderedMapSizeInst { + /// An instance of a fully built OrderedMapSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OrderedMapSize { /// Creates a new `OrderedMapSize`. @@ -63788,28 +77880,19 @@ impl OrderedMapSize { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -63821,39 +77904,81 @@ impl OrderedMapSize { } /// Builds the `OrderedMapSize` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OrderedMapSize", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OrderedMapSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OrderedMapSize", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OrderedMapSizeInst{op}) + } +} +impl OrderedMapSizeInst { + /// Returns the 'size' output of this 'OrderedMapSize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OrderedMapSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OrderedMapSize::new().build(scope)`. -pub fn ordered_map_size(scope: &mut crate::Scope) -> crate::Result { +pub fn ordered_map_size<>(scope: &mut crate::Scope) -> crate::Result { OrderedMapSize::new().build(scope) } + /// Builder for the `OrderedMapStage` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OrderedMapStage { @@ -63865,6 +77990,12 @@ pub struct OrderedMapStage { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OrderedMapStage' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OrderedMapStageInst { + /// An instance of a fully built OrderedMapStage Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OrderedMapStage { /// Creates a new `OrderedMapStage`. @@ -63885,37 +78016,25 @@ impl OrderedMapStage { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `fake_dtypes` attribute. - pub fn fake_dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn fake_dtypes>>(mut self, value: ArgType) -> Self { self.fake_dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -63927,27 +78046,10 @@ impl OrderedMapStage { } /// Builds the `OrderedMapStage` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - key: O0, - indices: O1, - values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, key: O0, indices: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(key.into(), indices.into(), values.into(), scope) } - - fn build_impl( - &self, - key: crate::Output, - indices: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, key: crate::Output, indices: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OrderedMapStage", |nd| { nd.add_input(key); nd.add_input(indices); @@ -63955,42 +78057,75 @@ impl OrderedMapStage { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.fake_dtypes { - nd.set_attr_type_list("fake_dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.fake_dtypes { + nd.set_attr_type_list("fake_dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OrderedMapStage` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, key: O0, indices: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(key.into(), indices.into(), values.into(), scope) + } + fn build_instance_impl(&self, key: crate::Output, indices: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OrderedMapStage", |nd| { + nd.add_input(key); + nd.add_input(indices); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.fake_dtypes { + nd.set_attr_type_list("fake_dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OrderedMapStageInst{op}) + } +} +impl OrderedMapStageInst { +} +impl Into for OrderedMapStageInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OrderedMapStage::new().build(key, indices, values, scope)`. -pub fn ordered_map_stage< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - key: O0, - indices: O1, - values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ordered_map_stage, O1: ::std::convert::Into, O2: ::std::convert::Into>(key: O0, indices: O1, values: O2, scope: &mut crate::Scope) -> crate::Result { OrderedMapStage::new().build(key, indices, values, scope) } + /// Builder for the `OrderedMapUnstage` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OrderedMapUnstage { @@ -64001,6 +78136,12 @@ pub struct OrderedMapUnstage { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OrderedMapUnstage' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OrderedMapUnstageInst { + /// An instance of a fully built OrderedMapUnstage Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OrderedMapUnstage { /// Creates a new `OrderedMapUnstage`. @@ -64021,28 +78162,19 @@ impl OrderedMapUnstage { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -64054,61 +78186,85 @@ impl OrderedMapUnstage { } /// Builds the `OrderedMapUnstage` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - key: O0, - indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(key.into(), indices.into(), scope) } - - fn build_impl( - &self, - key: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, key: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OrderedMapUnstage", |nd| { nd.add_input(key); nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OrderedMapUnstage` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(key.into(), indices.into(), scope) + } + fn build_instance_impl(&self, key: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OrderedMapUnstage", |nd| { + nd.add_input(key); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OrderedMapUnstageInst{op}) + } +} +impl OrderedMapUnstageInst { + /// Returns the 'values' output of this 'OrderedMapUnstage' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OrderedMapUnstageInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OrderedMapUnstage::new().build(key, indices, scope)`. -pub fn ordered_map_unstage< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - key: O0, - indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ordered_map_unstage, O1: ::std::convert::Into>(key: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { OrderedMapUnstage::new().build(key, indices, scope) } + /// Builder for the `OrderedMapUnstageNoKey` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OrderedMapUnstageNoKey { @@ -64119,6 +78275,12 @@ pub struct OrderedMapUnstageNoKey { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OrderedMapUnstageNoKey' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OrderedMapUnstageNoKeyInst { + /// An instance of a fully built OrderedMapUnstageNoKey Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OrderedMapUnstageNoKey { /// Creates a new `OrderedMapUnstageNoKey`. @@ -64139,28 +78301,19 @@ impl OrderedMapUnstageNoKey { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -64172,51 +78325,90 @@ impl OrderedMapUnstageNoKey { } /// Builds the `OrderedMapUnstageNoKey` operation. - pub fn build>( - &self, - indices: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, indices: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(indices.into(), scope) } - - fn build_impl( - &self, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OrderedMapUnstageNoKey", |nd| { nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OrderedMapUnstageNoKey` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, indices: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OrderedMapUnstageNoKey", |nd| { + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OrderedMapUnstageNoKeyInst{op}) + } +} +impl OrderedMapUnstageNoKeyInst { + /// Returns the 'key' output of this 'OrderedMapUnstageNoKey' operation. + pub fn key(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'OrderedMapUnstageNoKey' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for OrderedMapUnstageNoKeyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OrderedMapUnstageNoKey::new().build(indices, scope)`. -pub fn ordered_map_unstage_no_key>( - indices: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ordered_map_unstage_no_key>(indices: O0, scope: &mut crate::Scope) -> crate::Result { OrderedMapUnstageNoKey::new().build(indices, scope) } + /// Builder for the `OutfeedDequeue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OutfeedDequeue { @@ -64225,6 +78417,12 @@ pub struct OutfeedDequeue { device_ordinal: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'OutfeedDequeue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OutfeedDequeueInst { + /// An instance of a fully built OutfeedDequeue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OutfeedDequeue { /// Creates a new `OutfeedDequeue`. @@ -64257,33 +78455,69 @@ impl OutfeedDequeue { } /// Builds the `OutfeedDequeue` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OutfeedDequeue", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.device_ordinal { - nd.set_attr_int("device_ordinal", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OutfeedDequeue` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OutfeedDequeue", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OutfeedDequeueInst{op}) + } +} +impl OutfeedDequeueInst { + /// Returns the 'output' output of this 'OutfeedDequeue' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OutfeedDequeueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OutfeedDequeue::new().build(scope)`. -pub fn outfeed_dequeue(scope: &mut crate::Scope) -> crate::Result { +pub fn outfeed_dequeue<>(scope: &mut crate::Scope) -> crate::Result { OutfeedDequeue::new().build(scope) } + /// Builder for the `OutfeedDequeueTuple` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OutfeedDequeueTuple { @@ -64292,6 +78526,12 @@ pub struct OutfeedDequeueTuple { device_ordinal: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'OutfeedDequeueTuple' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OutfeedDequeueTupleInst { + /// An instance of a fully built OutfeedDequeueTuple Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OutfeedDequeueTuple { /// Creates a new `OutfeedDequeueTuple`. @@ -64300,19 +78540,13 @@ impl OutfeedDequeueTuple { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -64330,33 +78564,69 @@ impl OutfeedDequeueTuple { } /// Builds the `OutfeedDequeueTuple` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OutfeedDequeueTuple", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.device_ordinal { - nd.set_attr_int("device_ordinal", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OutfeedDequeueTuple` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OutfeedDequeueTuple", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_ordinal { + nd.set_attr_int("device_ordinal", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OutfeedDequeueTupleInst{op}) + } +} +impl OutfeedDequeueTupleInst { + /// Returns the 'outputs' output of this 'OutfeedDequeueTuple' operation. + pub fn outputs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OutfeedDequeueTupleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OutfeedDequeueTuple::new().build(scope)`. -pub fn outfeed_dequeue_tuple(scope: &mut crate::Scope) -> crate::Result { +pub fn outfeed_dequeue_tuple<>(scope: &mut crate::Scope) -> crate::Result { OutfeedDequeueTuple::new().build(scope) } + /// Builder for the `OutfeedDequeueTupleV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OutfeedDequeueTupleV2 { @@ -64364,6 +78634,12 @@ pub struct OutfeedDequeueTupleV2 { shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OutfeedDequeueTupleV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OutfeedDequeueTupleV2Inst { + /// An instance of a fully built OutfeedDequeueTupleV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OutfeedDequeueTupleV2 { /// Creates a new `OutfeedDequeueTupleV2`. @@ -64372,19 +78648,13 @@ impl OutfeedDequeueTupleV2 { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -64396,42 +78666,65 @@ impl OutfeedDequeueTupleV2 { } /// Builds the `OutfeedDequeueTupleV2` operation. - pub fn build>( - &self, - device_ordinal: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, device_ordinal: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(device_ordinal.into(), scope) } - - fn build_impl( - &self, - device_ordinal: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, device_ordinal: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OutfeedDequeueTupleV2", |nd| { nd.add_input(device_ordinal); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OutfeedDequeueTupleV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, device_ordinal: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(device_ordinal.into(), scope) + } + fn build_instance_impl(&self, device_ordinal: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OutfeedDequeueTupleV2", |nd| { + nd.add_input(device_ordinal); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OutfeedDequeueTupleV2Inst{op}) + } +} +impl OutfeedDequeueTupleV2Inst { + /// Returns the 'outputs' output of this 'OutfeedDequeueTupleV2' operation. + pub fn outputs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OutfeedDequeueTupleV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OutfeedDequeueTupleV2::new().build(device_ordinal, scope)`. -pub fn outfeed_dequeue_tuple_v2>( - device_ordinal: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn outfeed_dequeue_tuple_v2>(device_ordinal: O0, scope: &mut crate::Scope) -> crate::Result { OutfeedDequeueTupleV2::new().build(device_ordinal, scope) } + /// Builder for the `OutfeedDequeueV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OutfeedDequeueV2 { @@ -64439,6 +78732,12 @@ pub struct OutfeedDequeueV2 { shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'OutfeedDequeueV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OutfeedDequeueV2Inst { + /// An instance of a fully built OutfeedDequeueV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OutfeedDequeueV2 { /// Creates a new `OutfeedDequeueV2`. @@ -64465,48 +78764,77 @@ impl OutfeedDequeueV2 { } /// Builds the `OutfeedDequeueV2` operation. - pub fn build>( - &self, - device_ordinal: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, device_ordinal: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(device_ordinal.into(), scope) } - - fn build_impl( - &self, - device_ordinal: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, device_ordinal: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OutfeedDequeueV2", |nd| { nd.add_input(device_ordinal); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OutfeedDequeueV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, device_ordinal: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(device_ordinal.into(), scope) + } + fn build_instance_impl(&self, device_ordinal: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OutfeedDequeueV2", |nd| { + nd.add_input(device_ordinal); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OutfeedDequeueV2Inst{op}) + } +} +impl OutfeedDequeueV2Inst { + /// Returns the 'output' output of this 'OutfeedDequeueV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for OutfeedDequeueV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OutfeedDequeueV2::new().build(device_ordinal, scope)`. -pub fn outfeed_dequeue_v2>( - device_ordinal: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn outfeed_dequeue_v2>(device_ordinal: O0, scope: &mut crate::Scope) -> crate::Result { OutfeedDequeueV2::new().build(device_ordinal, scope) } + /// Builder for the `OutfeedEnqueue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OutfeedEnqueue { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'OutfeedEnqueue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OutfeedEnqueueInst { + /// An instance of a fully built OutfeedEnqueue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OutfeedEnqueue { /// Creates a new `OutfeedEnqueue`. @@ -64527,45 +78855,64 @@ impl OutfeedEnqueue { } /// Builds the `OutfeedEnqueue` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OutfeedEnqueue", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OutfeedEnqueue` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OutfeedEnqueue", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OutfeedEnqueueInst{op}) + } +} +impl OutfeedEnqueueInst { +} +impl Into for OutfeedEnqueueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OutfeedEnqueue::new().build(input, scope)`. -pub fn outfeed_enqueue>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn outfeed_enqueue>(input: O0, scope: &mut crate::Scope) -> crate::Result { OutfeedEnqueue::new().build(input, scope) } + /// Builder for the `OutfeedEnqueueTuple` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct OutfeedEnqueueTuple { dtypes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'OutfeedEnqueueTuple' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct OutfeedEnqueueTupleInst { + /// An instance of a fully built OutfeedEnqueueTuple Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl OutfeedEnqueueTuple { /// Creates a new `OutfeedEnqueueTuple`. @@ -64574,10 +78921,7 @@ impl OutfeedEnqueueTuple { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } @@ -64589,39 +78933,52 @@ impl OutfeedEnqueueTuple { } /// Builds the `OutfeedEnqueueTuple` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("OutfeedEnqueueTuple", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `OutfeedEnqueueTuple` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("OutfeedEnqueueTuple", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(OutfeedEnqueueTupleInst{op}) + } +} +impl OutfeedEnqueueTupleInst { +} +impl Into for OutfeedEnqueueTupleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `OutfeedEnqueueTuple::new().build(inputs, scope)`. -pub fn outfeed_enqueue_tuple>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn outfeed_enqueue_tuple>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { OutfeedEnqueueTuple::new().build(inputs, scope) } + /// Builder for the `Pack` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Pack { @@ -64630,6 +78987,12 @@ pub struct Pack { axis: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Pack' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PackInst { + /// An instance of a fully built Pack Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Pack { /// Creates a new `Pack`. @@ -64662,45 +79025,71 @@ impl Pack { } /// Builds the `Pack` operation. - pub fn build>( - &self, - values: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, values: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(values.into(), scope) } - - fn build_impl( - &self, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Pack", |nd| { nd.add_input(values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.axis { - nd.set_attr_int("axis", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Pack` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, values: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(values.into(), scope) + } + fn build_instance_impl(&self, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Pack", |nd| { + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PackInst{op}) + } +} +impl PackInst { + /// Returns the 'output' output of this 'Pack' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PackInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Pack::new().build(values, scope)`. -pub fn pack>( - values: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn pack>(values: O0, scope: &mut crate::Scope) -> crate::Result { Pack::new().build(values, scope) } + /// Builder for the `Pad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Pad { @@ -64708,6 +79097,12 @@ pub struct Pad { Tpaddings: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Pad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PadInst { + /// An instance of a fully built Pad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Pad { /// Creates a new `Pad`. @@ -64722,10 +79117,7 @@ impl Pad { } /// Sets the `Tpaddings` attribute. - pub fn Tpaddings>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tpaddings>(mut self, value: ArgType) -> Self { self.Tpaddings = ::std::option::Option::Some(value.into()); self } @@ -64737,49 +79129,67 @@ impl Pad { } /// Builds the `Pad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - paddings: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), paddings.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - paddings: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, paddings: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Pad", |nd| { nd.add_input(input); nd.add_input(paddings); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tpaddings { - nd.set_attr_type("Tpaddings", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Pad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), paddings.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, paddings: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Pad", |nd| { + nd.add_input(input); + nd.add_input(paddings); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PadInst{op}) + } +} +impl PadInst { + /// Returns the 'output' output of this 'Pad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PadInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Pad::new().build(input, paddings, scope)`. -pub fn pad, O1: ::std::convert::Into>( - input: O0, - paddings: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn pad, O1: ::std::convert::Into>(input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { Pad::new().build(input, paddings, scope) } + /// Builder for the `PadV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PadV2 { @@ -64787,6 +79197,12 @@ pub struct PadV2 { Tpaddings: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'PadV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PadV2Inst { + /// An instance of a fully built PadV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PadV2 { /// Creates a new `PadV2`. @@ -64801,10 +79217,7 @@ impl PadV2 { } /// Sets the `Tpaddings` attribute. - pub fn Tpaddings>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tpaddings>(mut self, value: ArgType) -> Self { self.Tpaddings = ::std::option::Option::Some(value.into()); self } @@ -64816,27 +79229,10 @@ impl PadV2 { } /// Builds the `PadV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - paddings: O1, - constant_values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, paddings: O1, constant_values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), paddings.into(), constant_values.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - paddings: crate::Output, - constant_values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, paddings: crate::Output, constant_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PadV2", |nd| { nd.add_input(input); nd.add_input(paddings); @@ -64844,30 +79240,58 @@ impl PadV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tpaddings { - nd.set_attr_type("Tpaddings", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PadV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, paddings: O1, constant_values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), paddings.into(), constant_values.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, paddings: crate::Output, constant_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PadV2", |nd| { + nd.add_input(input); + nd.add_input(paddings); + nd.add_input(constant_values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PadV2Inst{op}) + } +} +impl PadV2Inst { + /// Returns the 'output' output of this 'PadV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PadV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PadV2::new().build(input, paddings, constant_values, scope)`. -pub fn pad_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - paddings: O1, - constant_values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn pad_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, paddings: O1, constant_values: O2, scope: &mut crate::Scope) -> crate::Result { PadV2::new().build(input, paddings, constant_values, scope) } + /// Builder for the `PaddedBatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PaddedBatchDataset { @@ -64877,6 +79301,12 @@ pub struct PaddedBatchDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PaddedBatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PaddedBatchDatasetInst { + /// An instance of a fully built PaddedBatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PaddedBatchDataset { /// Creates a new `PaddedBatchDataset`. @@ -64885,19 +79315,13 @@ impl PaddedBatchDataset { } /// Sets the `Toutput_types` attribute. - pub fn Toutput_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput_types>>(mut self, value: ArgType) -> Self { self.Toutput_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -64909,10 +79333,7 @@ impl PaddedBatchDataset { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -64924,36 +79345,10 @@ impl PaddedBatchDataset { } /// Builds the `PaddedBatchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - batch_size: O1, - padded_shapes: O2, - padding_values: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - batch_size.into(), - padded_shapes.into(), - padding_values.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - batch_size: crate::Output, - padded_shapes: crate::Output, - padding_values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, padded_shapes: O2, padding_values: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), batch_size.into(), padded_shapes.into(), padding_values.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, padded_shapes: crate::Output, padding_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PaddedBatchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(batch_size); @@ -64962,44 +79357,71 @@ impl PaddedBatchDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Toutput_types { - nd.set_attr_type_list("Toutput_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.Toutput_types { + nd.set_attr_type_list("Toutput_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PaddedBatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, padded_shapes: O2, padding_values: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), batch_size.into(), padded_shapes.into(), padding_values.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, padded_shapes: crate::Output, padding_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PaddedBatchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(batch_size); + nd.add_input(padded_shapes); + nd.add_input(padding_values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Toutput_types { + nd.set_attr_type_list("Toutput_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PaddedBatchDatasetInst{op}) + } +} +impl PaddedBatchDatasetInst { + /// Returns the 'handle' output of this 'PaddedBatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PaddedBatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PaddedBatchDataset::new().build(input_dataset, batch_size, padded_shapes, padding_values, scope)`. -pub fn padded_batch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - batch_size: O1, - padded_shapes: O2, - padding_values: O3, - scope: &mut crate::Scope, -) -> crate::Result { - PaddedBatchDataset::new().build( - input_dataset, - batch_size, - padded_shapes, - padding_values, - scope, - ) +pub fn padded_batch_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, batch_size: O1, padded_shapes: O2, padding_values: O3, scope: &mut crate::Scope) -> crate::Result { + PaddedBatchDataset::new().build(input_dataset, batch_size, padded_shapes, padding_values, scope) } + /// Builder for the `PaddedBatchDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PaddedBatchDatasetV2 { @@ -65010,6 +79432,12 @@ pub struct PaddedBatchDatasetV2 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PaddedBatchDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PaddedBatchDatasetV2Inst { + /// An instance of a fully built PaddedBatchDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PaddedBatchDatasetV2 { /// Creates a new `PaddedBatchDatasetV2`. @@ -65024,19 +79452,13 @@ impl PaddedBatchDatasetV2 { } /// Sets the `Toutput_types` attribute. - pub fn Toutput_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput_types>>(mut self, value: ArgType) -> Self { self.Toutput_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -65048,10 +79470,7 @@ impl PaddedBatchDatasetV2 { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -65063,40 +79482,10 @@ impl PaddedBatchDatasetV2 { } /// Builds the `PaddedBatchDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input_dataset: O0, - batch_size: O1, - padded_shapes: O2, - padding_values: O3, - drop_remainder: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - batch_size.into(), - padded_shapes.into(), - padding_values.into(), - drop_remainder.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - batch_size: crate::Output, - padded_shapes: crate::Output, - padding_values: crate::Output, - drop_remainder: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, padded_shapes: O2, padding_values: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), batch_size.into(), padded_shapes.into(), padding_values.into(), drop_remainder.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, padded_shapes: crate::Output, padding_values: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PaddedBatchDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(batch_size); @@ -65106,50 +79495,78 @@ impl PaddedBatchDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.parallel_copy { - nd.set_attr_bool("parallel_copy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutput_types { - nd.set_attr_type_list("Toutput_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.parallel_copy { + nd.set_attr_bool("parallel_copy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput_types { + nd.set_attr_type_list("Toutput_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PaddedBatchDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, padded_shapes: O2, padding_values: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), batch_size.into(), padded_shapes.into(), padding_values.into(), drop_remainder.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, padded_shapes: crate::Output, padding_values: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PaddedBatchDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(batch_size); + nd.add_input(padded_shapes); + nd.add_input(padding_values); + nd.add_input(drop_remainder); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.parallel_copy { + nd.set_attr_bool("parallel_copy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput_types { + nd.set_attr_type_list("Toutput_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PaddedBatchDatasetV2Inst{op}) + } +} +impl PaddedBatchDatasetV2Inst { + /// Returns the 'handle' output of this 'PaddedBatchDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PaddedBatchDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PaddedBatchDatasetV2::new().build(input_dataset, batch_size, padded_shapes, padding_values, drop_remainder, scope)`. -pub fn padded_batch_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input_dataset: O0, - batch_size: O1, - padded_shapes: O2, - padding_values: O3, - drop_remainder: O4, - scope: &mut crate::Scope, -) -> crate::Result { - PaddedBatchDatasetV2::new().build( - input_dataset, - batch_size, - padded_shapes, - padding_values, - drop_remainder, - scope, - ) +pub fn padded_batch_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input_dataset: O0, batch_size: O1, padded_shapes: O2, padding_values: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + PaddedBatchDatasetV2::new().build(input_dataset, batch_size, padded_shapes, padding_values, drop_remainder, scope) } + /// Builder for the `PaddingFIFOQueue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PaddingFIFOQueue { @@ -65160,6 +79577,12 @@ pub struct PaddingFIFOQueue { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PaddingFIFOQueue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PaddingFIFOQueueInst { + /// An instance of a fully built PaddingFIFOQueue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PaddingFIFOQueue { /// Creates a new `PaddingFIFOQueue`. @@ -65168,19 +79591,13 @@ impl PaddingFIFOQueue { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -65192,19 +79609,13 @@ impl PaddingFIFOQueue { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -65216,39 +79627,81 @@ impl PaddingFIFOQueue { } /// Builds the `PaddingFIFOQueue` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PaddingFIFOQueue", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PaddingFIFOQueue` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PaddingFIFOQueue", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PaddingFIFOQueueInst{op}) + } +} +impl PaddingFIFOQueueInst { + /// Returns the 'handle' output of this 'PaddingFIFOQueue' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PaddingFIFOQueueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PaddingFIFOQueue::new().build(scope)`. -pub fn padding_fifoqueue(scope: &mut crate::Scope) -> crate::Result { +pub fn padding_fifoqueue<>(scope: &mut crate::Scope) -> crate::Result { PaddingFIFOQueue::new().build(scope) } + /// Builder for the `PaddingFIFOQueueV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PaddingFIFOQueueV2 { @@ -65259,6 +79712,12 @@ pub struct PaddingFIFOQueueV2 { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PaddingFIFOQueueV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PaddingFIFOQueueV2Inst { + /// An instance of a fully built PaddingFIFOQueueV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PaddingFIFOQueueV2 { /// Creates a new `PaddingFIFOQueueV2`. @@ -65267,19 +79726,13 @@ impl PaddingFIFOQueueV2 { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -65291,19 +79744,13 @@ impl PaddingFIFOQueueV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -65315,39 +79762,81 @@ impl PaddingFIFOQueueV2 { } /// Builds the `PaddingFIFOQueueV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PaddingFIFOQueueV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PaddingFIFOQueueV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PaddingFIFOQueueV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PaddingFIFOQueueV2Inst{op}) + } +} +impl PaddingFIFOQueueV2Inst { + /// Returns the 'handle' output of this 'PaddingFIFOQueueV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PaddingFIFOQueueV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PaddingFIFOQueueV2::new().build(scope)`. -pub fn padding_fifoqueue_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn padding_fifoqueue_v2<>(scope: &mut crate::Scope) -> crate::Result { PaddingFIFOQueueV2::new().build(scope) } + /// Builder for the `ParallelBatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParallelBatchDataset { @@ -65358,6 +79847,12 @@ pub struct ParallelBatchDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParallelBatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParallelBatchDatasetInst { + /// An instance of a fully built ParallelBatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParallelBatchDataset { /// Creates a new `ParallelBatchDataset`. @@ -65372,37 +79867,25 @@ impl ParallelBatchDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `deterministic` attribute. - pub fn deterministic>( - mut self, - value: ArgType, - ) -> Self { + pub fn deterministic>(mut self, value: ArgType) -> Self { self.deterministic = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -65414,36 +79897,10 @@ impl ParallelBatchDataset { } /// Builds the `ParallelBatchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - batch_size: O1, - num_parallel_calls: O2, - drop_remainder: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - batch_size.into(), - num_parallel_calls.into(), - drop_remainder.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - batch_size: crate::Output, - num_parallel_calls: crate::Output, - drop_remainder: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, num_parallel_calls: O2, drop_remainder: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), batch_size.into(), num_parallel_calls.into(), drop_remainder.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, num_parallel_calls: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParallelBatchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(batch_size); @@ -65452,47 +79909,77 @@ impl ParallelBatchDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.parallel_copy { - nd.set_attr_bool("parallel_copy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.deterministic { - nd.set_attr_string("deterministic", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.parallel_copy { + nd.set_attr_bool("parallel_copy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParallelBatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, batch_size: O1, num_parallel_calls: O2, drop_remainder: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), batch_size.into(), num_parallel_calls.into(), drop_remainder.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, batch_size: crate::Output, num_parallel_calls: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParallelBatchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(batch_size); + nd.add_input(num_parallel_calls); + nd.add_input(drop_remainder); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.parallel_copy { + nd.set_attr_bool("parallel_copy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParallelBatchDatasetInst{op}) + } +} +impl ParallelBatchDatasetInst { + /// Returns the 'handle' output of this 'ParallelBatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParallelBatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParallelBatchDataset::new().build(input_dataset, batch_size, num_parallel_calls, drop_remainder, scope)`. -pub fn parallel_batch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - batch_size: O1, - num_parallel_calls: O2, - drop_remainder: O3, - scope: &mut crate::Scope, -) -> crate::Result { - ParallelBatchDataset::new().build( - input_dataset, - batch_size, - num_parallel_calls, - drop_remainder, - scope, - ) +pub fn parallel_batch_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, batch_size: O1, num_parallel_calls: O2, drop_remainder: O3, scope: &mut crate::Scope) -> crate::Result { + ParallelBatchDataset::new().build(input_dataset, batch_size, num_parallel_calls, drop_remainder, scope) } + /// Builder for the `ParallelConcat` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParallelConcat { @@ -65501,6 +79988,12 @@ pub struct ParallelConcat { shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParallelConcat' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParallelConcatInst { + /// An instance of a fully built ParallelConcat Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParallelConcat { /// Creates a new `ParallelConcat`. @@ -65533,45 +80026,71 @@ impl ParallelConcat { } /// Builds the `ParallelConcat` operation. - pub fn build>( - &self, - values: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, values: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(values.into(), scope) } - - fn build_impl( - &self, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParallelConcat", |nd| { nd.add_input(values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParallelConcat` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, values: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(values.into(), scope) + } + fn build_instance_impl(&self, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParallelConcat", |nd| { + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParallelConcatInst{op}) + } +} +impl ParallelConcatInst { + /// Returns the 'output' output of this 'ParallelConcat' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParallelConcatInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParallelConcat::new().build(values, scope)`. -pub fn parallel_concat>( - values: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn parallel_concat>(values: O0, scope: &mut crate::Scope) -> crate::Result { ParallelConcat::new().build(values, scope) } + /// Builder for the `ParallelDynamicStitch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParallelDynamicStitch { @@ -65579,6 +80098,12 @@ pub struct ParallelDynamicStitch { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParallelDynamicStitch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParallelDynamicStitchInst { + /// An instance of a fully built ParallelDynamicStitch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParallelDynamicStitch { /// Creates a new `ParallelDynamicStitch`. @@ -65605,52 +80130,221 @@ impl ParallelDynamicStitch { } /// Builds the `ParallelDynamicStitch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - indices: O0, - data: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, indices: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(indices.into(), data.into(), scope) } - - fn build_impl( - &self, - indices: crate::Output, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, indices: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParallelDynamicStitch", |nd| { nd.add_input(indices); nd.add_input(data); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParallelDynamicStitch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, indices: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), data.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParallelDynamicStitch", |nd| { + nd.add_input(indices); + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParallelDynamicStitchInst{op}) + } +} +impl ParallelDynamicStitchInst { + /// Returns the 'merged' output of this 'ParallelDynamicStitch' operation. + pub fn merged(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParallelDynamicStitchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParallelDynamicStitch::new().build(indices, data, scope)`. -pub fn parallel_dynamic_stitch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - indices: O0, - data: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn parallel_dynamic_stitch, O1: ::std::convert::Into>(indices: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { ParallelDynamicStitch::new().build(indices, data, scope) } + +/// Builder for the `ParallelFilterDataset` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct ParallelFilterDataset { + predicate: ::std::option::Option<::std::string::String>, + deterministic: ::std::option::Option<::std::string::String>, + Targuments: ::std::option::Option<::std::vec::Vec>, + output_types: ::std::option::Option<::std::vec::Vec>, + output_shapes: ::std::option::Option<::std::vec::Vec>, + metadata: ::std::option::Option<::std::string::String>, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'ParallelFilterDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParallelFilterDatasetInst { + /// An instance of a fully built ParallelFilterDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl ParallelFilterDataset { + /// Creates a new `ParallelFilterDataset`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `predicate` attribute. + pub fn predicate>(mut self, value: ArgType) -> Self { + self.predicate = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `deterministic` attribute. + pub fn deterministic>(mut self, value: ArgType) -> Self { + self.deterministic = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `Targuments` attribute. + pub fn Targuments>>(mut self, value: ArgType) -> Self { + self.Targuments = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `output_types` attribute. + pub fn output_types>>(mut self, value: ArgType) -> Self { + self.output_types = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `output_shapes` attribute. + pub fn output_shapes>>(mut self, value: ArgType) -> Self { + self.output_shapes = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `metadata` attribute. + pub fn metadata>(mut self, value: ArgType) -> Self { + self.metadata = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `ParallelFilterDataset` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, num_parallel_calls: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), num_parallel_calls.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("ParallelFilterDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(num_parallel_calls); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.predicate { + nd.set_attr_string("predicate", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ParallelFilterDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, num_parallel_calls: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), num_parallel_calls.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParallelFilterDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(num_parallel_calls); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.predicate { + nd.set_attr_string("predicate", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParallelFilterDatasetInst{op}) + } +} +impl ParallelFilterDatasetInst { + /// Returns the 'handle' output of this 'ParallelFilterDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParallelFilterDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `ParallelFilterDataset::new().build(input_dataset, other_arguments, num_parallel_calls, scope)`. +pub fn parallel_filter_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, num_parallel_calls: O2, scope: &mut crate::Scope) -> crate::Result { + ParallelFilterDataset::new().build(input_dataset, other_arguments, num_parallel_calls, scope) +} + /// Builder for the `ParallelInterleaveDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParallelInterleaveDataset { @@ -65661,6 +80355,12 @@ pub struct ParallelInterleaveDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParallelInterleaveDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParallelInterleaveDatasetInst { + /// An instance of a fully built ParallelInterleaveDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParallelInterleaveDataset { /// Creates a new `ParallelInterleaveDataset`. @@ -65669,46 +80369,31 @@ impl ParallelInterleaveDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -65720,48 +80405,10 @@ impl ParallelInterleaveDataset { } /// Builds the `ParallelInterleaveDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - sloppy: O4, - buffer_output_elements: O5, - prefetch_input_elements: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - cycle_length.into(), - block_length.into(), - sloppy.into(), - buffer_output_elements.into(), - prefetch_input_elements.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - cycle_length: crate::Output, - block_length: crate::Output, - sloppy: crate::Output, - buffer_output_elements: crate::Output, - prefetch_input_elements: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, sloppy: O4, buffer_output_elements: O5, prefetch_input_elements: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), sloppy.into(), buffer_output_elements.into(), prefetch_input_elements.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, sloppy: crate::Output, buffer_output_elements: crate::Output, prefetch_input_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParallelInterleaveDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -65773,56 +80420,80 @@ impl ParallelInterleaveDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParallelInterleaveDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, sloppy: O4, buffer_output_elements: O5, prefetch_input_elements: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), sloppy.into(), buffer_output_elements.into(), prefetch_input_elements.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, sloppy: crate::Output, buffer_output_elements: crate::Output, prefetch_input_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParallelInterleaveDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(cycle_length); + nd.add_input(block_length); + nd.add_input(sloppy); + nd.add_input(buffer_output_elements); + nd.add_input(prefetch_input_elements); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParallelInterleaveDatasetInst{op}) + } +} +impl ParallelInterleaveDatasetInst { + /// Returns the 'handle' output of this 'ParallelInterleaveDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParallelInterleaveDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParallelInterleaveDataset::new().build(input_dataset, other_arguments, cycle_length, block_length, sloppy, buffer_output_elements, prefetch_input_elements, scope)`. -pub fn parallel_interleave_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - sloppy: O4, - buffer_output_elements: O5, - prefetch_input_elements: O6, - scope: &mut crate::Scope, -) -> crate::Result { - ParallelInterleaveDataset::new().build( - input_dataset, - other_arguments, - cycle_length, - block_length, - sloppy, - buffer_output_elements, - prefetch_input_elements, - scope, - ) +pub fn parallel_interleave_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, sloppy: O4, buffer_output_elements: O5, prefetch_input_elements: O6, scope: &mut crate::Scope) -> crate::Result { + ParallelInterleaveDataset::new().build(input_dataset, other_arguments, cycle_length, block_length, sloppy, buffer_output_elements, prefetch_input_elements, scope) } + /// Builder for the `ParallelInterleaveDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParallelInterleaveDatasetV2 { @@ -65834,6 +80505,12 @@ pub struct ParallelInterleaveDatasetV2 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParallelInterleaveDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParallelInterleaveDatasetV2Inst { + /// An instance of a fully built ParallelInterleaveDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParallelInterleaveDatasetV2 { /// Creates a new `ParallelInterleaveDatasetV2`. @@ -65842,37 +80519,25 @@ impl ParallelInterleaveDatasetV2 { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -65884,10 +80549,7 @@ impl ParallelInterleaveDatasetV2 { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -65899,40 +80561,10 @@ impl ParallelInterleaveDatasetV2 { } /// Builds the `ParallelInterleaveDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - num_parallel_calls: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - cycle_length.into(), - block_length.into(), - num_parallel_calls.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - cycle_length: crate::Output, - block_length: crate::Output, - num_parallel_calls: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, num_parallel_calls: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), num_parallel_calls.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParallelInterleaveDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -65942,53 +80574,84 @@ impl ParallelInterleaveDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.sloppy { - nd.set_attr_bool("sloppy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.sloppy { + nd.set_attr_bool("sloppy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParallelInterleaveDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, num_parallel_calls: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), num_parallel_calls.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParallelInterleaveDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(cycle_length); + nd.add_input(block_length); + nd.add_input(num_parallel_calls); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.sloppy { + nd.set_attr_bool("sloppy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParallelInterleaveDatasetV2Inst{op}) + } +} +impl ParallelInterleaveDatasetV2Inst { + /// Returns the 'handle' output of this 'ParallelInterleaveDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParallelInterleaveDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParallelInterleaveDatasetV2::new().build(input_dataset, other_arguments, cycle_length, block_length, num_parallel_calls, scope)`. -pub fn parallel_interleave_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - num_parallel_calls: O4, - scope: &mut crate::Scope, -) -> crate::Result { - ParallelInterleaveDatasetV2::new().build( - input_dataset, - other_arguments, - cycle_length, - block_length, - num_parallel_calls, - scope, - ) +pub fn parallel_interleave_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, num_parallel_calls: O4, scope: &mut crate::Scope) -> crate::Result { + ParallelInterleaveDatasetV2::new().build(input_dataset, other_arguments, cycle_length, block_length, num_parallel_calls, scope) } + /// Builder for the `ParallelInterleaveDatasetV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParallelInterleaveDatasetV3 { @@ -66000,6 +80663,12 @@ pub struct ParallelInterleaveDatasetV3 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParallelInterleaveDatasetV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParallelInterleaveDatasetV3Inst { + /// An instance of a fully built ParallelInterleaveDatasetV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParallelInterleaveDatasetV3 { /// Creates a new `ParallelInterleaveDatasetV3`. @@ -66008,55 +80677,37 @@ impl ParallelInterleaveDatasetV3 { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `deterministic` attribute. - pub fn deterministic>( - mut self, - value: ArgType, - ) -> Self { + pub fn deterministic>(mut self, value: ArgType) -> Self { self.deterministic = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -66068,40 +80719,10 @@ impl ParallelInterleaveDatasetV3 { } /// Builds the `ParallelInterleaveDatasetV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - num_parallel_calls: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - cycle_length.into(), - block_length.into(), - num_parallel_calls.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - cycle_length: crate::Output, - block_length: crate::Output, - num_parallel_calls: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, num_parallel_calls: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), num_parallel_calls.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParallelInterleaveDatasetV3", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -66111,53 +80732,84 @@ impl ParallelInterleaveDatasetV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.deterministic { - nd.set_attr_string("deterministic", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParallelInterleaveDatasetV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, num_parallel_calls: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), num_parallel_calls.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParallelInterleaveDatasetV3", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(cycle_length); + nd.add_input(block_length); + nd.add_input(num_parallel_calls); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParallelInterleaveDatasetV3Inst{op}) + } +} +impl ParallelInterleaveDatasetV3Inst { + /// Returns the 'handle' output of this 'ParallelInterleaveDatasetV3' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParallelInterleaveDatasetV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParallelInterleaveDatasetV3::new().build(input_dataset, other_arguments, cycle_length, block_length, num_parallel_calls, scope)`. -pub fn parallel_interleave_dataset_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - num_parallel_calls: O4, - scope: &mut crate::Scope, -) -> crate::Result { - ParallelInterleaveDatasetV3::new().build( - input_dataset, - other_arguments, - cycle_length, - block_length, - num_parallel_calls, - scope, - ) +pub fn parallel_interleave_dataset_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, num_parallel_calls: O4, scope: &mut crate::Scope) -> crate::Result { + ParallelInterleaveDatasetV3::new().build(input_dataset, other_arguments, cycle_length, block_length, num_parallel_calls, scope) } + /// Builder for the `ParallelInterleaveDatasetV4` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParallelInterleaveDatasetV4 { @@ -66169,6 +80821,12 @@ pub struct ParallelInterleaveDatasetV4 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParallelInterleaveDatasetV4' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParallelInterleaveDatasetV4Inst { + /// An instance of a fully built ParallelInterleaveDatasetV4 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParallelInterleaveDatasetV4 { /// Creates a new `ParallelInterleaveDatasetV4`. @@ -66177,55 +80835,37 @@ impl ParallelInterleaveDatasetV4 { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `deterministic` attribute. - pub fn deterministic>( - mut self, - value: ArgType, - ) -> Self { + pub fn deterministic>(mut self, value: ArgType) -> Self { self.deterministic = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -66237,48 +80877,10 @@ impl ParallelInterleaveDatasetV4 { } /// Builds the `ParallelInterleaveDatasetV4` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - buffer_output_elements: O4, - prefetch_input_elements: O5, - num_parallel_calls: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - cycle_length.into(), - block_length.into(), - buffer_output_elements.into(), - prefetch_input_elements.into(), - num_parallel_calls.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - cycle_length: crate::Output, - block_length: crate::Output, - buffer_output_elements: crate::Output, - prefetch_input_elements: crate::Output, - num_parallel_calls: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, buffer_output_elements: O4, prefetch_input_elements: O5, num_parallel_calls: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), buffer_output_elements.into(), prefetch_input_elements.into(), num_parallel_calls.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, buffer_output_elements: crate::Output, prefetch_input_elements: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParallelInterleaveDatasetV4", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -66290,59 +80892,86 @@ impl ParallelInterleaveDatasetV4 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.deterministic { - nd.set_attr_string("deterministic", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParallelInterleaveDatasetV4` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, buffer_output_elements: O4, prefetch_input_elements: O5, num_parallel_calls: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), cycle_length.into(), block_length.into(), buffer_output_elements.into(), prefetch_input_elements.into(), num_parallel_calls.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, cycle_length: crate::Output, block_length: crate::Output, buffer_output_elements: crate::Output, prefetch_input_elements: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParallelInterleaveDatasetV4", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(cycle_length); + nd.add_input(block_length); + nd.add_input(buffer_output_elements); + nd.add_input(prefetch_input_elements); + nd.add_input(num_parallel_calls); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParallelInterleaveDatasetV4Inst{op}) + } +} +impl ParallelInterleaveDatasetV4Inst { + /// Returns the 'handle' output of this 'ParallelInterleaveDatasetV4' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParallelInterleaveDatasetV4Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParallelInterleaveDatasetV4::new().build(input_dataset, other_arguments, cycle_length, block_length, buffer_output_elements, prefetch_input_elements, num_parallel_calls, scope)`. -pub fn parallel_interleave_dataset_v4< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - cycle_length: O2, - block_length: O3, - buffer_output_elements: O4, - prefetch_input_elements: O5, - num_parallel_calls: O6, - scope: &mut crate::Scope, -) -> crate::Result { - ParallelInterleaveDatasetV4::new().build( - input_dataset, - other_arguments, - cycle_length, - block_length, - buffer_output_elements, - prefetch_input_elements, - num_parallel_calls, - scope, - ) +pub fn parallel_interleave_dataset_v4, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, cycle_length: O2, block_length: O3, buffer_output_elements: O4, prefetch_input_elements: O5, num_parallel_calls: O6, scope: &mut crate::Scope) -> crate::Result { + ParallelInterleaveDatasetV4::new().build(input_dataset, other_arguments, cycle_length, block_length, buffer_output_elements, prefetch_input_elements, num_parallel_calls, scope) } + /// Builder for the `ParallelMapDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParallelMapDataset { @@ -66356,6 +80985,12 @@ pub struct ParallelMapDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParallelMapDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParallelMapDatasetInst { + /// An instance of a fully built ParallelMapDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParallelMapDataset { /// Creates a new `ParallelMapDataset`. @@ -66364,46 +80999,31 @@ impl ParallelMapDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `use_inter_op_parallelism` attribute. - pub fn use_inter_op_parallelism>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_inter_op_parallelism>(mut self, value: ArgType) -> Self { self.use_inter_op_parallelism = ::std::option::Option::Some(value.into()); self } @@ -66415,19 +81035,13 @@ impl ParallelMapDataset { } /// Sets the `preserve_cardinality` attribute. - pub fn preserve_cardinality>( - mut self, - value: ArgType, - ) -> Self { + pub fn preserve_cardinality>(mut self, value: ArgType) -> Self { self.preserve_cardinality = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -66439,32 +81053,10 @@ impl ParallelMapDataset { } /// Builds the `ParallelMapDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - num_parallel_calls: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - num_parallel_calls.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - num_parallel_calls: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, num_parallel_calls: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), num_parallel_calls.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParallelMapDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -66472,48 +81064,94 @@ impl ParallelMapDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { - nd.set_attr_bool("use_inter_op_parallelism", *value)?; - } - if let ::std::option::Option::Some(value) = &self.sloppy { - nd.set_attr_bool("sloppy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.preserve_cardinality { - nd.set_attr_bool("preserve_cardinality", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { + nd.set_attr_bool("use_inter_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sloppy { + nd.set_attr_bool("sloppy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ParallelMapDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, num_parallel_calls: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), num_parallel_calls.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParallelMapDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(num_parallel_calls); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { + nd.set_attr_bool("use_inter_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sloppy { + nd.set_attr_bool("sloppy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParallelMapDatasetInst{op}) + } +} +impl ParallelMapDatasetInst { + /// Returns the 'handle' output of this 'ParallelMapDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParallelMapDatasetInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ParallelMapDataset::new().build(input_dataset, other_arguments, num_parallel_calls, scope)`. -pub fn parallel_map_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - num_parallel_calls: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn parallel_map_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, num_parallel_calls: O2, scope: &mut crate::Scope) -> crate::Result { ParallelMapDataset::new().build(input_dataset, other_arguments, num_parallel_calls, scope) } + /// Builder for the `ParallelMapDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParallelMapDatasetV2 { @@ -66527,6 +81165,12 @@ pub struct ParallelMapDatasetV2 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParallelMapDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParallelMapDatasetV2Inst { + /// An instance of a fully built ParallelMapDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParallelMapDatasetV2 { /// Creates a new `ParallelMapDatasetV2`. @@ -66535,73 +81179,49 @@ impl ParallelMapDatasetV2 { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `use_inter_op_parallelism` attribute. - pub fn use_inter_op_parallelism>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_inter_op_parallelism>(mut self, value: ArgType) -> Self { self.use_inter_op_parallelism = ::std::option::Option::Some(value.into()); self } /// Sets the `deterministic` attribute. - pub fn deterministic>( - mut self, - value: ArgType, - ) -> Self { + pub fn deterministic>(mut self, value: ArgType) -> Self { self.deterministic = ::std::option::Option::Some(value.into()); self } /// Sets the `preserve_cardinality` attribute. - pub fn preserve_cardinality>( - mut self, - value: ArgType, - ) -> Self { + pub fn preserve_cardinality>(mut self, value: ArgType) -> Self { self.preserve_cardinality = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -66613,32 +81233,10 @@ impl ParallelMapDatasetV2 { } /// Builds the `ParallelMapDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - num_parallel_calls: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - other_arguments.into(), - num_parallel_calls.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - num_parallel_calls: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, num_parallel_calls: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), other_arguments.into(), num_parallel_calls.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParallelMapDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); @@ -66646,48 +81244,94 @@ impl ParallelMapDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { - nd.set_attr_bool("use_inter_op_parallelism", *value)?; - } - if let ::std::option::Option::Some(value) = &self.deterministic { - nd.set_attr_string("deterministic", value)?; - } - if let ::std::option::Option::Some(value) = &self.preserve_cardinality { - nd.set_attr_bool("preserve_cardinality", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { + nd.set_attr_bool("use_inter_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ParallelMapDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, num_parallel_calls: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), num_parallel_calls.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, num_parallel_calls: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParallelMapDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + nd.add_input(num_parallel_calls); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { + nd.set_attr_bool("use_inter_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParallelMapDatasetV2Inst{op}) + } +} +impl ParallelMapDatasetV2Inst { + /// Returns the 'handle' output of this 'ParallelMapDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParallelMapDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ParallelMapDatasetV2::new().build(input_dataset, other_arguments, num_parallel_calls, scope)`. -pub fn parallel_map_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - num_parallel_calls: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn parallel_map_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, num_parallel_calls: O2, scope: &mut crate::Scope) -> crate::Result { ParallelMapDatasetV2::new().build(input_dataset, other_arguments, num_parallel_calls, scope) } + /// Builder for the `ParameterizedTruncatedNormal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParameterizedTruncatedNormal { @@ -66697,6 +81341,12 @@ pub struct ParameterizedTruncatedNormal { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParameterizedTruncatedNormal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParameterizedTruncatedNormalInst { + /// An instance of a fully built ParameterizedTruncatedNormal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParameterizedTruncatedNormal { /// Creates a new `ParameterizedTruncatedNormal`. @@ -66735,40 +81385,10 @@ impl ParameterizedTruncatedNormal { } /// Builds the `ParameterizedTruncatedNormal` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - shape: O0, - means: O1, - stdevs: O2, - minvals: O3, - maxvals: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - shape.into(), - means.into(), - stdevs.into(), - minvals.into(), - maxvals.into(), - scope, - ) - } - - fn build_impl( - &self, - shape: crate::Output, - means: crate::Output, - stdevs: crate::Output, - minvals: crate::Output, - maxvals: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, shape: O0, means: O1, stdevs: O2, minvals: O3, maxvals: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(shape.into(), means.into(), stdevs.into(), minvals.into(), maxvals.into(), scope) + } + fn build_impl(&self, shape: crate::Output, means: crate::Output, stdevs: crate::Output, minvals: crate::Output, maxvals: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParameterizedTruncatedNormal", |nd| { nd.add_input(shape); nd.add_input(means); @@ -66778,40 +81398,72 @@ impl ParameterizedTruncatedNormal { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParameterizedTruncatedNormal` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, shape: O0, means: O1, stdevs: O2, minvals: O3, maxvals: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), means.into(), stdevs.into(), minvals.into(), maxvals.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, means: crate::Output, stdevs: crate::Output, minvals: crate::Output, maxvals: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParameterizedTruncatedNormal", |nd| { + nd.add_input(shape); + nd.add_input(means); + nd.add_input(stdevs); + nd.add_input(minvals); + nd.add_input(maxvals); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParameterizedTruncatedNormalInst{op}) + } +} +impl ParameterizedTruncatedNormalInst { + /// Returns the 'output' output of this 'ParameterizedTruncatedNormal' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParameterizedTruncatedNormalInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParameterizedTruncatedNormal::new().build(shape, means, stdevs, minvals, maxvals, scope)`. -pub fn parameterized_truncated_normal< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - shape: O0, - means: O1, - stdevs: O2, - minvals: O3, - maxvals: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn parameterized_truncated_normal, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(shape: O0, means: O1, stdevs: O2, minvals: O3, maxvals: O4, scope: &mut crate::Scope) -> crate::Result { ParameterizedTruncatedNormal::new().build(shape, means, stdevs, minvals, maxvals, scope) } + /// Builder for the `ParseExample` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParseExample { @@ -66822,6 +81474,12 @@ pub struct ParseExample { dense_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParseExample' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParseExampleInst { + /// An instance of a fully built ParseExample Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParseExample { /// Creates a new `ParseExample`. @@ -66842,28 +81500,19 @@ impl ParseExample { } /// Sets the `sparse_types` attribute. - pub fn sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_types>>(mut self, value: ArgType) -> Self { self.sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `Tdense` attribute. - pub fn Tdense>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tdense>>(mut self, value: ArgType) -> Self { self.Tdense = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_shapes` attribute. - pub fn dense_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_shapes>>(mut self, value: ArgType) -> Self { self.dense_shapes = ::std::option::Option::Some(value.into()); self } @@ -66875,40 +81524,10 @@ impl ParseExample { } /// Builds the `ParseExample` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - serialized: O0, - names: O1, - sparse_keys: O2, - dense_keys: O3, - dense_defaults: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - serialized.into(), - names.into(), - sparse_keys.into(), - dense_keys.into(), - dense_defaults.into(), - scope, - ) - } - - fn build_impl( - &self, - serialized: crate::Output, - names: crate::Output, - sparse_keys: crate::Output, - dense_keys: crate::Output, - dense_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, serialized: O0, names: O1, sparse_keys: O2, dense_keys: O3, dense_defaults: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(serialized.into(), names.into(), sparse_keys.into(), dense_keys.into(), dense_defaults.into(), scope) + } + fn build_impl(&self, serialized: crate::Output, names: crate::Output, sparse_keys: crate::Output, dense_keys: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParseExample", |nd| { nd.add_input(serialized); nd.add_input(names); @@ -66918,50 +81537,111 @@ impl ParseExample { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Nsparse { - nd.set_attr_int("Nsparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Ndense { - nd.set_attr_int("Ndense", *value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_types { - nd.set_attr_type_list("sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tdense { - nd.set_attr_type_list("Tdense", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_shapes { - nd.set_attr_shape_list("dense_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.Nsparse { + nd.set_attr_int("Nsparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Ndense { + nd.set_attr_int("Ndense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParseExample` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, serialized: O0, names: O1, sparse_keys: O2, dense_keys: O3, dense_defaults: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(serialized.into(), names.into(), sparse_keys.into(), dense_keys.into(), dense_defaults.into(), scope) + } + fn build_instance_impl(&self, serialized: crate::Output, names: crate::Output, sparse_keys: crate::Output, dense_keys: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParseExample", |nd| { + nd.add_input(serialized); + nd.add_input(names); + nd.add_input(sparse_keys); + nd.add_input(dense_keys); + nd.add_input(dense_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Nsparse { + nd.set_attr_int("Nsparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Ndense { + nd.set_attr_int("Ndense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParseExampleInst{op}) + } +} +impl ParseExampleInst { + /// Returns a Vector of Outputs for 'sparse_indices' output of this ParseExample operation. + pub fn sparse_indices(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("Nsparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'sparse_values' output of this 'ParseExample' operation. + pub fn sparse_values(&self) -> crate::Result { + let dynamic_offset = (self.op.get_attr_int("Nsparse")?+1) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'sparse_shapes' output of this ParseExample operation. + pub fn sparse_shapes(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("Nsparse")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Nsparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'dense_values' output of this 'ParseExample' operation. + pub fn dense_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Nsparse")?+3) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } +} +impl Into for ParseExampleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParseExample::new().build(serialized, names, sparse_keys, dense_keys, dense_defaults, scope)`. -pub fn parse_example< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - serialized: O0, - names: O1, - sparse_keys: O2, - dense_keys: O3, - dense_defaults: O4, - scope: &mut crate::Scope, -) -> crate::Result { - ParseExample::new().build( - serialized, - names, - sparse_keys, - dense_keys, - dense_defaults, - scope, - ) +pub fn parse_example, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(serialized: O0, names: O1, sparse_keys: O2, dense_keys: O3, dense_defaults: O4, scope: &mut crate::Scope) -> crate::Result { + ParseExample::new().build(serialized, names, sparse_keys, dense_keys, dense_defaults, scope) } + /// Builder for the `ParseExampleDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParseExampleDataset { @@ -66978,6 +81658,12 @@ pub struct ParseExampleDataset { ragged_split_types: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParseExampleDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParseExampleDatasetInst { + /// An instance of a fully built ParseExampleDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParseExampleDataset { /// Creates a new `ParseExampleDataset`. @@ -66986,64 +81672,43 @@ impl ParseExampleDataset { } /// Sets the `sparse_keys` attribute. - pub fn sparse_keys>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_keys>>(mut self, value: ArgType) -> Self { self.sparse_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_keys` attribute. - pub fn dense_keys>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_keys>>(mut self, value: ArgType) -> Self { self.dense_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `sparse_types` attribute. - pub fn sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_types>>(mut self, value: ArgType) -> Self { self.sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `Tdense` attribute. - pub fn Tdense>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tdense>>(mut self, value: ArgType) -> Self { self.Tdense = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_shapes` attribute. - pub fn dense_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_shapes>>(mut self, value: ArgType) -> Self { self.dense_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -67055,28 +81720,19 @@ impl ParseExampleDataset { } /// Sets the `ragged_keys` attribute. - pub fn ragged_keys>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ragged_keys>>(mut self, value: ArgType) -> Self { self.ragged_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `ragged_value_types` attribute. - pub fn ragged_value_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ragged_value_types>>(mut self, value: ArgType) -> Self { self.ragged_value_types = ::std::option::Option::Some(value.into()); self } /// Sets the `ragged_split_types` attribute. - pub fn ragged_split_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ragged_split_types>>(mut self, value: ArgType) -> Self { self.ragged_split_types = ::std::option::Option::Some(value.into()); self } @@ -67088,32 +81744,10 @@ impl ParseExampleDataset { } /// Builds the `ParseExampleDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - num_parallel_calls: O1, - dense_defaults: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - num_parallel_calls.into(), - dense_defaults.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - num_parallel_calls: crate::Output, - dense_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_parallel_calls: O1, dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), num_parallel_calls.into(), dense_defaults.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, num_parallel_calls: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParseExampleDataset", |nd| { nd.add_input(input_dataset); nd.add_input(num_parallel_calls); @@ -67121,57 +81755,112 @@ impl ParseExampleDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.sparse_keys { - nd.set_attr_string_list("sparse_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_keys { - nd.set_attr_string_list("dense_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_types { - nd.set_attr_type_list("sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tdense { - nd.set_attr_type_list("Tdense", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_shapes { - nd.set_attr_shape_list("dense_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.sloppy { - nd.set_attr_bool("sloppy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ragged_keys { - nd.set_attr_string_list("ragged_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.ragged_value_types { - nd.set_attr_type_list("ragged_value_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.ragged_split_types { - nd.set_attr_type_list("ragged_split_types", value)?; + if let ::std::option::Option::Some(value) = &self.sparse_keys { + nd.set_attr_string_list("sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_keys { + nd.set_attr_string_list("dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.sloppy { + nd.set_attr_bool("sloppy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_keys { + nd.set_attr_string_list("ragged_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_value_types { + nd.set_attr_type_list("ragged_value_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_split_types { + nd.set_attr_type_list("ragged_split_types", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ParseExampleDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_parallel_calls: O1, dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), num_parallel_calls.into(), dense_defaults.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, num_parallel_calls: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParseExampleDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(num_parallel_calls); + nd.add_input(dense_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.sparse_keys { + nd.set_attr_string_list("sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_keys { + nd.set_attr_string_list("dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.sloppy { + nd.set_attr_bool("sloppy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_keys { + nd.set_attr_string_list("ragged_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_value_types { + nd.set_attr_type_list("ragged_value_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_split_types { + nd.set_attr_type_list("ragged_split_types", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParseExampleDatasetInst{op}) + } +} +impl ParseExampleDatasetInst { + /// Returns the 'handle' output of this 'ParseExampleDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParseExampleDatasetInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ParseExampleDataset::new().build(input_dataset, num_parallel_calls, dense_defaults, scope)`. -pub fn parse_example_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - num_parallel_calls: O1, - dense_defaults: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn parse_example_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, num_parallel_calls: O1, dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { ParseExampleDataset::new().build(input_dataset, num_parallel_calls, dense_defaults, scope) } + /// Builder for the `ParseExampleDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParseExampleDatasetV2 { @@ -67188,6 +81877,12 @@ pub struct ParseExampleDatasetV2 { ragged_split_types: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParseExampleDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParseExampleDatasetV2Inst { + /// An instance of a fully built ParseExampleDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParseExampleDatasetV2 { /// Creates a new `ParseExampleDatasetV2`. @@ -67196,100 +81891,67 @@ impl ParseExampleDatasetV2 { } /// Sets the `sparse_keys` attribute. - pub fn sparse_keys>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_keys>>(mut self, value: ArgType) -> Self { self.sparse_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_keys` attribute. - pub fn dense_keys>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_keys>>(mut self, value: ArgType) -> Self { self.dense_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `sparse_types` attribute. - pub fn sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_types>>(mut self, value: ArgType) -> Self { self.sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `Tdense` attribute. - pub fn Tdense>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tdense>>(mut self, value: ArgType) -> Self { self.Tdense = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_shapes` attribute. - pub fn dense_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_shapes>>(mut self, value: ArgType) -> Self { self.dense_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `deterministic` attribute. - pub fn deterministic>( - mut self, - value: ArgType, - ) -> Self { + pub fn deterministic>(mut self, value: ArgType) -> Self { self.deterministic = ::std::option::Option::Some(value.into()); self } /// Sets the `ragged_keys` attribute. - pub fn ragged_keys>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ragged_keys>>(mut self, value: ArgType) -> Self { self.ragged_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `ragged_value_types` attribute. - pub fn ragged_value_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ragged_value_types>>(mut self, value: ArgType) -> Self { self.ragged_value_types = ::std::option::Option::Some(value.into()); self } /// Sets the `ragged_split_types` attribute. - pub fn ragged_split_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ragged_split_types>>(mut self, value: ArgType) -> Self { self.ragged_split_types = ::std::option::Option::Some(value.into()); self } @@ -67301,32 +81963,10 @@ impl ParseExampleDatasetV2 { } /// Builds the `ParseExampleDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - num_parallel_calls: O1, - dense_defaults: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - num_parallel_calls.into(), - dense_defaults.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - num_parallel_calls: crate::Output, - dense_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_parallel_calls: O1, dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), num_parallel_calls.into(), dense_defaults.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, num_parallel_calls: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParseExampleDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(num_parallel_calls); @@ -67334,57 +81974,112 @@ impl ParseExampleDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.sparse_keys { - nd.set_attr_string_list("sparse_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_keys { - nd.set_attr_string_list("dense_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_types { - nd.set_attr_type_list("sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tdense { - nd.set_attr_type_list("Tdense", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_shapes { - nd.set_attr_shape_list("dense_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.deterministic { - nd.set_attr_string("deterministic", value)?; - } - if let ::std::option::Option::Some(value) = &self.ragged_keys { - nd.set_attr_string_list("ragged_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.ragged_value_types { - nd.set_attr_type_list("ragged_value_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.ragged_split_types { - nd.set_attr_type_list("ragged_split_types", value)?; + if let ::std::option::Option::Some(value) = &self.sparse_keys { + nd.set_attr_string_list("sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_keys { + nd.set_attr_string_list("dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_keys { + nd.set_attr_string_list("ragged_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_value_types { + nd.set_attr_type_list("ragged_value_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_split_types { + nd.set_attr_type_list("ragged_split_types", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ParseExampleDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_parallel_calls: O1, dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), num_parallel_calls.into(), dense_defaults.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, num_parallel_calls: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParseExampleDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(num_parallel_calls); + nd.add_input(dense_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.sparse_keys { + nd.set_attr_string_list("sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_keys { + nd.set_attr_string_list("dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.deterministic { + nd.set_attr_string("deterministic", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_keys { + nd.set_attr_string_list("ragged_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_value_types { + nd.set_attr_type_list("ragged_value_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_split_types { + nd.set_attr_type_list("ragged_split_types", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParseExampleDatasetV2Inst{op}) + } +} +impl ParseExampleDatasetV2Inst { + /// Returns the 'handle' output of this 'ParseExampleDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParseExampleDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ParseExampleDatasetV2::new().build(input_dataset, num_parallel_calls, dense_defaults, scope)`. -pub fn parse_example_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - num_parallel_calls: O1, - dense_defaults: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn parse_example_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, num_parallel_calls: O1, dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { ParseExampleDatasetV2::new().build(input_dataset, num_parallel_calls, dense_defaults, scope) } + /// Builder for the `ParseExampleV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParseExampleV2 { @@ -67396,6 +82091,12 @@ pub struct ParseExampleV2 { dense_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParseExampleV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParseExampleV2Inst { + /// An instance of a fully built ParseExampleV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParseExampleV2 { /// Creates a new `ParseExampleV2`. @@ -67404,10 +82105,7 @@ impl ParseExampleV2 { } /// Sets the `Tdense` attribute. - pub fn Tdense>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tdense>>(mut self, value: ArgType) -> Self { self.Tdense = ::std::option::Option::Some(value.into()); self } @@ -67419,37 +82117,25 @@ impl ParseExampleV2 { } /// Sets the `sparse_types` attribute. - pub fn sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_types>>(mut self, value: ArgType) -> Self { self.sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `ragged_value_types` attribute. - pub fn ragged_value_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ragged_value_types>>(mut self, value: ArgType) -> Self { self.ragged_value_types = ::std::option::Option::Some(value.into()); self } /// Sets the `ragged_split_types` attribute. - pub fn ragged_split_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ragged_split_types>>(mut self, value: ArgType) -> Self { self.ragged_split_types = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_shapes` attribute. - pub fn dense_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_shapes>>(mut self, value: ArgType) -> Self { self.dense_shapes = ::std::option::Option::Some(value.into()); self } @@ -67461,44 +82147,10 @@ impl ParseExampleV2 { } /// Builds the `ParseExampleV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - serialized: O0, - names: O1, - sparse_keys: O2, - dense_keys: O3, - ragged_keys: O4, - dense_defaults: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - serialized.into(), - names.into(), - sparse_keys.into(), - dense_keys.into(), - ragged_keys.into(), - dense_defaults.into(), - scope, - ) - } - - fn build_impl( - &self, - serialized: crate::Output, - names: crate::Output, - sparse_keys: crate::Output, - dense_keys: crate::Output, - ragged_keys: crate::Output, - dense_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, serialized: O0, names: O1, sparse_keys: O2, dense_keys: O3, ragged_keys: O4, dense_defaults: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(serialized.into(), names.into(), sparse_keys.into(), dense_keys.into(), ragged_keys.into(), dense_defaults.into(), scope) + } + fn build_impl(&self, serialized: crate::Output, names: crate::Output, sparse_keys: crate::Output, dense_keys: crate::Output, ragged_keys: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParseExampleV2", |nd| { nd.add_input(serialized); nd.add_input(names); @@ -67509,61 +82161,138 @@ impl ParseExampleV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tdense { - nd.set_attr_type_list("Tdense", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sparse { - nd.set_attr_int("num_sparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_types { - nd.set_attr_type_list("sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.ragged_value_types { - nd.set_attr_type_list("ragged_value_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.ragged_split_types { - nd.set_attr_type_list("ragged_split_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_shapes { - nd.set_attr_shape_list("dense_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sparse { + nd.set_attr_int("num_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_value_types { + nd.set_attr_type_list("ragged_value_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_split_types { + nd.set_attr_type_list("ragged_split_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParseExampleV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, serialized: O0, names: O1, sparse_keys: O2, dense_keys: O3, ragged_keys: O4, dense_defaults: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(serialized.into(), names.into(), sparse_keys.into(), dense_keys.into(), ragged_keys.into(), dense_defaults.into(), scope) + } + fn build_instance_impl(&self, serialized: crate::Output, names: crate::Output, sparse_keys: crate::Output, dense_keys: crate::Output, ragged_keys: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParseExampleV2", |nd| { + nd.add_input(serialized); + nd.add_input(names); + nd.add_input(sparse_keys); + nd.add_input(dense_keys); + nd.add_input(ragged_keys); + nd.add_input(dense_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sparse { + nd.set_attr_int("num_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_value_types { + nd.set_attr_type_list("ragged_value_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_split_types { + nd.set_attr_type_list("ragged_split_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParseExampleV2Inst{op}) + } +} +impl ParseExampleV2Inst { + /// Returns a Vector of Outputs for 'sparse_indices' output of this ParseExampleV2 operation. + pub fn sparse_indices(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'sparse_values' output of this 'ParseExampleV2' operation. + pub fn sparse_values(&self) -> crate::Result { + let dynamic_offset = (self.op.get_attr_int("num_sparse")?+1) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'sparse_shapes' output of this ParseExampleV2 operation. + pub fn sparse_shapes(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("num_sparse")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'dense_values' output of this 'ParseExampleV2' operation. + pub fn dense_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("num_sparse")?+3) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns the 'ragged_values' output of this 'ParseExampleV2' operation. + pub fn ragged_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("num_sparse")?+4) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns the 'ragged_row_splits' output of this 'ParseExampleV2' operation. + pub fn ragged_row_splits(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("num_sparse")?+5) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } +} +impl Into for ParseExampleV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParseExampleV2::new().build(serialized, names, sparse_keys, dense_keys, ragged_keys, dense_defaults, scope)`. -pub fn parse_example_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - serialized: O0, - names: O1, - sparse_keys: O2, - dense_keys: O3, - ragged_keys: O4, - dense_defaults: O5, - scope: &mut crate::Scope, -) -> crate::Result { - ParseExampleV2::new().build( - serialized, - names, - sparse_keys, - dense_keys, - ragged_keys, - dense_defaults, - scope, - ) +pub fn parse_example_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(serialized: O0, names: O1, sparse_keys: O2, dense_keys: O3, ragged_keys: O4, dense_defaults: O5, scope: &mut crate::Scope) -> crate::Result { + ParseExampleV2::new().build(serialized, names, sparse_keys, dense_keys, ragged_keys, dense_defaults, scope) } + /// Builder for the `ParseSequenceExample` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParseSequenceExample { - feature_list_dense_missing_assumed_empty: - ::std::option::Option<::std::vec::Vec<::std::string::String>>, + feature_list_dense_missing_assumed_empty: ::std::option::Option<::std::vec::Vec<::std::string::String>>, context_sparse_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, context_dense_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, feature_list_sparse_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>, @@ -67580,6 +82309,12 @@ pub struct ParseSequenceExample { feature_list_dense_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParseSequenceExample' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParseSequenceExampleInst { + /// An instance of a fully built ParseSequenceExample Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParseSequenceExample { /// Creates a new `ParseSequenceExample`. @@ -67588,56 +82323,31 @@ impl ParseSequenceExample { } /// Sets the `feature_list_dense_missing_assumed_empty` attribute. - pub fn feature_list_dense_missing_assumed_empty< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_dense_missing_assumed_empty>>(mut self, value: ArgType) -> Self { self.feature_list_dense_missing_assumed_empty = ::std::option::Option::Some(value.into()); self } /// Sets the `context_sparse_keys` attribute. - pub fn context_sparse_keys< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn context_sparse_keys>>(mut self, value: ArgType) -> Self { self.context_sparse_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `context_dense_keys` attribute. - pub fn context_dense_keys< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn context_dense_keys>>(mut self, value: ArgType) -> Self { self.context_dense_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_sparse_keys` attribute. - pub fn feature_list_sparse_keys< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_sparse_keys>>(mut self, value: ArgType) -> Self { self.feature_list_sparse_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_dense_keys` attribute. - pub fn feature_list_dense_keys< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_dense_keys>>(mut self, value: ArgType) -> Self { self.feature_list_dense_keys = ::std::option::Option::Some(value.into()); self } @@ -67655,79 +82365,49 @@ impl ParseSequenceExample { } /// Sets the `Nfeature_list_sparse` attribute. - pub fn Nfeature_list_sparse>( - mut self, - value: ArgType, - ) -> Self { + pub fn Nfeature_list_sparse>(mut self, value: ArgType) -> Self { self.Nfeature_list_sparse = ::std::option::Option::Some(value.into()); self } /// Sets the `Nfeature_list_dense` attribute. - pub fn Nfeature_list_dense>( - mut self, - value: ArgType, - ) -> Self { + pub fn Nfeature_list_dense>(mut self, value: ArgType) -> Self { self.Nfeature_list_dense = ::std::option::Option::Some(value.into()); self } /// Sets the `context_sparse_types` attribute. - pub fn context_sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn context_sparse_types>>(mut self, value: ArgType) -> Self { self.context_sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `Tcontext_dense` attribute. - pub fn Tcontext_dense>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcontext_dense>>(mut self, value: ArgType) -> Self { self.Tcontext_dense = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_dense_types` attribute. - pub fn feature_list_dense_types< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_dense_types>>(mut self, value: ArgType) -> Self { self.feature_list_dense_types = ::std::option::Option::Some(value.into()); self } /// Sets the `context_dense_shapes` attribute. - pub fn context_dense_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn context_dense_shapes>>(mut self, value: ArgType) -> Self { self.context_dense_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_sparse_types` attribute. - pub fn feature_list_sparse_types< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_sparse_types>>(mut self, value: ArgType) -> Self { self.feature_list_sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_dense_shapes` attribute. - pub fn feature_list_dense_shapes< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_dense_shapes>>(mut self, value: ArgType) -> Self { self.feature_list_dense_shapes = ::std::option::Option::Some(value.into()); self } @@ -67739,32 +82419,10 @@ impl ParseSequenceExample { } /// Builds the `ParseSequenceExample` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - serialized: O0, - debug_name: O1, - context_dense_defaults: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - serialized.into(), - debug_name.into(), - context_dense_defaults.into(), - scope, - ) - } - - fn build_impl( - &self, - serialized: crate::Output, - debug_name: crate::Output, - context_dense_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, serialized: O0, debug_name: O1, context_dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(serialized.into(), debug_name.into(), context_dense_defaults.into(), scope) + } + fn build_impl(&self, serialized: crate::Output, debug_name: crate::Output, context_dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParseSequenceExample", |nd| { nd.add_input(serialized); nd.add_input(debug_name); @@ -67772,71 +82430,221 @@ impl ParseSequenceExample { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = - &self.feature_list_dense_missing_assumed_empty - { - nd.set_attr_string_list("feature_list_dense_missing_assumed_empty", value)?; - } - if let ::std::option::Option::Some(value) = &self.context_sparse_keys { - nd.set_attr_string_list("context_sparse_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.context_dense_keys { - nd.set_attr_string_list("context_dense_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_sparse_keys { - nd.set_attr_string_list("feature_list_sparse_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_dense_keys { - nd.set_attr_string_list("feature_list_dense_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.Ncontext_sparse { - nd.set_attr_int("Ncontext_sparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Ncontext_dense { - nd.set_attr_int("Ncontext_dense", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Nfeature_list_sparse { - nd.set_attr_int("Nfeature_list_sparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Nfeature_list_dense { - nd.set_attr_int("Nfeature_list_dense", *value)?; - } - if let ::std::option::Option::Some(value) = &self.context_sparse_types { - nd.set_attr_type_list("context_sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcontext_dense { - nd.set_attr_type_list("Tcontext_dense", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_dense_types { - nd.set_attr_type_list("feature_list_dense_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.context_dense_shapes { - nd.set_attr_shape_list("context_dense_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_sparse_types { - nd.set_attr_type_list("feature_list_sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_dense_shapes { - nd.set_attr_shape_list("feature_list_dense_shapes", value)?; + if let ::std::option::Option::Some(value) = &self.feature_list_dense_missing_assumed_empty { + nd.set_attr_string_list("feature_list_dense_missing_assumed_empty", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_sparse_keys { + nd.set_attr_string_list("context_sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_dense_keys { + nd.set_attr_string_list("context_dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_sparse_keys { + nd.set_attr_string_list("feature_list_sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_keys { + nd.set_attr_string_list("feature_list_dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.Ncontext_sparse { + nd.set_attr_int("Ncontext_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Ncontext_dense { + nd.set_attr_int("Ncontext_dense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_sparse { + nd.set_attr_int("Nfeature_list_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_dense { + nd.set_attr_int("Nfeature_list_dense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.context_sparse_types { + nd.set_attr_type_list("context_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcontext_dense { + nd.set_attr_type_list("Tcontext_dense", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_types { + nd.set_attr_type_list("feature_list_dense_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_dense_shapes { + nd.set_attr_shape_list("context_dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_sparse_types { + nd.set_attr_type_list("feature_list_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_shapes { + nd.set_attr_shape_list("feature_list_dense_shapes", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ParseSequenceExample` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, serialized: O0, debug_name: O1, context_dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(serialized.into(), debug_name.into(), context_dense_defaults.into(), scope) + } + fn build_instance_impl(&self, serialized: crate::Output, debug_name: crate::Output, context_dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParseSequenceExample", |nd| { + nd.add_input(serialized); + nd.add_input(debug_name); + nd.add_input(context_dense_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.feature_list_dense_missing_assumed_empty { + nd.set_attr_string_list("feature_list_dense_missing_assumed_empty", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_sparse_keys { + nd.set_attr_string_list("context_sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_dense_keys { + nd.set_attr_string_list("context_dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_sparse_keys { + nd.set_attr_string_list("feature_list_sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_keys { + nd.set_attr_string_list("feature_list_dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.Ncontext_sparse { + nd.set_attr_int("Ncontext_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Ncontext_dense { + nd.set_attr_int("Ncontext_dense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_sparse { + nd.set_attr_int("Nfeature_list_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_dense { + nd.set_attr_int("Nfeature_list_dense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.context_sparse_types { + nd.set_attr_type_list("context_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcontext_dense { + nd.set_attr_type_list("Tcontext_dense", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_types { + nd.set_attr_type_list("feature_list_dense_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_dense_shapes { + nd.set_attr_shape_list("context_dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_sparse_types { + nd.set_attr_type_list("feature_list_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_shapes { + nd.set_attr_shape_list("feature_list_dense_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParseSequenceExampleInst{op}) + } +} +impl ParseSequenceExampleInst { + /// Returns a Vector of Outputs for 'context_sparse_indices' output of this ParseSequenceExample operation. + pub fn context_sparse_indices(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("Ncontext_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'context_sparse_values' output of this 'ParseSequenceExample' operation. + pub fn context_sparse_values(&self) -> crate::Result { + let dynamic_offset = (self.op.get_attr_int("Ncontext_sparse")?+1) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'context_sparse_shapes' output of this ParseSequenceExample operation. + pub fn context_sparse_shapes(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("Ncontext_sparse")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Ncontext_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'context_dense_values' output of this 'ParseSequenceExample' operation. + pub fn context_dense_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+3) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'feature_list_sparse_indices' output of this ParseSequenceExample operation. + pub fn feature_list_sparse_indices(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+4) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Nfeature_list_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'feature_list_sparse_values' output of this 'ParseSequenceExample' operation. + pub fn feature_list_sparse_values(&self) -> crate::Result { + let dynamic_offset = (self.op.get_attr_int("Nfeature_list_sparse")?+2*self.op.get_attr_int("Ncontext_sparse")?+5) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'feature_list_sparse_shapes' output of this ParseSequenceExample operation. + pub fn feature_list_sparse_shapes(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+self.op.get_attr_int("Nfeature_list_sparse")?+6) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Nfeature_list_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'feature_list_dense_values' output of this 'ParseSequenceExample' operation. + pub fn feature_list_dense_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+2*self.op.get_attr_int("Nfeature_list_sparse")?+7) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'feature_list_dense_lengths' output of this ParseSequenceExample operation. + pub fn feature_list_dense_lengths(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+2*self.op.get_attr_int("Nfeature_list_sparse")?+8) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Nfeature_list_dense")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for ParseSequenceExampleInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ParseSequenceExample::new().build(serialized, debug_name, context_dense_defaults, scope)`. -pub fn parse_sequence_example< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - serialized: O0, - debug_name: O1, - context_dense_defaults: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn parse_sequence_example, O1: ::std::convert::Into, O2: ::std::convert::Into>(serialized: O0, debug_name: O1, context_dense_defaults: O2, scope: &mut crate::Scope) -> crate::Result { ParseSequenceExample::new().build(serialized, debug_name, context_dense_defaults, scope) } + /// Builder for the `ParseSequenceExampleV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParseSequenceExampleV2 { @@ -67855,6 +82663,12 @@ pub struct ParseSequenceExampleV2 { feature_list_dense_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParseSequenceExampleV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParseSequenceExampleV2Inst { + /// An instance of a fully built ParseSequenceExampleV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParseSequenceExampleV2 { /// Creates a new `ParseSequenceExampleV2`. @@ -67869,123 +82683,73 @@ impl ParseSequenceExampleV2 { } /// Sets the `Tcontext_dense` attribute. - pub fn Tcontext_dense>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcontext_dense>>(mut self, value: ArgType) -> Self { self.Tcontext_dense = ::std::option::Option::Some(value.into()); self } /// Sets the `context_sparse_types` attribute. - pub fn context_sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn context_sparse_types>>(mut self, value: ArgType) -> Self { self.context_sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `context_ragged_value_types` attribute. - pub fn context_ragged_value_types< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn context_ragged_value_types>>(mut self, value: ArgType) -> Self { self.context_ragged_value_types = ::std::option::Option::Some(value.into()); self } /// Sets the `context_ragged_split_types` attribute. - pub fn context_ragged_split_types< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn context_ragged_split_types>>(mut self, value: ArgType) -> Self { self.context_ragged_split_types = ::std::option::Option::Some(value.into()); self } /// Sets the `context_dense_shapes` attribute. - pub fn context_dense_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn context_dense_shapes>>(mut self, value: ArgType) -> Self { self.context_dense_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `Nfeature_list_sparse` attribute. - pub fn Nfeature_list_sparse>( - mut self, - value: ArgType, - ) -> Self { + pub fn Nfeature_list_sparse>(mut self, value: ArgType) -> Self { self.Nfeature_list_sparse = ::std::option::Option::Some(value.into()); self } /// Sets the `Nfeature_list_dense` attribute. - pub fn Nfeature_list_dense>( - mut self, - value: ArgType, - ) -> Self { + pub fn Nfeature_list_dense>(mut self, value: ArgType) -> Self { self.Nfeature_list_dense = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_dense_types` attribute. - pub fn feature_list_dense_types< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_dense_types>>(mut self, value: ArgType) -> Self { self.feature_list_dense_types = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_sparse_types` attribute. - pub fn feature_list_sparse_types< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_sparse_types>>(mut self, value: ArgType) -> Self { self.feature_list_sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_ragged_value_types` attribute. - pub fn feature_list_ragged_value_types< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_ragged_value_types>>(mut self, value: ArgType) -> Self { self.feature_list_ragged_value_types = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_ragged_split_types` attribute. - pub fn feature_list_ragged_split_types< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_ragged_split_types>>(mut self, value: ArgType) -> Self { self.feature_list_ragged_split_types = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_dense_shapes` attribute. - pub fn feature_list_dense_shapes< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_dense_shapes>>(mut self, value: ArgType) -> Self { self.feature_list_dense_shapes = ::std::option::Option::Some(value.into()); self } @@ -67997,60 +82761,10 @@ impl ParseSequenceExampleV2 { } /// Builds the `ParseSequenceExampleV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - serialized: O0, - debug_name: O1, - context_sparse_keys: O2, - context_dense_keys: O3, - context_ragged_keys: O4, - feature_list_sparse_keys: O5, - feature_list_dense_keys: O6, - feature_list_ragged_keys: O7, - feature_list_dense_missing_assumed_empty: O8, - context_dense_defaults: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - serialized.into(), - debug_name.into(), - context_sparse_keys.into(), - context_dense_keys.into(), - context_ragged_keys.into(), - feature_list_sparse_keys.into(), - feature_list_dense_keys.into(), - feature_list_ragged_keys.into(), - feature_list_dense_missing_assumed_empty.into(), - context_dense_defaults.into(), - scope, - ) - } - - fn build_impl( - &self, - serialized: crate::Output, - debug_name: crate::Output, - context_sparse_keys: crate::Output, - context_dense_keys: crate::Output, - context_ragged_keys: crate::Output, - feature_list_sparse_keys: crate::Output, - feature_list_dense_keys: crate::Output, - feature_list_ragged_keys: crate::Output, - feature_list_dense_missing_assumed_empty: crate::Output, - context_dense_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, serialized: O0, debug_name: O1, context_sparse_keys: O2, context_dense_keys: O3, context_ragged_keys: O4, feature_list_sparse_keys: O5, feature_list_dense_keys: O6, feature_list_ragged_keys: O7, feature_list_dense_missing_assumed_empty: O8, context_dense_defaults: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(serialized.into(), debug_name.into(), context_sparse_keys.into(), context_dense_keys.into(), context_ragged_keys.into(), feature_list_sparse_keys.into(), feature_list_dense_keys.into(), feature_list_ragged_keys.into(), feature_list_dense_missing_assumed_empty.into(), context_dense_defaults.into(), scope) + } + fn build_impl(&self, serialized: crate::Output, debug_name: crate::Output, context_sparse_keys: crate::Output, context_dense_keys: crate::Output, context_ragged_keys: crate::Output, feature_list_sparse_keys: crate::Output, feature_list_dense_keys: crate::Output, feature_list_ragged_keys: crate::Output, feature_list_dense_missing_assumed_empty: crate::Output, context_dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParseSequenceExampleV2", |nd| { nd.add_input(serialized); nd.add_input(debug_name); @@ -68065,89 +82779,256 @@ impl ParseSequenceExampleV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Ncontext_sparse { - nd.set_attr_int("Ncontext_sparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcontext_dense { - nd.set_attr_type_list("Tcontext_dense", value)?; - } - if let ::std::option::Option::Some(value) = &self.context_sparse_types { - nd.set_attr_type_list("context_sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.context_ragged_value_types { - nd.set_attr_type_list("context_ragged_value_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.context_ragged_split_types { - nd.set_attr_type_list("context_ragged_split_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.context_dense_shapes { - nd.set_attr_shape_list("context_dense_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.Nfeature_list_sparse { - nd.set_attr_int("Nfeature_list_sparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Nfeature_list_dense { - nd.set_attr_int("Nfeature_list_dense", *value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_dense_types { - nd.set_attr_type_list("feature_list_dense_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_sparse_types { - nd.set_attr_type_list("feature_list_sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_ragged_value_types { - nd.set_attr_type_list("feature_list_ragged_value_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_ragged_split_types { - nd.set_attr_type_list("feature_list_ragged_split_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_dense_shapes { - nd.set_attr_shape_list("feature_list_dense_shapes", value)?; + if let ::std::option::Option::Some(value) = &self.Ncontext_sparse { + nd.set_attr_int("Ncontext_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcontext_dense { + nd.set_attr_type_list("Tcontext_dense", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_sparse_types { + nd.set_attr_type_list("context_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_ragged_value_types { + nd.set_attr_type_list("context_ragged_value_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_ragged_split_types { + nd.set_attr_type_list("context_ragged_split_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_dense_shapes { + nd.set_attr_shape_list("context_dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_sparse { + nd.set_attr_int("Nfeature_list_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_dense { + nd.set_attr_int("Nfeature_list_dense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_types { + nd.set_attr_type_list("feature_list_dense_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_sparse_types { + nd.set_attr_type_list("feature_list_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_ragged_value_types { + nd.set_attr_type_list("feature_list_ragged_value_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_ragged_split_types { + nd.set_attr_type_list("feature_list_ragged_split_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_shapes { + nd.set_attr_shape_list("feature_list_dense_shapes", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ParseSequenceExampleV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, serialized: O0, debug_name: O1, context_sparse_keys: O2, context_dense_keys: O3, context_ragged_keys: O4, feature_list_sparse_keys: O5, feature_list_dense_keys: O6, feature_list_ragged_keys: O7, feature_list_dense_missing_assumed_empty: O8, context_dense_defaults: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(serialized.into(), debug_name.into(), context_sparse_keys.into(), context_dense_keys.into(), context_ragged_keys.into(), feature_list_sparse_keys.into(), feature_list_dense_keys.into(), feature_list_ragged_keys.into(), feature_list_dense_missing_assumed_empty.into(), context_dense_defaults.into(), scope) + } + fn build_instance_impl(&self, serialized: crate::Output, debug_name: crate::Output, context_sparse_keys: crate::Output, context_dense_keys: crate::Output, context_ragged_keys: crate::Output, feature_list_sparse_keys: crate::Output, feature_list_dense_keys: crate::Output, feature_list_ragged_keys: crate::Output, feature_list_dense_missing_assumed_empty: crate::Output, context_dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParseSequenceExampleV2", |nd| { + nd.add_input(serialized); + nd.add_input(debug_name); + nd.add_input(context_sparse_keys); + nd.add_input(context_dense_keys); + nd.add_input(context_ragged_keys); + nd.add_input(feature_list_sparse_keys); + nd.add_input(feature_list_dense_keys); + nd.add_input(feature_list_ragged_keys); + nd.add_input(feature_list_dense_missing_assumed_empty); + nd.add_input(context_dense_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.Ncontext_sparse { + nd.set_attr_int("Ncontext_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcontext_dense { + nd.set_attr_type_list("Tcontext_dense", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_sparse_types { + nd.set_attr_type_list("context_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_ragged_value_types { + nd.set_attr_type_list("context_ragged_value_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_ragged_split_types { + nd.set_attr_type_list("context_ragged_split_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_dense_shapes { + nd.set_attr_shape_list("context_dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_sparse { + nd.set_attr_int("Nfeature_list_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_dense { + nd.set_attr_int("Nfeature_list_dense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_types { + nd.set_attr_type_list("feature_list_dense_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_sparse_types { + nd.set_attr_type_list("feature_list_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_ragged_value_types { + nd.set_attr_type_list("feature_list_ragged_value_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_ragged_split_types { + nd.set_attr_type_list("feature_list_ragged_split_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_shapes { + nd.set_attr_shape_list("feature_list_dense_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParseSequenceExampleV2Inst{op}) + } +} +impl ParseSequenceExampleV2Inst { + /// Returns a Vector of Outputs for 'context_sparse_indices' output of this ParseSequenceExampleV2 operation. + pub fn context_sparse_indices(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("Ncontext_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'context_sparse_values' output of this 'ParseSequenceExampleV2' operation. + pub fn context_sparse_values(&self) -> crate::Result { + let dynamic_offset = (self.op.get_attr_int("Ncontext_sparse")?+1) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'context_sparse_shapes' output of this ParseSequenceExampleV2 operation. + pub fn context_sparse_shapes(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("Ncontext_sparse")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Ncontext_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'context_dense_values' output of this 'ParseSequenceExampleV2' operation. + pub fn context_dense_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+3) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns the 'context_ragged_values' output of this 'ParseSequenceExampleV2' operation. + pub fn context_ragged_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+4) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns the 'context_ragged_row_splits' output of this 'ParseSequenceExampleV2' operation. + pub fn context_ragged_row_splits(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+5) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'feature_list_sparse_indices' output of this ParseSequenceExampleV2 operation. + pub fn feature_list_sparse_indices(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+6) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Nfeature_list_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'feature_list_sparse_values' output of this 'ParseSequenceExampleV2' operation. + pub fn feature_list_sparse_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+self.op.get_attr_int("Nfeature_list_sparse")?+7) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'feature_list_sparse_shapes' output of this ParseSequenceExampleV2 operation. + pub fn feature_list_sparse_shapes(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("Nfeature_list_sparse")?+2*self.op.get_attr_int("Ncontext_sparse")?+8) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Nfeature_list_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'feature_list_dense_values' output of this 'ParseSequenceExampleV2' operation. + pub fn feature_list_dense_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Nfeature_list_sparse")?+2*self.op.get_attr_int("Ncontext_sparse")?+9) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'feature_list_dense_lengths' output of this ParseSequenceExampleV2 operation. + pub fn feature_list_dense_lengths(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+2*self.op.get_attr_int("Nfeature_list_sparse")?+10) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Nfeature_list_dense")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'feature_list_ragged_values' output of this 'ParseSequenceExampleV2' operation. + pub fn feature_list_ragged_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+2*self.op.get_attr_int("Nfeature_list_sparse")?+self.op.get_attr_int("Nfeature_list_dense")?+11) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns the 'feature_list_ragged_outer_splits' output of this 'ParseSequenceExampleV2' operation. + pub fn feature_list_ragged_outer_splits(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Nfeature_list_sparse")?+self.op.get_attr_int("Nfeature_list_dense")?+2*self.op.get_attr_int("Ncontext_sparse")?+12) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns the 'feature_list_ragged_inner_splits' output of this 'ParseSequenceExampleV2' operation. + pub fn feature_list_ragged_inner_splits(&self) -> crate::Result { + let dynamic_offset = (self.op.get_attr_int("Nfeature_list_dense")?+2*self.op.get_attr_int("Nfeature_list_sparse")?+2*self.op.get_attr_int("Ncontext_sparse")?+13) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } +} +impl Into for ParseSequenceExampleV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ParseSequenceExampleV2::new().build(serialized, debug_name, context_sparse_keys, context_dense_keys, context_ragged_keys, feature_list_sparse_keys, feature_list_dense_keys, feature_list_ragged_keys, feature_list_dense_missing_assumed_empty, context_dense_defaults, scope)`. -pub fn parse_sequence_example_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - serialized: O0, - debug_name: O1, - context_sparse_keys: O2, - context_dense_keys: O3, - context_ragged_keys: O4, - feature_list_sparse_keys: O5, - feature_list_dense_keys: O6, - feature_list_ragged_keys: O7, - feature_list_dense_missing_assumed_empty: O8, - context_dense_defaults: O9, - scope: &mut crate::Scope, -) -> crate::Result { - ParseSequenceExampleV2::new().build( - serialized, - debug_name, - context_sparse_keys, - context_dense_keys, - context_ragged_keys, - feature_list_sparse_keys, - feature_list_dense_keys, - feature_list_ragged_keys, - feature_list_dense_missing_assumed_empty, - context_dense_defaults, - scope, - ) +pub fn parse_sequence_example_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(serialized: O0, debug_name: O1, context_sparse_keys: O2, context_dense_keys: O3, context_ragged_keys: O4, feature_list_sparse_keys: O5, feature_list_dense_keys: O6, feature_list_ragged_keys: O7, feature_list_dense_missing_assumed_empty: O8, context_dense_defaults: O9, scope: &mut crate::Scope) -> crate::Result { + ParseSequenceExampleV2::new().build(serialized, debug_name, context_sparse_keys, context_dense_keys, context_ragged_keys, feature_list_sparse_keys, feature_list_dense_keys, feature_list_ragged_keys, feature_list_dense_missing_assumed_empty, context_dense_defaults, scope) } + /// Builder for the `ParseSingleExample` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParseSingleExample { @@ -68159,6 +83040,12 @@ pub struct ParseSingleExample { dense_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParseSingleExample' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParseSingleExampleInst { + /// An instance of a fully built ParseSingleExample Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParseSingleExample { /// Creates a new `ParseSingleExample`. @@ -68173,46 +83060,31 @@ impl ParseSingleExample { } /// Sets the `sparse_keys` attribute. - pub fn sparse_keys>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_keys>>(mut self, value: ArgType) -> Self { self.sparse_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_keys` attribute. - pub fn dense_keys>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_keys>>(mut self, value: ArgType) -> Self { self.dense_keys = ::std::option::Option::Some(value.into()); self } /// Sets the `sparse_types` attribute. - pub fn sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_types>>(mut self, value: ArgType) -> Self { self.sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `Tdense` attribute. - pub fn Tdense>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tdense>>(mut self, value: ArgType) -> Self { self.Tdense = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_shapes` attribute. - pub fn dense_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_shapes>>(mut self, value: ArgType) -> Self { self.dense_shapes = ::std::option::Option::Some(value.into()); self } @@ -68224,64 +83096,124 @@ impl ParseSingleExample { } /// Builds the `ParseSingleExample` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - serialized: O0, - dense_defaults: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, serialized: O0, dense_defaults: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(serialized.into(), dense_defaults.into(), scope) } - - fn build_impl( - &self, - serialized: crate::Output, - dense_defaults: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, serialized: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParseSingleExample", |nd| { nd.add_input(serialized); nd.add_input(dense_defaults); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_sparse { - nd.set_attr_int("num_sparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_keys { - nd.set_attr_string_list("sparse_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_keys { - nd.set_attr_string_list("dense_keys", value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_types { - nd.set_attr_type_list("sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tdense { - nd.set_attr_type_list("Tdense", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_shapes { - nd.set_attr_shape_list("dense_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.num_sparse { + nd.set_attr_int("num_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_keys { + nd.set_attr_string_list("sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_keys { + nd.set_attr_string_list("dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParseSingleExample` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, serialized: O0, dense_defaults: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(serialized.into(), dense_defaults.into(), scope) + } + fn build_instance_impl(&self, serialized: crate::Output, dense_defaults: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParseSingleExample", |nd| { + nd.add_input(serialized); + nd.add_input(dense_defaults); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_sparse { + nd.set_attr_int("num_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_keys { + nd.set_attr_string_list("sparse_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_keys { + nd.set_attr_string_list("dense_keys", value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tdense { + nd.set_attr_type_list("Tdense", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_shapes { + nd.set_attr_shape_list("dense_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParseSingleExampleInst{op}) + } +} +impl ParseSingleExampleInst { + /// Returns a Vector of Outputs for 'sparse_indices' output of this ParseSingleExample operation. + pub fn sparse_indices(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'sparse_values' output of this 'ParseSingleExample' operation. + pub fn sparse_values(&self) -> crate::Result { + let dynamic_offset = (self.op.get_attr_int("num_sparse")?+1) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'sparse_shapes' output of this ParseSingleExample operation. + pub fn sparse_shapes(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("num_sparse")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'dense_values' output of this 'ParseSingleExample' operation. + pub fn dense_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("num_sparse")?+3) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } +} +impl Into for ParseSingleExampleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParseSingleExample::new().build(serialized, dense_defaults, scope)`. -pub fn parse_single_example< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - serialized: O0, - dense_defaults: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn parse_single_example, O1: ::std::convert::Into>(serialized: O0, dense_defaults: O1, scope: &mut crate::Scope) -> crate::Result { ParseSingleExample::new().build(serialized, dense_defaults, scope) } + /// Builder for the `ParseSingleSequenceExample` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParseSingleSequenceExample { @@ -68297,6 +83229,12 @@ pub struct ParseSingleSequenceExample { feature_list_dense_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParseSingleSequenceExample' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParseSingleSequenceExampleInst { + /// An instance of a fully built ParseSingleSequenceExample Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParseSingleSequenceExample { /// Creates a new `ParseSingleSequenceExample`. @@ -68317,79 +83255,49 @@ impl ParseSingleSequenceExample { } /// Sets the `Nfeature_list_sparse` attribute. - pub fn Nfeature_list_sparse>( - mut self, - value: ArgType, - ) -> Self { + pub fn Nfeature_list_sparse>(mut self, value: ArgType) -> Self { self.Nfeature_list_sparse = ::std::option::Option::Some(value.into()); self } /// Sets the `Nfeature_list_dense` attribute. - pub fn Nfeature_list_dense>( - mut self, - value: ArgType, - ) -> Self { + pub fn Nfeature_list_dense>(mut self, value: ArgType) -> Self { self.Nfeature_list_dense = ::std::option::Option::Some(value.into()); self } /// Sets the `context_sparse_types` attribute. - pub fn context_sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn context_sparse_types>>(mut self, value: ArgType) -> Self { self.context_sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `Tcontext_dense` attribute. - pub fn Tcontext_dense>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcontext_dense>>(mut self, value: ArgType) -> Self { self.Tcontext_dense = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_dense_types` attribute. - pub fn feature_list_dense_types< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_dense_types>>(mut self, value: ArgType) -> Self { self.feature_list_dense_types = ::std::option::Option::Some(value.into()); self } /// Sets the `context_dense_shapes` attribute. - pub fn context_dense_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn context_dense_shapes>>(mut self, value: ArgType) -> Self { self.context_dense_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_sparse_types` attribute. - pub fn feature_list_sparse_types< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_sparse_types>>(mut self, value: ArgType) -> Self { self.feature_list_sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `feature_list_dense_shapes` attribute. - pub fn feature_list_dense_shapes< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn feature_list_dense_shapes>>(mut self, value: ArgType) -> Self { self.feature_list_dense_shapes = ::std::option::Option::Some(value.into()); self } @@ -68401,52 +83309,10 @@ impl ParseSingleSequenceExample { } /// Builds the `ParseSingleSequenceExample` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - serialized: O0, - feature_list_dense_missing_assumed_empty: O1, - context_sparse_keys: O2, - context_dense_keys: O3, - feature_list_sparse_keys: O4, - feature_list_dense_keys: O5, - context_dense_defaults: O6, - debug_name: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - serialized.into(), - feature_list_dense_missing_assumed_empty.into(), - context_sparse_keys.into(), - context_dense_keys.into(), - feature_list_sparse_keys.into(), - feature_list_dense_keys.into(), - context_dense_defaults.into(), - debug_name.into(), - scope, - ) - } - - fn build_impl( - &self, - serialized: crate::Output, - feature_list_dense_missing_assumed_empty: crate::Output, - context_sparse_keys: crate::Output, - context_dense_keys: crate::Output, - feature_list_sparse_keys: crate::Output, - feature_list_dense_keys: crate::Output, - context_dense_defaults: crate::Output, - debug_name: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, serialized: O0, feature_list_dense_missing_assumed_empty: O1, context_sparse_keys: O2, context_dense_keys: O3, feature_list_sparse_keys: O4, feature_list_dense_keys: O5, context_dense_defaults: O6, debug_name: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(serialized.into(), feature_list_dense_missing_assumed_empty.into(), context_sparse_keys.into(), context_dense_keys.into(), feature_list_sparse_keys.into(), feature_list_dense_keys.into(), context_dense_defaults.into(), debug_name.into(), scope) + } + fn build_impl(&self, serialized: crate::Output, feature_list_dense_missing_assumed_empty: crate::Output, context_sparse_keys: crate::Output, context_dense_keys: crate::Output, feature_list_sparse_keys: crate::Output, feature_list_dense_keys: crate::Output, context_dense_defaults: crate::Output, debug_name: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParseSingleSequenceExample", |nd| { nd.add_input(serialized); nd.add_input(feature_list_dense_missing_assumed_empty); @@ -68459,80 +83325,196 @@ impl ParseSingleSequenceExample { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Ncontext_sparse { - nd.set_attr_int("Ncontext_sparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Ncontext_dense { - nd.set_attr_int("Ncontext_dense", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Nfeature_list_sparse { - nd.set_attr_int("Nfeature_list_sparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Nfeature_list_dense { - nd.set_attr_int("Nfeature_list_dense", *value)?; - } - if let ::std::option::Option::Some(value) = &self.context_sparse_types { - nd.set_attr_type_list("context_sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcontext_dense { - nd.set_attr_type_list("Tcontext_dense", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_dense_types { - nd.set_attr_type_list("feature_list_dense_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.context_dense_shapes { - nd.set_attr_shape_list("context_dense_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_sparse_types { - nd.set_attr_type_list("feature_list_sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.feature_list_dense_shapes { - nd.set_attr_shape_list("feature_list_dense_shapes", value)?; + if let ::std::option::Option::Some(value) = &self.Ncontext_sparse { + nd.set_attr_int("Ncontext_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Ncontext_dense { + nd.set_attr_int("Ncontext_dense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_sparse { + nd.set_attr_int("Nfeature_list_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_dense { + nd.set_attr_int("Nfeature_list_dense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.context_sparse_types { + nd.set_attr_type_list("context_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcontext_dense { + nd.set_attr_type_list("Tcontext_dense", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_types { + nd.set_attr_type_list("feature_list_dense_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_dense_shapes { + nd.set_attr_shape_list("context_dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_sparse_types { + nd.set_attr_type_list("feature_list_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_shapes { + nd.set_attr_shape_list("feature_list_dense_shapes", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ParseSingleSequenceExample` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, serialized: O0, feature_list_dense_missing_assumed_empty: O1, context_sparse_keys: O2, context_dense_keys: O3, feature_list_sparse_keys: O4, feature_list_dense_keys: O5, context_dense_defaults: O6, debug_name: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(serialized.into(), feature_list_dense_missing_assumed_empty.into(), context_sparse_keys.into(), context_dense_keys.into(), feature_list_sparse_keys.into(), feature_list_dense_keys.into(), context_dense_defaults.into(), debug_name.into(), scope) + } + fn build_instance_impl(&self, serialized: crate::Output, feature_list_dense_missing_assumed_empty: crate::Output, context_sparse_keys: crate::Output, context_dense_keys: crate::Output, feature_list_sparse_keys: crate::Output, feature_list_dense_keys: crate::Output, context_dense_defaults: crate::Output, debug_name: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParseSingleSequenceExample", |nd| { + nd.add_input(serialized); + nd.add_input(feature_list_dense_missing_assumed_empty); + nd.add_input(context_sparse_keys); + nd.add_input(context_dense_keys); + nd.add_input(feature_list_sparse_keys); + nd.add_input(feature_list_dense_keys); + nd.add_input(context_dense_defaults); + nd.add_input(debug_name); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.Ncontext_sparse { + nd.set_attr_int("Ncontext_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Ncontext_dense { + nd.set_attr_int("Ncontext_dense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_sparse { + nd.set_attr_int("Nfeature_list_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Nfeature_list_dense { + nd.set_attr_int("Nfeature_list_dense", *value)?; + } + if let ::std::option::Option::Some(value) = &self.context_sparse_types { + nd.set_attr_type_list("context_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcontext_dense { + nd.set_attr_type_list("Tcontext_dense", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_types { + nd.set_attr_type_list("feature_list_dense_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.context_dense_shapes { + nd.set_attr_shape_list("context_dense_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_sparse_types { + nd.set_attr_type_list("feature_list_sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.feature_list_dense_shapes { + nd.set_attr_shape_list("feature_list_dense_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParseSingleSequenceExampleInst{op}) + } +} +impl ParseSingleSequenceExampleInst { + /// Returns a Vector of Outputs for 'context_sparse_indices' output of this ParseSingleSequenceExample operation. + pub fn context_sparse_indices(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("Ncontext_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'context_sparse_values' output of this 'ParseSingleSequenceExample' operation. + pub fn context_sparse_values(&self) -> crate::Result { + let dynamic_offset = (self.op.get_attr_int("Ncontext_sparse")?+1) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'context_sparse_shapes' output of this ParseSingleSequenceExample operation. + pub fn context_sparse_shapes(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("Ncontext_sparse")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Ncontext_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'context_dense_values' output of this 'ParseSingleSequenceExample' operation. + pub fn context_dense_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+3) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'feature_list_sparse_indices' output of this ParseSingleSequenceExample operation. + pub fn feature_list_sparse_indices(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+4) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Nfeature_list_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'feature_list_sparse_values' output of this 'ParseSingleSequenceExample' operation. + pub fn feature_list_sparse_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+self.op.get_attr_int("Nfeature_list_sparse")?+5) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } + /// Returns a Vector of Outputs for 'feature_list_sparse_shapes' output of this ParseSingleSequenceExample operation. + pub fn feature_list_sparse_shapes(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+self.op.get_attr_int("Nfeature_list_sparse")?+6) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("Nfeature_list_sparse")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'feature_list_dense_values' output of this 'ParseSingleSequenceExample' operation. + pub fn feature_list_dense_values(&self) -> crate::Result { + let dynamic_offset = (2*self.op.get_attr_int("Ncontext_sparse")?+2*self.op.get_attr_int("Nfeature_list_sparse")?+7) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset + }) + } +} +impl Into for ParseSingleSequenceExampleInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ParseSingleSequenceExample::new().build(serialized, feature_list_dense_missing_assumed_empty, context_sparse_keys, context_dense_keys, feature_list_sparse_keys, feature_list_dense_keys, context_dense_defaults, debug_name, scope)`. -pub fn parse_single_sequence_example< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - serialized: O0, - feature_list_dense_missing_assumed_empty: O1, - context_sparse_keys: O2, - context_dense_keys: O3, - feature_list_sparse_keys: O4, - feature_list_dense_keys: O5, - context_dense_defaults: O6, - debug_name: O7, - scope: &mut crate::Scope, -) -> crate::Result { - ParseSingleSequenceExample::new().build( - serialized, - feature_list_dense_missing_assumed_empty, - context_sparse_keys, - context_dense_keys, - feature_list_sparse_keys, - feature_list_dense_keys, - context_dense_defaults, - debug_name, - scope, - ) +pub fn parse_single_sequence_example, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(serialized: O0, feature_list_dense_missing_assumed_empty: O1, context_sparse_keys: O2, context_dense_keys: O3, feature_list_sparse_keys: O4, feature_list_dense_keys: O5, context_dense_defaults: O6, debug_name: O7, scope: &mut crate::Scope) -> crate::Result { + ParseSingleSequenceExample::new().build(serialized, feature_list_dense_missing_assumed_empty, context_sparse_keys, context_dense_keys, feature_list_sparse_keys, feature_list_dense_keys, context_dense_defaults, debug_name, scope) } + /// Builder for the `ParseTensor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ParseTensor { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ParseTensor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ParseTensorInst { + /// An instance of a fully built ParseTensor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ParseTensor { /// Creates a new `ParseTensor`. @@ -68541,10 +83523,7 @@ impl ParseTensor { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -68556,39 +83535,59 @@ impl ParseTensor { } /// Builds the `ParseTensor` operation. - pub fn build>( - &self, - serialized: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, serialized: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(serialized.into(), scope) } - - fn build_impl( - &self, - serialized: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, serialized: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ParseTensor", |nd| { nd.add_input(serialized); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ParseTensor` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, serialized: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(serialized.into(), scope) + } + fn build_instance_impl(&self, serialized: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ParseTensor", |nd| { + nd.add_input(serialized); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ParseTensorInst{op}) + } +} +impl ParseTensorInst { + /// Returns the 'output' output of this 'ParseTensor' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ParseTensorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ParseTensor::new().build(serialized, scope)`. -pub fn parse_tensor>( - serialized: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn parse_tensor>(serialized: O0, scope: &mut crate::Scope) -> crate::Result { ParseTensor::new().build(serialized, scope) } + /// Builder for the `PartitionedCall` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PartitionedCall { @@ -68600,6 +83599,12 @@ pub struct PartitionedCall { executor_type: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PartitionedCall' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PartitionedCallInst { + /// An instance of a fully built PartitionedCall Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PartitionedCall { /// Creates a new `PartitionedCall`. @@ -68608,55 +83613,37 @@ impl PartitionedCall { } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } /// Sets the `config_proto` attribute. - pub fn config_proto>( - mut self, - value: ArgType, - ) -> Self { + pub fn config_proto>(mut self, value: ArgType) -> Self { self.config_proto = ::std::option::Option::Some(value.into()); self } /// Sets the `executor_type` attribute. - pub fn executor_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn executor_type>(mut self, value: ArgType) -> Self { self.executor_type = ::std::option::Option::Some(value.into()); self } @@ -68668,54 +83655,89 @@ impl PartitionedCall { } /// Builds the `PartitionedCall` operation. - pub fn build>( - &self, - args: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, args: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(args.into(), scope) } - - fn build_impl( - &self, - args: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, args: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PartitionedCall", |nd| { nd.add_input(args); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } - if let ::std::option::Option::Some(value) = &self.config_proto { - nd.set_attr_string("config_proto", value)?; - } - if let ::std::option::Option::Some(value) = &self.executor_type { - nd.set_attr_string("executor_type", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + if let ::std::option::Option::Some(value) = &self.config_proto { + nd.set_attr_string("config_proto", value)?; + } + if let ::std::option::Option::Some(value) = &self.executor_type { + nd.set_attr_string("executor_type", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PartitionedCall` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, args: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(args.into(), scope) + } + fn build_instance_impl(&self, args: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PartitionedCall", |nd| { + nd.add_input(args); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + if let ::std::option::Option::Some(value) = &self.config_proto { + nd.set_attr_string("config_proto", value)?; + } + if let ::std::option::Option::Some(value) = &self.executor_type { + nd.set_attr_string("executor_type", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PartitionedCallInst{op}) + } +} +impl PartitionedCallInst { + /// Returns the 'output' output of this 'PartitionedCall' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PartitionedCallInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PartitionedCall::new().build(args, scope)`. -pub fn partitioned_call>( - args: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn partitioned_call>(args: O0, scope: &mut crate::Scope) -> crate::Result { PartitionedCall::new().build(args, scope) } + /// Builder for the `Placeholder` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Placeholder { @@ -68723,6 +83745,12 @@ pub struct Placeholder { shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Placeholder' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PlaceholderInst { + /// An instance of a fully built Placeholder Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Placeholder { /// Creates a new `Placeholder`. @@ -68749,30 +83777,63 @@ impl Placeholder { } /// Builds the `Placeholder` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Placeholder", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Placeholder` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Placeholder", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PlaceholderInst{op}) + } +} +impl PlaceholderInst { + /// Returns the 'output' output of this 'Placeholder' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PlaceholderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Placeholder::new().build(scope)`. -pub fn placeholder(scope: &mut crate::Scope) -> crate::Result { +pub fn placeholder<>(scope: &mut crate::Scope) -> crate::Result { Placeholder::new().build(scope) } + /// Builder for the `PlaceholderV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PlaceholderV2 { @@ -68780,6 +83841,12 @@ pub struct PlaceholderV2 { shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'PlaceholderV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PlaceholderV2Inst { + /// An instance of a fully built PlaceholderV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PlaceholderV2 { /// Creates a new `PlaceholderV2`. @@ -68806,30 +83873,63 @@ impl PlaceholderV2 { } /// Builds the `PlaceholderV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PlaceholderV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PlaceholderV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PlaceholderV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PlaceholderV2Inst{op}) + } +} +impl PlaceholderV2Inst { + /// Returns the 'output' output of this 'PlaceholderV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PlaceholderV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PlaceholderV2::new().build(scope)`. -pub fn placeholder_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn placeholder_v2<>(scope: &mut crate::Scope) -> crate::Result { PlaceholderV2::new().build(scope) } + /// Builder for the `PlaceholderWithDefault` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PlaceholderWithDefault { @@ -68837,6 +83937,12 @@ pub struct PlaceholderWithDefault { shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'PlaceholderWithDefault' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PlaceholderWithDefaultInst { + /// An instance of a fully built PlaceholderWithDefault Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PlaceholderWithDefault { /// Creates a new `PlaceholderWithDefault`. @@ -68863,48 +83969,77 @@ impl PlaceholderWithDefault { } /// Builds the `PlaceholderWithDefault` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PlaceholderWithDefault", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PlaceholderWithDefault` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PlaceholderWithDefault", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PlaceholderWithDefaultInst{op}) + } +} +impl PlaceholderWithDefaultInst { + /// Returns the 'output' output of this 'PlaceholderWithDefault' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PlaceholderWithDefaultInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PlaceholderWithDefault::new().build(input, scope)`. -pub fn placeholder_with_default>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn placeholder_with_default>(input: O0, scope: &mut crate::Scope) -> crate::Result { PlaceholderWithDefault::new().build(input, scope) } + /// Builder for the `Polygamma` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Polygamma { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Polygamma' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PolygammaInst { + /// An instance of a fully built Polygamma Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Polygamma { /// Creates a new `Polygamma`. @@ -68925,55 +84060,73 @@ impl Polygamma { } /// Builds the `Polygamma` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - x: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), x.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Polygamma", |nd| { nd.add_input(a); nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Polygamma` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), x.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Polygamma", |nd| { + nd.add_input(a); + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PolygammaInst{op}) + } +} +impl PolygammaInst { + /// Returns the 'z' output of this 'Polygamma' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PolygammaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Polygamma::new().build(a, x, scope)`. -pub fn polygamma< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - a: O0, - x: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn polygamma, O1: ::std::convert::Into>(a: O0, x: O1, scope: &mut crate::Scope) -> crate::Result { Polygamma::new().build(a, x, scope) } + /// Builder for the `PopulationCount` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PopulationCount { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'PopulationCount' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PopulationCountInst { + /// An instance of a fully built PopulationCount Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PopulationCount { /// Creates a new `PopulationCount`. @@ -68994,45 +84147,71 @@ impl PopulationCount { } /// Builds the `PopulationCount` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PopulationCount", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PopulationCount` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PopulationCount", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PopulationCountInst{op}) + } +} +impl PopulationCountInst { + /// Returns the 'y' output of this 'PopulationCount' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PopulationCountInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PopulationCount::new().build(x, scope)`. -pub fn population_count>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn population_count>(x: O0, scope: &mut crate::Scope) -> crate::Result { PopulationCount::new().build(x, scope) } + /// Builder for the `Pow` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Pow { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Pow' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PowInst { + /// An instance of a fully built Pow Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Pow { /// Creates a new `Pow`. @@ -69053,46 +84232,61 @@ impl Pow { } /// Builds the `Pow` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Pow", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Pow` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Pow", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PowInst{op}) + } +} +impl PowInst { + /// Returns the 'z' output of this 'Pow' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PowInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Pow::new().build(x, y, scope)`. -pub fn pow, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn pow, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Pow::new().build(x, y, scope) } + /// Builder for the `PrefetchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PrefetchDataset { @@ -69104,6 +84298,12 @@ pub struct PrefetchDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PrefetchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PrefetchDatasetInst { + /// An instance of a fully built PrefetchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PrefetchDataset { /// Creates a new `PrefetchDataset`. @@ -69112,19 +84312,13 @@ impl PrefetchDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -69148,10 +84342,7 @@ impl PrefetchDataset { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -69163,64 +84354,91 @@ impl PrefetchDataset { } /// Builds the `PrefetchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - buffer_size: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), buffer_size.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - buffer_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PrefetchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(buffer_size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.slack_period { - nd.set_attr_int("slack_period", *value)?; - } - if let ::std::option::Option::Some(value) = &self.legacy_autotune { - nd.set_attr_bool("legacy_autotune", *value)?; - } - if let ::std::option::Option::Some(value) = &self.buffer_size_min { - nd.set_attr_int("buffer_size_min", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.slack_period { + nd.set_attr_int("slack_period", *value)?; + } + if let ::std::option::Option::Some(value) = &self.legacy_autotune { + nd.set_attr_bool("legacy_autotune", *value)?; + } + if let ::std::option::Option::Some(value) = &self.buffer_size_min { + nd.set_attr_int("buffer_size_min", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PrefetchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), buffer_size.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PrefetchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(buffer_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.slack_period { + nd.set_attr_int("slack_period", *value)?; + } + if let ::std::option::Option::Some(value) = &self.legacy_autotune { + nd.set_attr_bool("legacy_autotune", *value)?; + } + if let ::std::option::Option::Some(value) = &self.buffer_size_min { + nd.set_attr_int("buffer_size_min", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PrefetchDatasetInst{op}) + } +} +impl PrefetchDatasetInst { + /// Returns the 'handle' output of this 'PrefetchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PrefetchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PrefetchDataset::new().build(input_dataset, buffer_size, scope)`. -pub fn prefetch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - buffer_size: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn prefetch_dataset, O1: ::std::convert::Into>(input_dataset: O0, buffer_size: O1, scope: &mut crate::Scope) -> crate::Result { PrefetchDataset::new().build(input_dataset, buffer_size, scope) } + /// Builder for the `Prelinearize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Prelinearize { @@ -69229,6 +84447,12 @@ pub struct Prelinearize { layout: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Prelinearize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PrelinearizeInst { + /// An instance of a fully built Prelinearize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Prelinearize { /// Creates a new `Prelinearize`. @@ -69249,10 +84473,7 @@ impl Prelinearize { } /// Sets the `layout` attribute. - pub fn layout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn layout>>(mut self, value: ArgType) -> Self { self.layout = ::std::option::Option::Some(value.into()); self } @@ -69264,45 +84485,71 @@ impl Prelinearize { } /// Builds the `Prelinearize` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Prelinearize", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.layout { - nd.set_attr_int_list("layout", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.layout { + nd.set_attr_int_list("layout", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Prelinearize` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Prelinearize", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.layout { + nd.set_attr_int_list("layout", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PrelinearizeInst{op}) + } +} +impl PrelinearizeInst { + /// Returns the 'output' output of this 'Prelinearize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PrelinearizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Prelinearize::new().build(input, scope)`. -pub fn prelinearize>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn prelinearize>(input: O0, scope: &mut crate::Scope) -> crate::Result { Prelinearize::new().build(input, scope) } + /// Builder for the `PrelinearizeTuple` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PrelinearizeTuple { @@ -69311,6 +84558,12 @@ pub struct PrelinearizeTuple { layouts: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PrelinearizeTuple' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PrelinearizeTupleInst { + /// An instance of a fully built PrelinearizeTuple Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PrelinearizeTuple { /// Creates a new `PrelinearizeTuple`. @@ -69319,28 +84572,19 @@ impl PrelinearizeTuple { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `layouts` attribute. - pub fn layouts>>( - mut self, - value: ArgType, - ) -> Self { + pub fn layouts>>(mut self, value: ArgType) -> Self { self.layouts = ::std::option::Option::Some(value.into()); self } @@ -69352,45 +84596,71 @@ impl PrelinearizeTuple { } /// Builds the `PrelinearizeTuple` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PrelinearizeTuple", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.layouts { - nd.set_attr_int_list("layouts", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.layouts { + nd.set_attr_int_list("layouts", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PrelinearizeTuple` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PrelinearizeTuple", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.layouts { + nd.set_attr_int_list("layouts", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PrelinearizeTupleInst{op}) + } +} +impl PrelinearizeTupleInst { + /// Returns the 'output' output of this 'PrelinearizeTuple' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PrelinearizeTupleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PrelinearizeTuple::new().build(inputs, scope)`. -pub fn prelinearize_tuple>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn prelinearize_tuple>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { PrelinearizeTuple::new().build(inputs, scope) } + /// Builder for the `PreventGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PreventGradient { @@ -69398,6 +84668,12 @@ pub struct PreventGradient { message: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PreventGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PreventGradientInst { + /// An instance of a fully built PreventGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PreventGradient { /// Creates a new `PreventGradient`. @@ -69412,10 +84688,7 @@ impl PreventGradient { } /// Sets the `message` attribute. - pub fn message>( - mut self, - value: ArgType, - ) -> Self { + pub fn message>(mut self, value: ArgType) -> Self { self.message = ::std::option::Option::Some(value.into()); self } @@ -69427,42 +84700,65 @@ impl PreventGradient { } /// Builds the `PreventGradient` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PreventGradient", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.message { - nd.set_attr_string("message", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.message { + nd.set_attr_string("message", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PreventGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PreventGradient", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.message { + nd.set_attr_string("message", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PreventGradientInst{op}) + } +} +impl PreventGradientInst { + /// Returns the 'output' output of this 'PreventGradient' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PreventGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PreventGradient::new().build(input, scope)`. -pub fn prevent_gradient>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn prevent_gradient>(input: O0, scope: &mut crate::Scope) -> crate::Result { PreventGradient::new().build(input, scope) } + /// Builder for the `Print` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Print { @@ -69473,6 +84769,12 @@ pub struct Print { summarize: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Print' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PrintInst { + /// An instance of a fully built Print Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Print { /// Creates a new `Print`. @@ -69487,19 +84789,13 @@ impl Print { } /// Sets the `U` attribute. - pub fn U>>( - mut self, - value: ArgType, - ) -> Self { + pub fn U>>(mut self, value: ArgType) -> Self { self.U = ::std::option::Option::Some(value.into()); self } /// Sets the `message` attribute. - pub fn message>( - mut self, - value: ArgType, - ) -> Self { + pub fn message>(mut self, value: ArgType) -> Self { self.message = ::std::option::Option::Some(value.into()); self } @@ -69523,58 +84819,85 @@ impl Print { } /// Builds the `Print` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - data: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), data.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Print", |nd| { nd.add_input(input); nd.add_input(data); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.U { - nd.set_attr_type_list("U", value)?; - } - if let ::std::option::Option::Some(value) = &self.message { - nd.set_attr_string("message", value)?; - } - if let ::std::option::Option::Some(value) = &self.first_n { - nd.set_attr_int("first_n", *value)?; - } - if let ::std::option::Option::Some(value) = &self.summarize { - nd.set_attr_int("summarize", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.U { + nd.set_attr_type_list("U", value)?; + } + if let ::std::option::Option::Some(value) = &self.message { + nd.set_attr_string("message", value)?; + } + if let ::std::option::Option::Some(value) = &self.first_n { + nd.set_attr_int("first_n", *value)?; + } + if let ::std::option::Option::Some(value) = &self.summarize { + nd.set_attr_int("summarize", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Print` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), data.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Print", |nd| { + nd.add_input(input); + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.U { + nd.set_attr_type_list("U", value)?; + } + if let ::std::option::Option::Some(value) = &self.message { + nd.set_attr_string("message", value)?; + } + if let ::std::option::Option::Some(value) = &self.first_n { + nd.set_attr_int("first_n", *value)?; + } + if let ::std::option::Option::Some(value) = &self.summarize { + nd.set_attr_int("summarize", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PrintInst{op}) + } +} +impl PrintInst { + /// Returns the 'output' output of this 'Print' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PrintInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Print::new().build(input, data, scope)`. -pub fn print, O1: ::std::convert::Into>( - input: O0, - data: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn print, O1: ::std::convert::Into>(input: O0, data: O1, scope: &mut crate::Scope) -> crate::Result { Print::new().build(input, data, scope) } + /// Builder for the `PrintV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PrintV2 { @@ -69582,6 +84905,12 @@ pub struct PrintV2 { end: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PrintV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PrintV2Inst { + /// An instance of a fully built PrintV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PrintV2 { /// Creates a new `PrintV2`. @@ -69590,19 +84919,13 @@ impl PrintV2 { } /// Sets the `output_stream` attribute. - pub fn output_stream>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_stream>(mut self, value: ArgType) -> Self { self.output_stream = ::std::option::Option::Some(value.into()); self } /// Sets the `end` attribute. - pub fn end>( - mut self, - value: ArgType, - ) -> Self { + pub fn end>(mut self, value: ArgType) -> Self { self.end = ::std::option::Option::Some(value.into()); self } @@ -69614,42 +84937,58 @@ impl PrintV2 { } /// Builds the `PrintV2` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PrintV2", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_stream { - nd.set_attr_string("output_stream", value)?; - } - if let ::std::option::Option::Some(value) = &self.end { - nd.set_attr_string("end", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_stream { + nd.set_attr_string("output_stream", value)?; + } + if let ::std::option::Option::Some(value) = &self.end { + nd.set_attr_string("end", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PrintV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PrintV2", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_stream { + nd.set_attr_string("output_stream", value)?; + } + if let ::std::option::Option::Some(value) = &self.end { + nd.set_attr_string("end", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PrintV2Inst{op}) + } +} +impl PrintV2Inst { +} +impl Into for PrintV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PrintV2::new().build(input, scope)`. -pub fn print_v2>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn print_v2>(input: O0, scope: &mut crate::Scope) -> crate::Result { PrintV2::new().build(input, scope) } + /// Builder for the `PriorityQueue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PriorityQueue { @@ -69660,6 +84999,12 @@ pub struct PriorityQueue { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PriorityQueue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PriorityQueueInst { + /// An instance of a fully built PriorityQueue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PriorityQueue { /// Creates a new `PriorityQueue`. @@ -69668,19 +85013,13 @@ impl PriorityQueue { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -69692,19 +85031,13 @@ impl PriorityQueue { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -69716,39 +85049,81 @@ impl PriorityQueue { } /// Builds the `PriorityQueue` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PriorityQueue", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PriorityQueue` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PriorityQueue", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PriorityQueueInst{op}) + } +} +impl PriorityQueueInst { + /// Returns the 'handle' output of this 'PriorityQueue' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PriorityQueueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PriorityQueue::new().build(scope)`. -pub fn priority_queue(scope: &mut crate::Scope) -> crate::Result { +pub fn priority_queue<>(scope: &mut crate::Scope) -> crate::Result { PriorityQueue::new().build(scope) } + /// Builder for the `PriorityQueueV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PriorityQueueV2 { @@ -69759,6 +85134,12 @@ pub struct PriorityQueueV2 { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PriorityQueueV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PriorityQueueV2Inst { + /// An instance of a fully built PriorityQueueV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PriorityQueueV2 { /// Creates a new `PriorityQueueV2`. @@ -69767,19 +85148,13 @@ impl PriorityQueueV2 { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -69791,19 +85166,13 @@ impl PriorityQueueV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -69815,39 +85184,81 @@ impl PriorityQueueV2 { } /// Builds the `PriorityQueueV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PriorityQueueV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PriorityQueueV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PriorityQueueV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PriorityQueueV2Inst{op}) + } +} +impl PriorityQueueV2Inst { + /// Returns the 'handle' output of this 'PriorityQueueV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PriorityQueueV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PriorityQueueV2::new().build(scope)`. -pub fn priority_queue_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn priority_queue_v2<>(scope: &mut crate::Scope) -> crate::Result { PriorityQueueV2::new().build(scope) } + /// Builder for the `PrivateThreadPoolDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PrivateThreadPoolDataset { @@ -69855,6 +85266,12 @@ pub struct PrivateThreadPoolDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PrivateThreadPoolDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PrivateThreadPoolDatasetInst { + /// An instance of a fully built PrivateThreadPoolDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PrivateThreadPoolDataset { /// Creates a new `PrivateThreadPoolDataset`. @@ -69863,19 +85280,13 @@ impl PrivateThreadPoolDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -69887,52 +85298,67 @@ impl PrivateThreadPoolDataset { } /// Builds the `PrivateThreadPoolDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - num_threads: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, num_threads: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), num_threads.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - num_threads: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, num_threads: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PrivateThreadPoolDataset", |nd| { nd.add_input(input_dataset); nd.add_input(num_threads); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PrivateThreadPoolDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, num_threads: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), num_threads.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, num_threads: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PrivateThreadPoolDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(num_threads); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PrivateThreadPoolDatasetInst{op}) + } +} +impl PrivateThreadPoolDatasetInst { + /// Returns the 'handle' output of this 'PrivateThreadPoolDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PrivateThreadPoolDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PrivateThreadPoolDataset::new().build(input_dataset, num_threads, scope)`. -pub fn private_thread_pool_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - num_threads: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn private_thread_pool_dataset, O1: ::std::convert::Into>(input_dataset: O0, num_threads: O1, scope: &mut crate::Scope) -> crate::Result { PrivateThreadPoolDataset::new().build(input_dataset, num_threads, scope) } + /// Builder for the `Prod` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Prod { @@ -69941,6 +85367,12 @@ pub struct Prod { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Prod' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ProdInst { + /// An instance of a fully built Prod Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Prod { /// Creates a new `Prod`. @@ -69973,52 +85405,73 @@ impl Prod { } /// Builds the `Prod` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), reduction_indices.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - reduction_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Prod", |nd| { nd.add_input(input); nd.add_input(reduction_indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Prod` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), reduction_indices.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Prod", |nd| { + nd.add_input(input); + nd.add_input(reduction_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ProdInst{op}) + } +} +impl ProdInst { + /// Returns the 'output' output of this 'Prod' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ProdInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Prod::new().build(input, reduction_indices, scope)`. -pub fn prod, O1: ::std::convert::Into>( - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn prod, O1: ::std::convert::Into>(input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { Prod::new().build(input, reduction_indices, scope) } + /// Builder for the `PyFunc` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PyFunc { @@ -70027,6 +85480,12 @@ pub struct PyFunc { Tout: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PyFunc' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PyFuncInst { + /// An instance of a fully built PyFunc Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PyFunc { /// Creates a new `PyFunc`. @@ -70035,28 +85494,19 @@ impl PyFunc { } /// Sets the `token` attribute. - pub fn token>( - mut self, - value: ArgType, - ) -> Self { + pub fn token>(mut self, value: ArgType) -> Self { self.token = ::std::option::Option::Some(value.into()); self } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } @@ -70068,45 +85518,71 @@ impl PyFunc { } /// Builds the `PyFunc` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PyFunc", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.token { - nd.set_attr_string("token", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } + if let ::std::option::Option::Some(value) = &self.token { + nd.set_attr_string("token", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PyFunc` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PyFunc", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.token { + nd.set_attr_string("token", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PyFuncInst{op}) + } +} +impl PyFuncInst { + /// Returns the 'output' output of this 'PyFunc' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PyFuncInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PyFunc::new().build(input, scope)`. -pub fn py_func>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn py_func>(input: O0, scope: &mut crate::Scope) -> crate::Result { PyFunc::new().build(input, scope) } + /// Builder for the `PyFuncStateless` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct PyFuncStateless { @@ -70115,6 +85591,12 @@ pub struct PyFuncStateless { Tout: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'PyFuncStateless' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct PyFuncStatelessInst { + /// An instance of a fully built PyFuncStateless Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl PyFuncStateless { /// Creates a new `PyFuncStateless`. @@ -70123,28 +85605,19 @@ impl PyFuncStateless { } /// Sets the `token` attribute. - pub fn token>( - mut self, - value: ArgType, - ) -> Self { + pub fn token>(mut self, value: ArgType) -> Self { self.token = ::std::option::Option::Some(value.into()); self } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } @@ -70156,45 +85629,71 @@ impl PyFuncStateless { } /// Builds the `PyFuncStateless` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("PyFuncStateless", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.token { - nd.set_attr_string("token", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } + if let ::std::option::Option::Some(value) = &self.token { + nd.set_attr_string("token", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `PyFuncStateless` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("PyFuncStateless", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.token { + nd.set_attr_string("token", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(PyFuncStatelessInst{op}) + } +} +impl PyFuncStatelessInst { + /// Returns the 'output' output of this 'PyFuncStateless' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for PyFuncStatelessInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `PyFuncStateless::new().build(input, scope)`. -pub fn py_func_stateless>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn py_func_stateless>(input: O0, scope: &mut crate::Scope) -> crate::Result { PyFuncStateless::new().build(input, scope) } + /// Builder for the `Qr` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Qr { @@ -70202,6 +85701,12 @@ pub struct Qr { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Qr' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QrInst { + /// An instance of a fully built Qr Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Qr { /// Creates a new `Qr`. @@ -70228,42 +85733,72 @@ impl Qr { } /// Builds the `Qr` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Qr", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.full_matrices { - nd.set_attr_bool("full_matrices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.full_matrices { + nd.set_attr_bool("full_matrices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Qr` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Qr", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.full_matrices { + nd.set_attr_bool("full_matrices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QrInst{op}) + } +} +impl QrInst { + /// Returns the 'q' output of this 'Qr' operation. + pub fn q(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'r' output of this 'Qr' operation. + pub fn r(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for QrInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Qr::new().build(input, scope)`. -pub fn qr>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn qr>(input: O0, scope: &mut crate::Scope) -> crate::Result { Qr::new().build(input, scope) } + /// Builder for the `QuantizeAndDequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizeAndDequantize { @@ -70275,6 +85810,12 @@ pub struct QuantizeAndDequantize { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizeAndDequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizeAndDequantizeInst { + /// An instance of a fully built QuantizeAndDequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizeAndDequantize { /// Creates a new `QuantizeAndDequantize`. @@ -70325,54 +85866,89 @@ impl QuantizeAndDequantize { } /// Builds the `QuantizeAndDequantize` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizeAndDequantize", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.signed_input { - nd.set_attr_bool("signed_input", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_bits { - nd.set_attr_int("num_bits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.range_given { - nd.set_attr_bool("range_given", *value)?; - } - if let ::std::option::Option::Some(value) = &self.input_min { - nd.set_attr_float("input_min", *value)?; - } - if let ::std::option::Option::Some(value) = &self.input_max { - nd.set_attr_float("input_max", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.signed_input { + nd.set_attr_bool("signed_input", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_given { + nd.set_attr_bool("range_given", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_min { + nd.set_attr_float("input_min", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_max { + nd.set_attr_float("input_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizeAndDequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizeAndDequantize", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.signed_input { + nd.set_attr_bool("signed_input", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_given { + nd.set_attr_bool("range_given", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_min { + nd.set_attr_float("input_min", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_max { + nd.set_attr_float("input_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizeAndDequantizeInst{op}) + } +} +impl QuantizeAndDequantizeInst { + /// Returns the 'output' output of this 'QuantizeAndDequantize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QuantizeAndDequantizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizeAndDequantize::new().build(input, scope)`. -pub fn quantize_and_dequantize>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantize_and_dequantize>(input: O0, scope: &mut crate::Scope) -> crate::Result { QuantizeAndDequantize::new().build(input, scope) } + /// Builder for the `QuantizeAndDequantizeV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizeAndDequantizeV2 { @@ -70385,6 +85961,12 @@ pub struct QuantizeAndDequantizeV2 { axis: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizeAndDequantizeV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizeAndDequantizeV2Inst { + /// An instance of a fully built QuantizeAndDequantizeV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizeAndDequantizeV2 { /// Creates a new `QuantizeAndDequantizeV2`. @@ -70417,10 +85999,7 @@ impl QuantizeAndDequantizeV2 { } /// Sets the `round_mode` attribute. - pub fn round_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn round_mode>(mut self, value: ArgType) -> Self { self.round_mode = ::std::option::Option::Some(value.into()); self } @@ -70444,27 +86023,10 @@ impl QuantizeAndDequantizeV2 { } /// Builds the `QuantizeAndDequantizeV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - input_min: O1, - input_max: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), input_min.into(), input_max.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - input_min: crate::Output, - input_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizeAndDequantizeV2", |nd| { nd.add_input(input); nd.add_input(input_min); @@ -70472,45 +86034,88 @@ impl QuantizeAndDequantizeV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.signed_input { - nd.set_attr_bool("signed_input", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_bits { - nd.set_attr_int("num_bits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.range_given { - nd.set_attr_bool("range_given", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.round_mode { - nd.set_attr_string("round_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } - if let ::std::option::Option::Some(value) = &self.axis { - nd.set_attr_int("axis", *value)?; - } + if let ::std::option::Option::Some(value) = &self.signed_input { + nd.set_attr_bool("signed_input", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_given { + nd.set_attr_bool("range_given", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.round_mode { + nd.set_attr_string("round_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizeAndDequantizeV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_min.into(), input_max.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizeAndDequantizeV2", |nd| { + nd.add_input(input); + nd.add_input(input_min); + nd.add_input(input_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.signed_input { + nd.set_attr_bool("signed_input", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_given { + nd.set_attr_bool("range_given", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.round_mode { + nd.set_attr_string("round_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizeAndDequantizeV2Inst{op}) + } +} +impl QuantizeAndDequantizeV2Inst { + /// Returns the 'output' output of this 'QuantizeAndDequantizeV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QuantizeAndDequantizeV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizeAndDequantizeV2::new().build(input, input_min, input_max, scope)`. -pub fn quantize_and_dequantize_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - input_min: O1, - input_max: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantize_and_dequantize_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { QuantizeAndDequantizeV2::new().build(input, input_min, input_max, scope) } + /// Builder for the `QuantizeAndDequantizeV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizeAndDequantizeV3 { @@ -70521,6 +86126,12 @@ pub struct QuantizeAndDequantizeV3 { axis: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizeAndDequantizeV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizeAndDequantizeV3Inst { + /// An instance of a fully built QuantizeAndDequantizeV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizeAndDequantizeV3 { /// Creates a new `QuantizeAndDequantizeV3`. @@ -70565,36 +86176,10 @@ impl QuantizeAndDequantizeV3 { } /// Builds the `QuantizeAndDequantizeV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input: O0, - input_min: O1, - input_max: O2, - num_bits: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - input_min.into(), - input_max.into(), - num_bits.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - input_min: crate::Output, - input_max: crate::Output, - num_bits: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, num_bits: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), input_min.into(), input_max.into(), num_bits.into(), scope) + } + fn build_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, num_bits: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizeAndDequantizeV3", |nd| { nd.add_input(input); nd.add_input(input_min); @@ -70603,41 +86188,77 @@ impl QuantizeAndDequantizeV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.signed_input { - nd.set_attr_bool("signed_input", *value)?; - } - if let ::std::option::Option::Some(value) = &self.range_given { - nd.set_attr_bool("range_given", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } - if let ::std::option::Option::Some(value) = &self.axis { - nd.set_attr_int("axis", *value)?; - } + if let ::std::option::Option::Some(value) = &self.signed_input { + nd.set_attr_bool("signed_input", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_given { + nd.set_attr_bool("range_given", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizeAndDequantizeV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, num_bits: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_min.into(), input_max.into(), num_bits.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, num_bits: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizeAndDequantizeV3", |nd| { + nd.add_input(input); + nd.add_input(input_min); + nd.add_input(input_max); + nd.add_input(num_bits); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.signed_input { + nd.set_attr_bool("signed_input", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_given { + nd.set_attr_bool("range_given", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizeAndDequantizeV3Inst{op}) + } +} +impl QuantizeAndDequantizeV3Inst { + /// Returns the 'output' output of this 'QuantizeAndDequantizeV3' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QuantizeAndDequantizeV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizeAndDequantizeV3::new().build(input, input_min, input_max, num_bits, scope)`. -pub fn quantize_and_dequantize_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input: O0, - input_min: O1, - input_max: O2, - num_bits: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantize_and_dequantize_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input: O0, input_min: O1, input_max: O2, num_bits: O3, scope: &mut crate::Scope) -> crate::Result { QuantizeAndDequantizeV3::new().build(input, input_min, input_max, num_bits, scope) } + /// Builder for the `QuantizeAndDequantizeV4` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizeAndDequantizeV4 { @@ -70650,6 +86271,12 @@ pub struct QuantizeAndDequantizeV4 { axis: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizeAndDequantizeV4' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizeAndDequantizeV4Inst { + /// An instance of a fully built QuantizeAndDequantizeV4 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizeAndDequantizeV4 { /// Creates a new `QuantizeAndDequantizeV4`. @@ -70682,10 +86309,7 @@ impl QuantizeAndDequantizeV4 { } /// Sets the `round_mode` attribute. - pub fn round_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn round_mode>(mut self, value: ArgType) -> Self { self.round_mode = ::std::option::Option::Some(value.into()); self } @@ -70709,27 +86333,10 @@ impl QuantizeAndDequantizeV4 { } /// Builds the `QuantizeAndDequantizeV4` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - input_min: O1, - input_max: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), input_min.into(), input_max.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - input_min: crate::Output, - input_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizeAndDequantizeV4", |nd| { nd.add_input(input); nd.add_input(input_min); @@ -70737,45 +86344,88 @@ impl QuantizeAndDequantizeV4 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.signed_input { - nd.set_attr_bool("signed_input", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_bits { - nd.set_attr_int("num_bits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.range_given { - nd.set_attr_bool("range_given", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.round_mode { - nd.set_attr_string("round_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } - if let ::std::option::Option::Some(value) = &self.axis { - nd.set_attr_int("axis", *value)?; - } + if let ::std::option::Option::Some(value) = &self.signed_input { + nd.set_attr_bool("signed_input", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_given { + nd.set_attr_bool("range_given", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.round_mode { + nd.set_attr_string("round_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizeAndDequantizeV4` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_min.into(), input_max.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizeAndDequantizeV4", |nd| { + nd.add_input(input); + nd.add_input(input_min); + nd.add_input(input_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.signed_input { + nd.set_attr_bool("signed_input", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_bits { + nd.set_attr_int("num_bits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_given { + nd.set_attr_bool("range_given", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.round_mode { + nd.set_attr_string("round_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizeAndDequantizeV4Inst{op}) + } +} +impl QuantizeAndDequantizeV4Inst { + /// Returns the 'output' output of this 'QuantizeAndDequantizeV4' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QuantizeAndDequantizeV4Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizeAndDequantizeV4::new().build(input, input_min, input_max, scope)`. -pub fn quantize_and_dequantize_v4< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - input_min: O1, - input_max: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantize_and_dequantize_v4, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { QuantizeAndDequantizeV4::new().build(input, input_min, input_max, scope) } + /// Builder for the `QuantizeAndDequantizeV4Grad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizeAndDequantizeV4Grad { @@ -70783,6 +86433,12 @@ pub struct QuantizeAndDequantizeV4Grad { axis: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizeAndDequantizeV4Grad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizeAndDequantizeV4GradInst { + /// An instance of a fully built QuantizeAndDequantizeV4Grad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizeAndDequantizeV4Grad { /// Creates a new `QuantizeAndDequantizeV4Grad`. @@ -70809,36 +86465,10 @@ impl QuantizeAndDequantizeV4Grad { } /// Builds the `QuantizeAndDequantizeV4Grad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - gradients: O0, - input: O1, - input_min: O2, - input_max: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - gradients.into(), - input.into(), - input_min.into(), - input_max.into(), - scope, - ) - } - - fn build_impl( - &self, - gradients: crate::Output, - input: crate::Output, - input_min: crate::Output, - input_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, gradients: O0, input: O1, input_min: O2, input_max: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(gradients.into(), input.into(), input_min.into(), input_max.into(), scope) + } + fn build_impl(&self, gradients: crate::Output, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizeAndDequantizeV4Grad", |nd| { nd.add_input(gradients); nd.add_input(input); @@ -70847,32 +86477,73 @@ impl QuantizeAndDequantizeV4Grad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.axis { - nd.set_attr_int("axis", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizeAndDequantizeV4Grad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, gradients: O0, input: O1, input_min: O2, input_max: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), input.into(), input_min.into(), input_max.into(), scope) + } + fn build_instance_impl(&self, gradients: crate::Output, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizeAndDequantizeV4Grad", |nd| { + nd.add_input(gradients); + nd.add_input(input); + nd.add_input(input_min); + nd.add_input(input_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizeAndDequantizeV4GradInst{op}) + } +} +impl QuantizeAndDequantizeV4GradInst { + /// Returns the 'input_backprop' output of this 'QuantizeAndDequantizeV4Grad' operation. + pub fn input_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'input_min_backprop' output of this 'QuantizeAndDequantizeV4Grad' operation. + pub fn input_min_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'input_max_backprop' output of this 'QuantizeAndDequantizeV4Grad' operation. + pub fn input_max_backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizeAndDequantizeV4GradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizeAndDequantizeV4Grad::new().build(gradients, input, input_min, input_max, scope)`. -pub fn quantize_and_dequantize_v4_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - gradients: O0, - input: O1, - input_min: O2, - input_max: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantize_and_dequantize_v4_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(gradients: O0, input: O1, input_min: O2, input_max: O3, scope: &mut crate::Scope) -> crate::Result { QuantizeAndDequantizeV4Grad::new().build(gradients, input, input_min, input_max, scope) } + /// Builder for the `QuantizeDownAndShrinkRange` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizeDownAndShrinkRange { @@ -70880,6 +86551,12 @@ pub struct QuantizeDownAndShrinkRange { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizeDownAndShrinkRange' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizeDownAndShrinkRangeInst { + /// An instance of a fully built QuantizeDownAndShrinkRange Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizeDownAndShrinkRange { /// Creates a new `QuantizeDownAndShrinkRange`. @@ -70888,19 +86565,13 @@ impl QuantizeDownAndShrinkRange { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -70912,27 +86583,10 @@ impl QuantizeDownAndShrinkRange { } /// Builds the `QuantizeDownAndShrinkRange` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - input_min: O1, - input_max: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), input_min.into(), input_max.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - input_min: crate::Output, - input_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizeDownAndShrinkRange", |nd| { nd.add_input(input); nd.add_input(input_min); @@ -70940,30 +86594,72 @@ impl QuantizeDownAndShrinkRange { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizeDownAndShrinkRange` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_min.into(), input_max.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizeDownAndShrinkRange", |nd| { + nd.add_input(input); + nd.add_input(input_min); + nd.add_input(input_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizeDownAndShrinkRangeInst{op}) + } +} +impl QuantizeDownAndShrinkRangeInst { + /// Returns the 'output' output of this 'QuantizeDownAndShrinkRange' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_min' output of this 'QuantizeDownAndShrinkRange' operation. + pub fn output_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_max' output of this 'QuantizeDownAndShrinkRange' operation. + pub fn output_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizeDownAndShrinkRangeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizeDownAndShrinkRange::new().build(input, input_min, input_max, scope)`. -pub fn quantize_down_and_shrink_range< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - input_min: O1, - input_max: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantize_down_and_shrink_range, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { QuantizeDownAndShrinkRange::new().build(input, input_min, input_max, scope) } + /// Builder for the `QuantizeV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizeV2 { @@ -70975,6 +86671,12 @@ pub struct QuantizeV2 { ensure_minimum_range: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizeV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizeV2Inst { + /// An instance of a fully built QuantizeV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizeV2 { /// Creates a new `QuantizeV2`. @@ -70989,19 +86691,13 @@ impl QuantizeV2 { } /// Sets the `mode` attribute. - pub fn mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn mode>(mut self, value: ArgType) -> Self { self.mode = ::std::option::Option::Some(value.into()); self } /// Sets the `round_mode` attribute. - pub fn round_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn round_mode>(mut self, value: ArgType) -> Self { self.round_mode = ::std::option::Option::Some(value.into()); self } @@ -71019,10 +86715,7 @@ impl QuantizeV2 { } /// Sets the `ensure_minimum_range` attribute. - pub fn ensure_minimum_range>( - mut self, - value: ArgType, - ) -> Self { + pub fn ensure_minimum_range>(mut self, value: ArgType) -> Self { self.ensure_minimum_range = ::std::option::Option::Some(value.into()); self } @@ -71034,27 +86727,10 @@ impl QuantizeV2 { } /// Builds the `QuantizeV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - min_range: O1, - max_range: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, min_range: O1, max_range: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), min_range.into(), max_range.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - min_range: crate::Output, - max_range: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, min_range: crate::Output, max_range: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizeV2", |nd| { nd.add_input(input); nd.add_input(min_range); @@ -71062,42 +86738,96 @@ impl QuantizeV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.mode { - nd.set_attr_string("mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.round_mode { - nd.set_attr_string("round_mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.narrow_range { - nd.set_attr_bool("narrow_range", *value)?; - } - if let ::std::option::Option::Some(value) = &self.axis { - nd.set_attr_int("axis", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ensure_minimum_range { - nd.set_attr_float("ensure_minimum_range", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.round_mode { + nd.set_attr_string("round_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ensure_minimum_range { + nd.set_attr_float("ensure_minimum_range", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizeV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, min_range: O1, max_range: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), min_range.into(), max_range.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, min_range: crate::Output, max_range: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizeV2", |nd| { + nd.add_input(input); + nd.add_input(min_range); + nd.add_input(max_range); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.round_mode { + nd.set_attr_string("round_mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.narrow_range { + nd.set_attr_bool("narrow_range", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ensure_minimum_range { + nd.set_attr_float("ensure_minimum_range", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizeV2Inst{op}) + } +} +impl QuantizeV2Inst { + /// Returns the 'output' output of this 'QuantizeV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_min' output of this 'QuantizeV2' operation. + pub fn output_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_max' output of this 'QuantizeV2' operation. + pub fn output_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizeV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizeV2::new().build(input, min_range, max_range, scope)`. -pub fn quantize_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - min_range: O1, - max_range: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantize_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, min_range: O1, max_range: O2, scope: &mut crate::Scope) -> crate::Result { QuantizeV2::new().build(input, min_range, max_range, scope) } + /// Builder for the `QuantizedAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedAdd { @@ -71106,6 +86836,12 @@ pub struct QuantizedAdd { Toutput: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedAddInst { + /// An instance of a fully built QuantizedAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedAdd { /// Creates a new `QuantizedAdd`. @@ -71126,10 +86862,7 @@ impl QuantizedAdd { } /// Sets the `Toutput` attribute. - pub fn Toutput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput>(mut self, value: ArgType) -> Self { self.Toutput = ::std::option::Option::Some(value.into()); self } @@ -71141,44 +86874,10 @@ impl QuantizedAdd { } /// Builds the `QuantizedAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - min_x: O2, - max_x: O3, - min_y: O4, - max_y: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - x.into(), - y.into(), - min_x.into(), - max_x.into(), - min_y.into(), - max_y.into(), - scope, - ) - } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - min_x: crate::Output, - max_x: crate::Output, - min_y: crate::Output, - max_y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, x: O0, y: O1, min_x: O2, max_x: O3, min_y: O4, max_y: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(x.into(), y.into(), min_x.into(), max_x.into(), min_y.into(), max_y.into(), scope) + } + fn build_impl(&self, x: crate::Output, y: crate::Output, min_x: crate::Output, max_x: crate::Output, min_y: crate::Output, max_y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedAdd", |nd| { nd.add_input(x); nd.add_input(y); @@ -71189,39 +86888,81 @@ impl QuantizedAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutput { - nd.set_attr_type("Toutput", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, x: O0, y: O1, min_x: O2, max_x: O3, min_y: O4, max_y: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), min_x.into(), max_x.into(), min_y.into(), max_y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, min_x: crate::Output, max_x: crate::Output, min_y: crate::Output, max_y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedAdd", |nd| { + nd.add_input(x); + nd.add_input(y); + nd.add_input(min_x); + nd.add_input(max_x); + nd.add_input(min_y); + nd.add_input(max_y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedAddInst{op}) + } +} +impl QuantizedAddInst { + /// Returns the 'z' output of this 'QuantizedAdd' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_z' output of this 'QuantizedAdd' operation. + pub fn min_z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_z' output of this 'QuantizedAdd' operation. + pub fn max_z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedAdd::new().build(x, y, min_x, max_x, min_y, max_y, scope)`. -pub fn quantized_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - x: O0, - y: O1, - min_x: O2, - max_x: O3, - min_y: O4, - max_y: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_add, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(x: O0, y: O1, min_x: O2, max_x: O3, min_y: O4, max_y: O5, scope: &mut crate::Scope) -> crate::Result { QuantizedAdd::new().build(x, y, min_x, max_x, min_y, max_y, scope) } + /// Builder for the `QuantizedAvgPool` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedAvgPool { @@ -71231,6 +86972,12 @@ pub struct QuantizedAvgPool { padding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedAvgPool' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedAvgPoolInst { + /// An instance of a fully built QuantizedAvgPool Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedAvgPool { /// Creates a new `QuantizedAvgPool`. @@ -71245,28 +86992,19 @@ impl QuantizedAvgPool { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } @@ -71278,27 +87016,10 @@ impl QuantizedAvgPool { } /// Builds the `QuantizedAvgPool` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - min_input: O1, - max_input: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, min_input: O1, max_input: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), min_input.into(), max_input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, min_input: crate::Output, max_input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedAvgPool", |nd| { nd.add_input(input); nd.add_input(min_input); @@ -71306,36 +87027,84 @@ impl QuantizedAvgPool { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedAvgPool` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, min_input: O1, max_input: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), min_input.into(), max_input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, min_input: crate::Output, max_input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedAvgPool", |nd| { + nd.add_input(input); + nd.add_input(min_input); + nd.add_input(max_input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedAvgPoolInst{op}) + } +} +impl QuantizedAvgPoolInst { + /// Returns the 'output' output of this 'QuantizedAvgPool' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedAvgPool' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedAvgPool' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedAvgPoolInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedAvgPool::new().build(input, min_input, max_input, scope)`. -pub fn quantized_avg_pool< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - min_input: O1, - max_input: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_avg_pool, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, min_input: O1, max_input: O2, scope: &mut crate::Scope) -> crate::Result { QuantizedAvgPool::new().build(input, min_input, max_input, scope) } + /// Builder for the `QuantizedBatchNormWithGlobalNormalization` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedBatchNormWithGlobalNormalization { @@ -71345,6 +87114,12 @@ pub struct QuantizedBatchNormWithGlobalNormalization { scale_after_normalization: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedBatchNormWithGlobalNormalization' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedBatchNormWithGlobalNormalizationInst { + /// An instance of a fully built QuantizedBatchNormWithGlobalNormalization Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedBatchNormWithGlobalNormalization { /// Creates a new `QuantizedBatchNormWithGlobalNormalization`. @@ -71353,19 +87128,13 @@ impl QuantizedBatchNormWithGlobalNormalization { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -71377,10 +87146,7 @@ impl QuantizedBatchNormWithGlobalNormalization { } /// Sets the `scale_after_normalization` attribute. - pub fn scale_after_normalization>( - mut self, - value: ArgType, - ) -> Self { + pub fn scale_after_normalization>(mut self, value: ArgType) -> Self { self.scale_after_normalization = ::std::option::Option::Some(value.into()); self } @@ -71392,80 +87158,10 @@ impl QuantizedBatchNormWithGlobalNormalization { } /// Builds the `QuantizedBatchNormWithGlobalNormalization` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - O12: ::std::convert::Into, - O13: ::std::convert::Into, - O14: ::std::convert::Into, - >( - &self, - t: O0, - t_min: O1, - t_max: O2, - m: O3, - m_min: O4, - m_max: O5, - v: O6, - v_min: O7, - v_max: O8, - beta: O9, - beta_min: O10, - beta_max: O11, - gamma: O12, - gamma_min: O13, - gamma_max: O14, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - t.into(), - t_min.into(), - t_max.into(), - m.into(), - m_min.into(), - m_max.into(), - v.into(), - v_min.into(), - v_max.into(), - beta.into(), - beta_min.into(), - beta_max.into(), - gamma.into(), - gamma_min.into(), - gamma_max.into(), - scope, - ) - } - - fn build_impl( - &self, - t: crate::Output, - t_min: crate::Output, - t_max: crate::Output, - m: crate::Output, - m_min: crate::Output, - m_max: crate::Output, - v: crate::Output, - v_min: crate::Output, - v_max: crate::Output, - beta: crate::Output, - beta_min: crate::Output, - beta_max: crate::Output, - gamma: crate::Output, - gamma_min: crate::Output, - gamma_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into>(&self, t: O0, t_min: O1, t_max: O2, m: O3, m_min: O4, m_max: O5, v: O6, v_min: O7, v_max: O8, beta: O9, beta_min: O10, beta_max: O11, gamma: O12, gamma_min: O13, gamma_max: O14, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(t.into(), t_min.into(), t_max.into(), m.into(), m_min.into(), m_max.into(), v.into(), v_min.into(), v_max.into(), beta.into(), beta_min.into(), beta_max.into(), gamma.into(), gamma_min.into(), gamma_max.into(), scope) + } + fn build_impl(&self, t: crate::Output, t_min: crate::Output, t_max: crate::Output, m: crate::Output, m_min: crate::Output, m_max: crate::Output, v: crate::Output, v_min: crate::Output, v_max: crate::Output, beta: crate::Output, beta_min: crate::Output, beta_max: crate::Output, gamma: crate::Output, gamma_min: crate::Output, gamma_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedBatchNormWithGlobalNormalization", |nd| { nd.add_input(t); nd.add_input(t_min); @@ -71485,63 +87181,96 @@ impl QuantizedBatchNormWithGlobalNormalization { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.variance_epsilon { - nd.set_attr_float("variance_epsilon", *value)?; - } - if let ::std::option::Option::Some(value) = &self.scale_after_normalization { - nd.set_attr_bool("scale_after_normalization", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.variance_epsilon { + nd.set_attr_float("variance_epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.scale_after_normalization { + nd.set_attr_bool("scale_after_normalization", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedBatchNormWithGlobalNormalization` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into>(&self, t: O0, t_min: O1, t_max: O2, m: O3, m_min: O4, m_max: O5, v: O6, v_min: O7, v_max: O8, beta: O9, beta_min: O10, beta_max: O11, gamma: O12, gamma_min: O13, gamma_max: O14, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(t.into(), t_min.into(), t_max.into(), m.into(), m_min.into(), m_max.into(), v.into(), v_min.into(), v_max.into(), beta.into(), beta_min.into(), beta_max.into(), gamma.into(), gamma_min.into(), gamma_max.into(), scope) + } + fn build_instance_impl(&self, t: crate::Output, t_min: crate::Output, t_max: crate::Output, m: crate::Output, m_min: crate::Output, m_max: crate::Output, v: crate::Output, v_min: crate::Output, v_max: crate::Output, beta: crate::Output, beta_min: crate::Output, beta_max: crate::Output, gamma: crate::Output, gamma_min: crate::Output, gamma_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedBatchNormWithGlobalNormalization", |nd| { + nd.add_input(t); + nd.add_input(t_min); + nd.add_input(t_max); + nd.add_input(m); + nd.add_input(m_min); + nd.add_input(m_max); + nd.add_input(v); + nd.add_input(v_min); + nd.add_input(v_max); + nd.add_input(beta); + nd.add_input(beta_min); + nd.add_input(beta_max); + nd.add_input(gamma); + nd.add_input(gamma_min); + nd.add_input(gamma_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.variance_epsilon { + nd.set_attr_float("variance_epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.scale_after_normalization { + nd.set_attr_bool("scale_after_normalization", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedBatchNormWithGlobalNormalizationInst{op}) + } +} +impl QuantizedBatchNormWithGlobalNormalizationInst { + /// Returns the 'result' output of this 'QuantizedBatchNormWithGlobalNormalization' operation. + pub fn result(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'result_min' output of this 'QuantizedBatchNormWithGlobalNormalization' operation. + pub fn result_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'result_max' output of this 'QuantizedBatchNormWithGlobalNormalization' operation. + pub fn result_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedBatchNormWithGlobalNormalizationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedBatchNormWithGlobalNormalization::new().build(t, t_min, t_max, m, m_min, m_max, v, v_min, v_max, beta, beta_min, beta_max, gamma, gamma_min, gamma_max, scope)`. -pub fn quantized_batch_norm_with_global_normalization< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - O12: ::std::convert::Into, - O13: ::std::convert::Into, - O14: ::std::convert::Into, ->( - t: O0, - t_min: O1, - t_max: O2, - m: O3, - m_min: O4, - m_max: O5, - v: O6, - v_min: O7, - v_max: O8, - beta: O9, - beta_min: O10, - beta_max: O11, - gamma: O12, - gamma_min: O13, - gamma_max: O14, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedBatchNormWithGlobalNormalization::new().build( - t, t_min, t_max, m, m_min, m_max, v, v_min, v_max, beta, beta_min, beta_max, gamma, - gamma_min, gamma_max, scope, - ) +pub fn quantized_batch_norm_with_global_normalization, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into, O12: ::std::convert::Into, O13: ::std::convert::Into, O14: ::std::convert::Into>(t: O0, t_min: O1, t_max: O2, m: O3, m_min: O4, m_max: O5, v: O6, v_min: O7, v_max: O8, beta: O9, beta_min: O10, beta_max: O11, gamma: O12, gamma_min: O13, gamma_max: O14, scope: &mut crate::Scope) -> crate::Result { + QuantizedBatchNormWithGlobalNormalization::new().build(t, t_min, t_max, m, m_min, m_max, v, v_min, v_max, beta, beta_min, beta_max, gamma, gamma_min, gamma_max, scope) } + /// Builder for the `QuantizedBiasAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedBiasAdd { @@ -71550,6 +87279,12 @@ pub struct QuantizedBiasAdd { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedBiasAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedBiasAddInst { + /// An instance of a fully built QuantizedBiasAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedBiasAdd { /// Creates a new `QuantizedBiasAdd`. @@ -71570,10 +87305,7 @@ impl QuantizedBiasAdd { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -71585,44 +87317,10 @@ impl QuantizedBiasAdd { } /// Builds the `QuantizedBiasAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - input: O0, - bias: O1, - min_input: O2, - max_input: O3, - min_bias: O4, - max_bias: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_bias.into(), - max_bias.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_bias: crate::Output, - max_bias: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input: O0, bias: O1, min_input: O2, max_input: O3, min_bias: O4, max_bias: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), bias.into(), min_input.into(), max_input.into(), min_bias.into(), max_bias.into(), scope) + } + fn build_impl(&self, input: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_bias: crate::Output, max_bias: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedBiasAdd", |nd| { nd.add_input(input); nd.add_input(bias); @@ -71633,39 +87331,81 @@ impl QuantizedBiasAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedBiasAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input: O0, bias: O1, min_input: O2, max_input: O3, min_bias: O4, max_bias: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), bias.into(), min_input.into(), max_input.into(), min_bias.into(), max_bias.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_bias: crate::Output, max_bias: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedBiasAdd", |nd| { + nd.add_input(input); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_bias); + nd.add_input(max_bias); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedBiasAddInst{op}) + } +} +impl QuantizedBiasAddInst { + /// Returns the 'output' output of this 'QuantizedBiasAdd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_out' output of this 'QuantizedBiasAdd' operation. + pub fn min_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_out' output of this 'QuantizedBiasAdd' operation. + pub fn max_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedBiasAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedBiasAdd::new().build(input, bias, min_input, max_input, min_bias, max_bias, scope)`. -pub fn quantized_bias_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - input: O0, - bias: O1, - min_input: O2, - max_input: O3, - min_bias: O4, - max_bias: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_bias_add, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(input: O0, bias: O1, min_input: O2, max_input: O3, min_bias: O4, max_bias: O5, scope: &mut crate::Scope) -> crate::Result { QuantizedBiasAdd::new().build(input, bias, min_input, max_input, min_bias, max_bias, scope) } + /// Builder for the `QuantizedConcat` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConcat { @@ -71673,6 +87413,12 @@ pub struct QuantizedConcat { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConcat' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConcatInst { + /// An instance of a fully built QuantizedConcat Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConcat { /// Creates a new `QuantizedConcat`. @@ -71699,36 +87445,10 @@ impl QuantizedConcat { } /// Builds the `QuantizedConcat` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - concat_dim: O0, - values: O1, - input_mins: O2, - input_maxes: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - concat_dim.into(), - values.into(), - input_mins.into(), - input_maxes.into(), - scope, - ) - } - - fn build_impl( - &self, - concat_dim: crate::Output, - values: crate::Output, - input_mins: crate::Output, - input_maxes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, concat_dim: O0, values: O1, input_mins: O2, input_maxes: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(concat_dim.into(), values.into(), input_mins.into(), input_maxes.into(), scope) + } + fn build_impl(&self, concat_dim: crate::Output, values: crate::Output, input_mins: crate::Output, input_maxes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConcat", |nd| { nd.add_input(concat_dim); nd.add_input(values); @@ -71737,32 +87457,73 @@ impl QuantizedConcat { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedConcat` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, concat_dim: O0, values: O1, input_mins: O2, input_maxes: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(concat_dim.into(), values.into(), input_mins.into(), input_maxes.into(), scope) + } + fn build_instance_impl(&self, concat_dim: crate::Output, values: crate::Output, input_mins: crate::Output, input_maxes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConcat", |nd| { + nd.add_input(concat_dim); + nd.add_input(values); + nd.add_input(input_mins); + nd.add_input(input_maxes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConcatInst{op}) + } +} +impl QuantizedConcatInst { + /// Returns the 'output' output of this 'QuantizedConcat' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_min' output of this 'QuantizedConcat' operation. + pub fn output_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_max' output of this 'QuantizedConcat' operation. + pub fn output_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConcatInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedConcat::new().build(concat_dim, values, input_mins, input_maxes, scope)`. -pub fn quantized_concat< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - concat_dim: O0, - values: O1, - input_mins: O2, - input_maxes: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_concat, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(concat_dim: O0, values: O1, input_mins: O2, input_maxes: O3, scope: &mut crate::Scope) -> crate::Result { QuantizedConcat::new().build(concat_dim, values, input_mins, input_maxes, scope) } + /// Builder for the `QuantizedConv2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2D { @@ -71774,6 +87535,12 @@ pub struct QuantizedConv2D { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DInst { + /// An instance of a fully built QuantizedConv2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2D { /// Creates a new `QuantizedConv2D`. @@ -71782,55 +87549,37 @@ impl QuantizedConv2D { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -71842,44 +87591,10 @@ impl QuantizedConv2D { } /// Builds the `QuantizedConv2D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2D", |nd| { nd.add_input(input); nd.add_input(filter); @@ -71890,50 +87605,99 @@ impl QuantizedConv2D { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedConv2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2D", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DInst{op}) + } +} +impl QuantizedConv2DInst { + /// Returns the 'output' output of this 'QuantizedConv2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2D' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2D' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedConv2D::new().build(input, filter, min_input, max_input, min_filter, max_filter, scope)`. -pub fn quantized_conv2_d< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2D::new().build( - input, filter, min_input, max_input, min_filter, max_filter, scope, - ) +pub fn quantized_conv2_d, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2D::new().build(input, filter, min_input, max_input, min_filter, max_filter, scope) } + /// Builder for the `QuantizedConv2DAndRelu` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DAndRelu { @@ -71946,6 +87710,12 @@ pub struct QuantizedConv2DAndRelu { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DAndRelu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DAndReluInst { + /// An instance of a fully built QuantizedConv2DAndRelu Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DAndRelu { /// Creates a new `QuantizedConv2DAndRelu`. @@ -71954,64 +87724,43 @@ impl QuantizedConv2DAndRelu { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -72023,44 +87772,10 @@ impl QuantizedConv2DAndRelu { } /// Builds the `QuantizedConv2DAndRelu` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2DAndRelu", |nd| { nd.add_input(input); nd.add_input(filter); @@ -72071,53 +87786,105 @@ impl QuantizedConv2DAndRelu { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedConv2DAndRelu` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DAndRelu", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DAndReluInst{op}) + } +} +impl QuantizedConv2DAndReluInst { + /// Returns the 'output' output of this 'QuantizedConv2DAndRelu' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DAndRelu' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DAndRelu' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DAndReluInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedConv2DAndRelu::new().build(input, filter, min_input, max_input, min_filter, max_filter, scope)`. -pub fn quantized_conv2_dand_relu< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DAndRelu::new().build( - input, filter, min_input, max_input, min_filter, max_filter, scope, - ) +pub fn quantized_conv2_dand_relu, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DAndRelu::new().build(input, filter, min_input, max_input, min_filter, max_filter, scope) } + /// Builder for the `QuantizedConv2DAndReluAndRequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DAndReluAndRequantize { @@ -72130,6 +87897,12 @@ pub struct QuantizedConv2DAndReluAndRequantize { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DAndReluAndRequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DAndReluAndRequantizeInst { + /// An instance of a fully built QuantizedConv2DAndReluAndRequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DAndReluAndRequantize { /// Creates a new `QuantizedConv2DAndReluAndRequantize`. @@ -72138,64 +87911,43 @@ impl QuantizedConv2DAndReluAndRequantize { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -72207,52 +87959,10 @@ impl QuantizedConv2DAndReluAndRequantize { } /// Builds the `QuantizedConv2DAndReluAndRequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - min_freezed_output: O6, - max_freezed_output: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - min_freezed_output.into(), - max_freezed_output.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - min_freezed_output: crate::Output, - max_freezed_output: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, min_freezed_output: O6, max_freezed_output: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2DAndReluAndRequantize", |nd| { nd.add_input(input); nd.add_input(filter); @@ -72265,65 +87975,107 @@ impl QuantizedConv2DAndReluAndRequantize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedConv2DAndReluAndRequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, min_freezed_output: O6, max_freezed_output: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DAndReluAndRequantize", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DAndReluAndRequantizeInst{op}) + } +} +impl QuantizedConv2DAndReluAndRequantizeInst { + /// Returns the 'output' output of this 'QuantizedConv2DAndReluAndRequantize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DAndReluAndRequantize' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DAndReluAndRequantize' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DAndReluAndRequantizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedConv2DAndReluAndRequantize::new().build(input, filter, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, scope)`. -pub fn quantized_conv2_dand_relu_and_requantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - min_freezed_output: O6, - max_freezed_output: O7, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DAndReluAndRequantize::new().build( - input, - filter, - min_input, - max_input, - min_filter, - max_filter, - min_freezed_output, - max_freezed_output, - scope, - ) +pub fn quantized_conv2_dand_relu_and_requantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, min_freezed_output: O6, max_freezed_output: O7, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DAndReluAndRequantize::new().build(input, filter, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, scope) } + /// Builder for the `QuantizedConv2DAndRequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DAndRequantize { @@ -72336,6 +88088,12 @@ pub struct QuantizedConv2DAndRequantize { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DAndRequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DAndRequantizeInst { + /// An instance of a fully built QuantizedConv2DAndRequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DAndRequantize { /// Creates a new `QuantizedConv2DAndRequantize`. @@ -72344,64 +88102,43 @@ impl QuantizedConv2DAndRequantize { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -72413,52 +88150,10 @@ impl QuantizedConv2DAndRequantize { } /// Builds the `QuantizedConv2DAndRequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - min_freezed_output: O6, - max_freezed_output: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - min_freezed_output.into(), - max_freezed_output.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - min_freezed_output: crate::Output, - max_freezed_output: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, min_freezed_output: O6, max_freezed_output: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2DAndRequantize", |nd| { nd.add_input(input); nd.add_input(filter); @@ -72471,65 +88166,107 @@ impl QuantizedConv2DAndRequantize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedConv2DAndRequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, min_freezed_output: O6, max_freezed_output: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DAndRequantize", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DAndRequantizeInst{op}) + } +} +impl QuantizedConv2DAndRequantizeInst { + /// Returns the 'output' output of this 'QuantizedConv2DAndRequantize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DAndRequantize' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DAndRequantize' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DAndRequantizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedConv2DAndRequantize::new().build(input, filter, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, scope)`. -pub fn quantized_conv2_dand_requantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - min_freezed_output: O6, - max_freezed_output: O7, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DAndRequantize::new().build( - input, - filter, - min_input, - max_input, - min_filter, - max_filter, - min_freezed_output, - max_freezed_output, - scope, - ) +pub fn quantized_conv2_dand_requantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, min_freezed_output: O6, max_freezed_output: O7, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DAndRequantize::new().build(input, filter, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, scope) } + /// Builder for the `QuantizedConv2DPerChannel` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DPerChannel { @@ -72541,6 +88278,12 @@ pub struct QuantizedConv2DPerChannel { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DPerChannel' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DPerChannelInst { + /// An instance of a fully built QuantizedConv2DPerChannel Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DPerChannel { /// Creates a new `QuantizedConv2DPerChannel`. @@ -72549,55 +88292,37 @@ impl QuantizedConv2DPerChannel { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -72609,44 +88334,10 @@ impl QuantizedConv2DPerChannel { } /// Builds the `QuantizedConv2DPerChannel` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2DPerChannel", |nd| { nd.add_input(input); nd.add_input(filter); @@ -72657,50 +88348,99 @@ impl QuantizedConv2DPerChannel { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedConv2DPerChannel` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DPerChannel", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DPerChannelInst{op}) + } +} +impl QuantizedConv2DPerChannelInst { + /// Returns the 'output' output of this 'QuantizedConv2DPerChannel' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DPerChannel' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DPerChannel' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DPerChannelInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedConv2DPerChannel::new().build(input, filter, min_input, max_input, min_filter, max_filter, scope)`. -pub fn quantized_conv2_dper_channel< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DPerChannel::new().build( - input, filter, min_input, max_input, min_filter, max_filter, scope, - ) +pub fn quantized_conv2_dper_channel, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DPerChannel::new().build(input, filter, min_input, max_input, min_filter, max_filter, scope) } + /// Builder for the `QuantizedConv2DWithBias` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DWithBias { @@ -72713,6 +88453,12 @@ pub struct QuantizedConv2DWithBias { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DWithBias' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DWithBiasInst { + /// An instance of a fully built QuantizedConv2DWithBias Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DWithBias { /// Creates a new `QuantizedConv2DWithBias`. @@ -72721,64 +88467,43 @@ impl QuantizedConv2DWithBias { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -72790,48 +88515,10 @@ impl QuantizedConv2DWithBias { } /// Builds the `QuantizedConv2DWithBias` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2DWithBias", |nd| { nd.add_input(input); nd.add_input(filter); @@ -72843,55 +88530,106 @@ impl QuantizedConv2DWithBias { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedConv2DWithBias` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DWithBias", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DWithBiasInst{op}) + } +} +impl QuantizedConv2DWithBiasInst { + /// Returns the 'output' output of this 'QuantizedConv2DWithBias' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DWithBias' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DWithBias' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DWithBiasInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedConv2DWithBias::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, scope)`. -pub fn quantized_conv2_dwith_bias< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DWithBias::new().build( - input, filter, bias, min_input, max_input, min_filter, max_filter, scope, - ) +pub fn quantized_conv2_dwith_bias, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DWithBias::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, scope) } + /// Builder for the `QuantizedConv2DWithBiasAndRelu` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DWithBiasAndRelu { @@ -72904,6 +88642,12 @@ pub struct QuantizedConv2DWithBiasAndRelu { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DWithBiasAndRelu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DWithBiasAndReluInst { + /// An instance of a fully built QuantizedConv2DWithBiasAndRelu Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DWithBiasAndRelu { /// Creates a new `QuantizedConv2DWithBiasAndRelu`. @@ -72912,64 +88656,43 @@ impl QuantizedConv2DWithBiasAndRelu { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -72981,48 +88704,10 @@ impl QuantizedConv2DWithBiasAndRelu { } /// Builds the `QuantizedConv2DWithBiasAndRelu` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2DWithBiasAndRelu", |nd| { nd.add_input(input); nd.add_input(filter); @@ -73034,55 +88719,106 @@ impl QuantizedConv2DWithBiasAndRelu { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedConv2DWithBiasAndRelu` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DWithBiasAndRelu", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DWithBiasAndReluInst{op}) + } +} +impl QuantizedConv2DWithBiasAndReluInst { + /// Returns the 'output' output of this 'QuantizedConv2DWithBiasAndRelu' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DWithBiasAndRelu' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DWithBiasAndRelu' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DWithBiasAndReluInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedConv2DWithBiasAndRelu::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, scope)`. -pub fn quantized_conv2_dwith_bias_and_relu< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DWithBiasAndRelu::new().build( - input, filter, bias, min_input, max_input, min_filter, max_filter, scope, - ) +pub fn quantized_conv2_dwith_bias_and_relu, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DWithBiasAndRelu::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, scope) } + /// Builder for the `QuantizedConv2DWithBiasAndReluAndRequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DWithBiasAndReluAndRequantize { @@ -73096,6 +88832,12 @@ pub struct QuantizedConv2DWithBiasAndReluAndRequantize { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DWithBiasAndReluAndRequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DWithBiasAndReluAndRequantizeInst { + /// An instance of a fully built QuantizedConv2DWithBiasAndReluAndRequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DWithBiasAndReluAndRequantize { /// Creates a new `QuantizedConv2DWithBiasAndReluAndRequantize`. @@ -73104,19 +88846,13 @@ impl QuantizedConv2DWithBiasAndReluAndRequantize { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } @@ -73128,46 +88864,31 @@ impl QuantizedConv2DWithBiasAndReluAndRequantize { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -73179,56 +88900,10 @@ impl QuantizedConv2DWithBiasAndReluAndRequantize { } /// Builds the `QuantizedConv2DWithBiasAndReluAndRequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - min_freezed_output.into(), - max_freezed_output.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - min_freezed_output: crate::Output, - max_freezed_output: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2DWithBiasAndReluAndRequantize", |nd| { nd.add_input(input); nd.add_input(filter); @@ -73242,71 +88917,114 @@ impl QuantizedConv2DWithBiasAndReluAndRequantize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tbias { - nd.set_attr_type("Tbias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `QuantizedConv2DWithBiasAndReluAndRequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DWithBiasAndReluAndRequantize", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DWithBiasAndReluAndRequantizeInst{op}) + } +} +impl QuantizedConv2DWithBiasAndReluAndRequantizeInst { + /// Returns the 'output' output of this 'QuantizedConv2DWithBiasAndReluAndRequantize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DWithBiasAndReluAndRequantize' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DWithBiasAndReluAndRequantize' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DWithBiasAndReluAndRequantizeInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `QuantizedConv2DWithBiasAndReluAndRequantize::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, scope)`. -pub fn quantized_conv2_dwith_bias_and_relu_and_requantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DWithBiasAndReluAndRequantize::new().build( - input, - filter, - bias, - min_input, - max_input, - min_filter, - max_filter, - min_freezed_output, - max_freezed_output, - scope, - ) +pub fn quantized_conv2_dwith_bias_and_relu_and_requantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DWithBiasAndReluAndRequantize::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, scope) } + /// Builder for the `QuantizedConv2DWithBiasAndRequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DWithBiasAndRequantize { @@ -73320,6 +89038,12 @@ pub struct QuantizedConv2DWithBiasAndRequantize { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DWithBiasAndRequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DWithBiasAndRequantizeInst { + /// An instance of a fully built QuantizedConv2DWithBiasAndRequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DWithBiasAndRequantize { /// Creates a new `QuantizedConv2DWithBiasAndRequantize`. @@ -73328,19 +89052,13 @@ impl QuantizedConv2DWithBiasAndRequantize { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } @@ -73352,46 +89070,31 @@ impl QuantizedConv2DWithBiasAndRequantize { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -73403,56 +89106,10 @@ impl QuantizedConv2DWithBiasAndRequantize { } /// Builds the `QuantizedConv2DWithBiasAndRequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - min_freezed_output.into(), - max_freezed_output.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - min_freezed_output: crate::Output, - max_freezed_output: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2DWithBiasAndRequantize", |nd| { nd.add_input(input); nd.add_input(filter); @@ -73466,71 +89123,114 @@ impl QuantizedConv2DWithBiasAndRequantize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tbias { - nd.set_attr_type("Tbias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `QuantizedConv2DWithBiasAndRequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DWithBiasAndRequantize", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DWithBiasAndRequantizeInst{op}) + } +} +impl QuantizedConv2DWithBiasAndRequantizeInst { + /// Returns the 'output' output of this 'QuantizedConv2DWithBiasAndRequantize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DWithBiasAndRequantize' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DWithBiasAndRequantize' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DWithBiasAndRequantizeInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `QuantizedConv2DWithBiasAndRequantize::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, scope)`. -pub fn quantized_conv2_dwith_bias_and_requantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DWithBiasAndRequantize::new().build( - input, - filter, - bias, - min_input, - max_input, - min_filter, - max_filter, - min_freezed_output, - max_freezed_output, - scope, - ) +pub fn quantized_conv2_dwith_bias_and_requantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DWithBiasAndRequantize::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, scope) } + /// Builder for the `QuantizedConv2DWithBiasSignedSumAndReluAndRequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DWithBiasSignedSumAndReluAndRequantize { @@ -73545,6 +89245,12 @@ pub struct QuantizedConv2DWithBiasSignedSumAndReluAndRequantize { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DWithBiasSignedSumAndReluAndRequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DWithBiasSignedSumAndReluAndRequantizeInst { + /// An instance of a fully built QuantizedConv2DWithBiasSignedSumAndReluAndRequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DWithBiasSignedSumAndReluAndRequantize { /// Creates a new `QuantizedConv2DWithBiasSignedSumAndReluAndRequantize`. @@ -73553,19 +89259,13 @@ impl QuantizedConv2DWithBiasSignedSumAndReluAndRequantize { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } @@ -73577,55 +89277,37 @@ impl QuantizedConv2DWithBiasSignedSumAndReluAndRequantize { } /// Sets the `Tsummand` attribute. - pub fn Tsummand>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsummand>(mut self, value: ArgType) -> Self { self.Tsummand = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -73637,164 +89319,143 @@ impl QuantizedConv2DWithBiasSignedSumAndReluAndRequantize { } /// Builds the `QuantizedConv2DWithBiasSignedSumAndReluAndRequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - min_freezed_output: O7, - max_freezed_output: O8, - summand: O9, - min_summand: O10, - max_summand: O11, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - min_freezed_output.into(), - max_freezed_output.into(), - summand.into(), - min_summand.into(), - max_summand.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - min_freezed_output: crate::Output, - max_freezed_output: crate::Output, - summand: crate::Output, - min_summand: crate::Output, - max_summand: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation( - "QuantizedConv2DWithBiasSignedSumAndReluAndRequantize", - |nd| { - nd.add_input(input); - nd.add_input(filter); - nd.add_input(bias); - nd.add_input(min_input); - nd.add_input(max_input); - nd.add_input(min_filter); - nd.add_input(max_filter); - nd.add_input(min_freezed_output); - nd.add_input(max_freezed_output); - nd.add_input(summand); - nd.add_input(min_summand); - nd.add_input(max_summand); - for op in &self.control_inputs { - nd.add_control_input(op); - } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tbias { - nd.set_attr_type("Tbias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsummand { - nd.set_attr_type("Tsummand", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; - } - ::std::result::Result::Ok(()) - }, - ) + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, summand: O9, min_summand: O10, max_summand: O11, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), summand.into(), min_summand.into(), max_summand.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, summand: crate::Output, min_summand: crate::Output, max_summand: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("QuantizedConv2DWithBiasSignedSumAndReluAndRequantize", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + nd.add_input(summand); + nd.add_input(min_summand); + nd.add_input(max_summand); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsummand { + nd.set_attr_type("Tsummand", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `QuantizedConv2DWithBiasSignedSumAndReluAndRequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, summand: O9, min_summand: O10, max_summand: O11, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), summand.into(), min_summand.into(), max_summand.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, summand: crate::Output, min_summand: crate::Output, max_summand: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DWithBiasSignedSumAndReluAndRequantize", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + nd.add_input(summand); + nd.add_input(min_summand); + nd.add_input(max_summand); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsummand { + nd.set_attr_type("Tsummand", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DWithBiasSignedSumAndReluAndRequantizeInst{op}) + } +} +impl QuantizedConv2DWithBiasSignedSumAndReluAndRequantizeInst { + /// Returns the 'output' output of this 'QuantizedConv2DWithBiasSignedSumAndReluAndRequantize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DWithBiasSignedSumAndReluAndRequantize' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DWithBiasSignedSumAndReluAndRequantize' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DWithBiasSignedSumAndReluAndRequantizeInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `QuantizedConv2DWithBiasSignedSumAndReluAndRequantize::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, summand, min_summand, max_summand, scope)`. -pub fn quantized_conv2_dwith_bias_signed_sum_and_relu_and_requantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, ->( - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - min_freezed_output: O7, - max_freezed_output: O8, - summand: O9, - min_summand: O10, - max_summand: O11, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DWithBiasSignedSumAndReluAndRequantize::new().build( - input, - filter, - bias, - min_input, - max_input, - min_filter, - max_filter, - min_freezed_output, - max_freezed_output, - summand, - min_summand, - max_summand, - scope, - ) +pub fn quantized_conv2_dwith_bias_signed_sum_and_relu_and_requantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, summand: O9, min_summand: O10, max_summand: O11, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DWithBiasSignedSumAndReluAndRequantize::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, summand, min_summand, max_summand, scope) } + /// Builder for the `QuantizedConv2DWithBiasSumAndRelu` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DWithBiasSumAndRelu { @@ -73807,6 +89468,12 @@ pub struct QuantizedConv2DWithBiasSumAndRelu { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DWithBiasSumAndRelu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DWithBiasSumAndReluInst { + /// An instance of a fully built QuantizedConv2DWithBiasSumAndRelu Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DWithBiasSumAndRelu { /// Creates a new `QuantizedConv2DWithBiasSumAndRelu`. @@ -73815,64 +89482,43 @@ impl QuantizedConv2DWithBiasSumAndRelu { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -73884,52 +89530,10 @@ impl QuantizedConv2DWithBiasSumAndRelu { } /// Builds the `QuantizedConv2DWithBiasSumAndRelu` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - summand: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - summand.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - summand: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, summand: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), summand.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, summand: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2DWithBiasSumAndRelu", |nd| { nd.add_input(input); nd.add_input(filter); @@ -73942,57 +89546,107 @@ impl QuantizedConv2DWithBiasSumAndRelu { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedConv2DWithBiasSumAndRelu` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, summand: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), summand.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, summand: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DWithBiasSumAndRelu", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + nd.add_input(summand); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DWithBiasSumAndReluInst{op}) + } +} +impl QuantizedConv2DWithBiasSumAndReluInst { + /// Returns the 'output' output of this 'QuantizedConv2DWithBiasSumAndRelu' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DWithBiasSumAndRelu' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DWithBiasSumAndRelu' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DWithBiasSumAndReluInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedConv2DWithBiasSumAndRelu::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, summand, scope)`. -pub fn quantized_conv2_dwith_bias_sum_and_relu< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - summand: O7, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DWithBiasSumAndRelu::new().build( - input, filter, bias, min_input, max_input, min_filter, max_filter, summand, scope, - ) +pub fn quantized_conv2_dwith_bias_sum_and_relu, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, summand: O7, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DWithBiasSumAndRelu::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, summand, scope) } + /// Builder for the `QuantizedConv2DWithBiasSumAndReluAndRequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedConv2DWithBiasSumAndReluAndRequantize { @@ -74007,6 +89661,12 @@ pub struct QuantizedConv2DWithBiasSumAndReluAndRequantize { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedConv2DWithBiasSumAndReluAndRequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedConv2DWithBiasSumAndReluAndRequantizeInst { + /// An instance of a fully built QuantizedConv2DWithBiasSumAndReluAndRequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedConv2DWithBiasSumAndReluAndRequantize { /// Creates a new `QuantizedConv2DWithBiasSumAndReluAndRequantize`. @@ -74015,19 +89675,13 @@ impl QuantizedConv2DWithBiasSumAndReluAndRequantize { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } @@ -74039,55 +89693,37 @@ impl QuantizedConv2DWithBiasSumAndReluAndRequantize { } /// Sets the `Tsummand` attribute. - pub fn Tsummand>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsummand>(mut self, value: ArgType) -> Self { self.Tsummand = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -74099,68 +89735,10 @@ impl QuantizedConv2DWithBiasSumAndReluAndRequantize { } /// Builds the `QuantizedConv2DWithBiasSumAndReluAndRequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - min_freezed_output: O7, - max_freezed_output: O8, - summand: O9, - min_summand: O10, - max_summand: O11, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - min_freezed_output.into(), - max_freezed_output.into(), - summand.into(), - min_summand.into(), - max_summand.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - min_freezed_output: crate::Output, - max_freezed_output: crate::Output, - summand: crate::Output, - min_summand: crate::Output, - max_summand: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, summand: O9, min_summand: O10, max_summand: O11, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), summand.into(), min_summand.into(), max_summand.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, summand: crate::Output, min_summand: crate::Output, max_summand: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedConv2DWithBiasSumAndReluAndRequantize", |nd| { nd.add_input(input); nd.add_input(filter); @@ -74177,83 +89755,123 @@ impl QuantizedConv2DWithBiasSumAndReluAndRequantize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tbias { - nd.set_attr_type("Tbias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsummand { - nd.set_attr_type("Tsummand", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsummand { + nd.set_attr_type("Tsummand", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `QuantizedConv2DWithBiasSumAndReluAndRequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, summand: O9, min_summand: O10, max_summand: O11, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), summand.into(), min_summand.into(), max_summand.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, summand: crate::Output, min_summand: crate::Output, max_summand: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedConv2DWithBiasSumAndReluAndRequantize", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + nd.add_input(summand); + nd.add_input(min_summand); + nd.add_input(max_summand); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsummand { + nd.set_attr_type("Tsummand", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedConv2DWithBiasSumAndReluAndRequantizeInst{op}) + } +} +impl QuantizedConv2DWithBiasSumAndReluAndRequantizeInst { + /// Returns the 'output' output of this 'QuantizedConv2DWithBiasSumAndReluAndRequantize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedConv2DWithBiasSumAndReluAndRequantize' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedConv2DWithBiasSumAndReluAndRequantize' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedConv2DWithBiasSumAndReluAndRequantizeInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `QuantizedConv2DWithBiasSumAndReluAndRequantize::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, summand, min_summand, max_summand, scope)`. -pub fn quantized_conv2_dwith_bias_sum_and_relu_and_requantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - O11: ::std::convert::Into, ->( - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - min_freezed_output: O7, - max_freezed_output: O8, - summand: O9, - min_summand: O10, - max_summand: O11, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedConv2DWithBiasSumAndReluAndRequantize::new().build( - input, - filter, - bias, - min_input, - max_input, - min_filter, - max_filter, - min_freezed_output, - max_freezed_output, - summand, - min_summand, - max_summand, - scope, - ) +pub fn quantized_conv2_dwith_bias_sum_and_relu_and_requantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into, O11: ::std::convert::Into>(input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, summand: O9, min_summand: O10, max_summand: O11, scope: &mut crate::Scope) -> crate::Result { + QuantizedConv2DWithBiasSumAndReluAndRequantize::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, summand, min_summand, max_summand, scope) } + /// Builder for the `QuantizedDepthwiseConv2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedDepthwiseConv2D { @@ -74265,6 +89883,12 @@ pub struct QuantizedDepthwiseConv2D { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedDepthwiseConv2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedDepthwiseConv2DInst { + /// An instance of a fully built QuantizedDepthwiseConv2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedDepthwiseConv2D { /// Creates a new `QuantizedDepthwiseConv2D`. @@ -74273,55 +89897,37 @@ impl QuantizedDepthwiseConv2D { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -74333,44 +89939,10 @@ impl QuantizedDepthwiseConv2D { } /// Builds the `QuantizedDepthwiseConv2D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedDepthwiseConv2D", |nd| { nd.add_input(input); nd.add_input(filter); @@ -74381,175 +89953,36 @@ impl QuantizedDepthwiseConv2D { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} -/// Shorthand for `QuantizedDepthwiseConv2D::new().build(input, filter, min_input, max_input, min_filter, max_filter, scope)`. -pub fn quantized_depthwise_conv2_d< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - input: O0, - filter: O1, - min_input: O2, - max_input: O3, - min_filter: O4, - max_filter: O5, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedDepthwiseConv2D::new().build( - input, filter, min_input, max_input, min_filter, max_filter, scope, - ) -} -/// Builder for the `QuantizedDepthwiseConv2DWithBias` operation. -#[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct QuantizedDepthwiseConv2DWithBias { - Tinput: ::std::option::Option, - Tfilter: ::std::option::Option, - out_type: ::std::option::Option, - strides: ::std::option::Option<::std::vec::Vec>, - padding: ::std::option::Option<::std::string::String>, - dilations: ::std::option::Option<::std::vec::Vec>, - control_inputs: ::std::vec::Vec, -} - -impl QuantizedDepthwiseConv2DWithBias { - /// Creates a new `QuantizedDepthwiseConv2DWithBias`. - pub fn new() -> Self { - Self::default() - } - - /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { - self.Tinput = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { - self.Tfilter = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { - self.out_type = ::std::option::Option::Some(value.into()); - self + /// Builds the `QuantizedDepthwiseConv2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) } - - /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { - self.strides = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { - self.padding = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { - self.dilations = ::std::option::Option::Some(value.into()); - self - } - - /// Adds a control input. - pub fn add_control_input(mut self, op: crate::Operation) -> Self { - self.control_inputs.push(op); - self - } - - /// Builds the `QuantizedDepthwiseConv2DWithBias` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("QuantizedDepthwiseConv2DWithBias", |nd| { + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedDepthwiseConv2D", |nd| { nd.add_input(input); nd.add_input(filter); - nd.add_input(bias); nd.add_input(min_input); nd.add_input(max_input); nd.add_input(min_filter); @@ -74557,130 +89990,301 @@ impl QuantizedDepthwiseConv2DWithBias { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedDepthwiseConv2DInst{op}) + } +} +impl QuantizedDepthwiseConv2DInst { + /// Returns the 'output' output of this 'QuantizedDepthwiseConv2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedDepthwiseConv2D' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedDepthwiseConv2D' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedDepthwiseConv2DInst{ + fn into(self) -> crate::Operation { + self.op } } - -/// Shorthand for `QuantizedDepthwiseConv2DWithBias::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, scope)`. -pub fn quantized_depthwise_conv2_dwith_bias< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedDepthwiseConv2DWithBias::new().build( - input, filter, bias, min_input, max_input, min_filter, max_filter, scope, - ) +/// Shorthand for `QuantizedDepthwiseConv2D::new().build(input, filter, min_input, max_input, min_filter, max_filter, scope)`. +pub fn quantized_depthwise_conv2_d, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(input: O0, filter: O1, min_input: O2, max_input: O3, min_filter: O4, max_filter: O5, scope: &mut crate::Scope) -> crate::Result { + QuantizedDepthwiseConv2D::new().build(input, filter, min_input, max_input, min_filter, max_filter, scope) } -/// Builder for the `QuantizedDepthwiseConv2DWithBiasAndRelu` operation. + +/// Builder for the `QuantizedDepthwiseConv2DWithBias` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct QuantizedDepthwiseConv2DWithBiasAndRelu { +pub struct QuantizedDepthwiseConv2DWithBias { Tinput: ::std::option::Option, Tfilter: ::std::option::Option, out_type: ::std::option::Option, strides: ::std::option::Option<::std::vec::Vec>, padding: ::std::option::Option<::std::string::String>, dilations: ::std::option::Option<::std::vec::Vec>, - padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedDepthwiseConv2DWithBias' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedDepthwiseConv2DWithBiasInst { + /// An instance of a fully built QuantizedDepthwiseConv2DWithBias Operation in a Tensorflow graph. + pub op: crate::Operation, +} -impl QuantizedDepthwiseConv2DWithBiasAndRelu { - /// Creates a new `QuantizedDepthwiseConv2DWithBiasAndRelu`. +impl QuantizedDepthwiseConv2DWithBias { + /// Creates a new `QuantizedDepthwiseConv2DWithBias`. pub fn new() -> Self { Self::default() } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { + self.dilations = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `QuantizedDepthwiseConv2DWithBias` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("QuantizedDepthwiseConv2DWithBias", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `QuantizedDepthwiseConv2DWithBias` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedDepthwiseConv2DWithBias", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedDepthwiseConv2DWithBiasInst{op}) + } +} +impl QuantizedDepthwiseConv2DWithBiasInst { + /// Returns the 'output' output of this 'QuantizedDepthwiseConv2DWithBias' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedDepthwiseConv2DWithBias' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedDepthwiseConv2DWithBias' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedDepthwiseConv2DWithBiasInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `QuantizedDepthwiseConv2DWithBias::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, scope)`. +pub fn quantized_depthwise_conv2_dwith_bias, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + QuantizedDepthwiseConv2DWithBias::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, scope) +} + +/// Builder for the `QuantizedDepthwiseConv2DWithBiasAndRelu` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct QuantizedDepthwiseConv2DWithBiasAndRelu { + Tinput: ::std::option::Option, + Tfilter: ::std::option::Option, + out_type: ::std::option::Option, + strides: ::std::option::Option<::std::vec::Vec>, + padding: ::std::option::Option<::std::string::String>, + dilations: ::std::option::Option<::std::vec::Vec>, + padding_list: ::std::option::Option<::std::vec::Vec>, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'QuantizedDepthwiseConv2DWithBiasAndRelu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedDepthwiseConv2DWithBiasAndReluInst { + /// An instance of a fully built QuantizedDepthwiseConv2DWithBiasAndRelu Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl QuantizedDepthwiseConv2DWithBiasAndRelu { + /// Creates a new `QuantizedDepthwiseConv2DWithBiasAndRelu`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `Tinput` attribute. + pub fn Tinput>(mut self, value: ArgType) -> Self { + self.Tinput = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `Tfilter` attribute. + pub fn Tfilter>(mut self, value: ArgType) -> Self { + self.Tfilter = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `out_type` attribute. + pub fn out_type>(mut self, value: ArgType) -> Self { + self.out_type = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `strides` attribute. + pub fn strides>>(mut self, value: ArgType) -> Self { + self.strides = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `padding` attribute. + pub fn padding>(mut self, value: ArgType) -> Self { + self.padding = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `dilations` attribute. + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -74692,48 +90296,10 @@ impl QuantizedDepthwiseConv2DWithBiasAndRelu { } /// Builds the `QuantizedDepthwiseConv2DWithBiasAndRelu` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedDepthwiseConv2DWithBiasAndRelu", |nd| { nd.add_input(input); nd.add_input(filter); @@ -74745,55 +90311,106 @@ impl QuantizedDepthwiseConv2DWithBiasAndRelu { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedDepthwiseConv2DWithBiasAndRelu` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedDepthwiseConv2DWithBiasAndRelu", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedDepthwiseConv2DWithBiasAndReluInst{op}) + } +} +impl QuantizedDepthwiseConv2DWithBiasAndReluInst { + /// Returns the 'output' output of this 'QuantizedDepthwiseConv2DWithBiasAndRelu' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedDepthwiseConv2DWithBiasAndRelu' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedDepthwiseConv2DWithBiasAndRelu' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedDepthwiseConv2DWithBiasAndReluInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedDepthwiseConv2DWithBiasAndRelu::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, scope)`. -pub fn quantized_depthwise_conv2_dwith_bias_and_relu< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedDepthwiseConv2DWithBiasAndRelu::new().build( - input, filter, bias, min_input, max_input, min_filter, max_filter, scope, - ) +pub fn quantized_depthwise_conv2_dwith_bias_and_relu, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, scope: &mut crate::Scope) -> crate::Result { + QuantizedDepthwiseConv2DWithBiasAndRelu::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, scope) } + /// Builder for the `QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize { @@ -74807,6 +90424,12 @@ pub struct QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize { padding_list: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedDepthwiseConv2DWithBiasAndReluAndRequantizeInst { + /// An instance of a fully built QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize { /// Creates a new `QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize`. @@ -74815,19 +90438,13 @@ impl QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `Tfilter` attribute. - pub fn Tfilter>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tfilter>(mut self, value: ArgType) -> Self { self.Tfilter = ::std::option::Option::Some(value.into()); self } @@ -74839,46 +90456,31 @@ impl QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_list` attribute. - pub fn padding_list>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_list>>(mut self, value: ArgType) -> Self { self.padding_list = ::std::option::Option::Some(value.into()); self } @@ -74890,137 +90492,131 @@ impl QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize { } /// Builds the `QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - filter.into(), - bias.into(), - min_input.into(), - max_input.into(), - min_filter.into(), - max_filter.into(), - min_freezed_output.into(), - max_freezed_output.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - bias: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - min_filter: crate::Output, - max_filter: crate::Output, - min_freezed_output: crate::Output, - max_freezed_output: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation( - "QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize", - |nd| { - nd.add_input(input); - nd.add_input(filter); - nd.add_input(bias); - nd.add_input(min_input); - nd.add_input(max_input); - nd.add_input(min_filter); - nd.add_input(max_filter); - nd.add_input(min_freezed_output); - nd.add_input(max_freezed_output); - for op in &self.control_inputs { - nd.add_control_input(op); - } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tfilter { - nd.set_attr_type("Tfilter", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tbias { - nd.set_attr_type("Tbias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_list { - nd.set_attr_int_list("padding_list", value)?; - } - ::std::result::Result::Ok(()) - }, - ) + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), bias.into(), min_input.into(), max_input.into(), min_filter.into(), max_filter.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, bias: crate::Output, min_input: crate::Output, max_input: crate::Output, min_filter: crate::Output, max_filter: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize", |nd| { + nd.add_input(input); + nd.add_input(filter); + nd.add_input(bias); + nd.add_input(min_input); + nd.add_input(max_input); + nd.add_input(min_filter); + nd.add_input(max_filter); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tfilter { + nd.set_attr_type("Tfilter", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_list { + nd.set_attr_int_list("padding_list", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedDepthwiseConv2DWithBiasAndReluAndRequantizeInst{op}) + } +} +impl QuantizedDepthwiseConv2DWithBiasAndReluAndRequantizeInst { + /// Returns the 'output' output of this 'QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedDepthwiseConv2DWithBiasAndReluAndRequantizeInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, scope)`. -pub fn quantized_depthwise_conv2_dwith_bias_and_relu_and_requantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - input: O0, - filter: O1, - bias: O2, - min_input: O3, - max_input: O4, - min_filter: O5, - max_filter: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize::new().build( - input, - filter, - bias, - min_input, - max_input, - min_filter, - max_filter, - min_freezed_output, - max_freezed_output, - scope, - ) +pub fn quantized_depthwise_conv2_dwith_bias_and_relu_and_requantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(input: O0, filter: O1, bias: O2, min_input: O3, max_input: O4, min_filter: O5, max_filter: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize::new().build(input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, scope) } + /// Builder for the `QuantizedInstanceNorm` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedInstanceNorm { @@ -75032,6 +90628,12 @@ pub struct QuantizedInstanceNorm { min_separation: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedInstanceNorm' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedInstanceNormInst { + /// An instance of a fully built QuantizedInstanceNorm Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedInstanceNorm { /// Creates a new `QuantizedInstanceNorm`. @@ -75046,10 +90648,7 @@ impl QuantizedInstanceNorm { } /// Sets the `output_range_given` attribute. - pub fn output_range_given>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_range_given>(mut self, value: ArgType) -> Self { self.output_range_given = ::std::option::Option::Some(value.into()); self } @@ -75085,27 +90684,10 @@ impl QuantizedInstanceNorm { } /// Builds the `QuantizedInstanceNorm` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - x: O0, - x_min: O1, - x_max: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, x: O0, x_min: O1, x_max: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), x_min.into(), x_max.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - x_min: crate::Output, - x_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, x_min: crate::Output, x_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedInstanceNorm", |nd| { nd.add_input(x); nd.add_input(x_min); @@ -75113,42 +90695,96 @@ impl QuantizedInstanceNorm { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_range_given { - nd.set_attr_bool("output_range_given", *value)?; - } - if let ::std::option::Option::Some(value) = &self.given_y_min { - nd.set_attr_float("given_y_min", *value)?; - } - if let ::std::option::Option::Some(value) = &self.given_y_max { - nd.set_attr_float("given_y_max", *value)?; - } - if let ::std::option::Option::Some(value) = &self.variance_epsilon { - nd.set_attr_float("variance_epsilon", *value)?; - } - if let ::std::option::Option::Some(value) = &self.min_separation { - nd.set_attr_float("min_separation", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_range_given { + nd.set_attr_bool("output_range_given", *value)?; + } + if let ::std::option::Option::Some(value) = &self.given_y_min { + nd.set_attr_float("given_y_min", *value)?; + } + if let ::std::option::Option::Some(value) = &self.given_y_max { + nd.set_attr_float("given_y_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.variance_epsilon { + nd.set_attr_float("variance_epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.min_separation { + nd.set_attr_float("min_separation", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedInstanceNorm` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, x: O0, x_min: O1, x_max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), x_min.into(), x_max.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, x_min: crate::Output, x_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedInstanceNorm", |nd| { + nd.add_input(x); + nd.add_input(x_min); + nd.add_input(x_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_range_given { + nd.set_attr_bool("output_range_given", *value)?; + } + if let ::std::option::Option::Some(value) = &self.given_y_min { + nd.set_attr_float("given_y_min", *value)?; + } + if let ::std::option::Option::Some(value) = &self.given_y_max { + nd.set_attr_float("given_y_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.variance_epsilon { + nd.set_attr_float("variance_epsilon", *value)?; + } + if let ::std::option::Option::Some(value) = &self.min_separation { + nd.set_attr_float("min_separation", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedInstanceNormInst{op}) + } +} +impl QuantizedInstanceNormInst { + /// Returns the 'y' output of this 'QuantizedInstanceNorm' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'y_min' output of this 'QuantizedInstanceNorm' operation. + pub fn y_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'y_max' output of this 'QuantizedInstanceNorm' operation. + pub fn y_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedInstanceNormInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedInstanceNorm::new().build(x, x_min, x_max, scope)`. -pub fn quantized_instance_norm< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - x: O0, - x_min: O1, - x_max: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_instance_norm, O1: ::std::convert::Into, O2: ::std::convert::Into>(x: O0, x_min: O1, x_max: O2, scope: &mut crate::Scope) -> crate::Result { QuantizedInstanceNorm::new().build(x, x_min, x_max, scope) } + /// Builder for the `QuantizedMatMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedMatMul { @@ -75160,6 +90796,12 @@ pub struct QuantizedMatMul { Tactivation: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedMatMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedMatMulInst { + /// An instance of a fully built QuantizedMatMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedMatMul { /// Creates a new `QuantizedMatMul`. @@ -75180,10 +90822,7 @@ impl QuantizedMatMul { } /// Sets the `Toutput` attribute. - pub fn Toutput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput>(mut self, value: ArgType) -> Self { self.Toutput = ::std::option::Option::Some(value.into()); self } @@ -75201,10 +90840,7 @@ impl QuantizedMatMul { } /// Sets the `Tactivation` attribute. - pub fn Tactivation>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tactivation>(mut self, value: ArgType) -> Self { self.Tactivation = ::std::option::Option::Some(value.into()); self } @@ -75216,44 +90852,10 @@ impl QuantizedMatMul { } /// Builds the `QuantizedMatMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - min_a: O2, - max_a: O3, - min_b: O4, - max_b: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a.into(), - b.into(), - min_a.into(), - max_a.into(), - min_b.into(), - max_b.into(), - scope, - ) - } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - min_a: crate::Output, - max_a: crate::Output, - min_b: crate::Output, - max_b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, a: O0, b: O1, min_a: O2, max_a: O3, min_b: O4, max_b: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a.into(), b.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), scope) + } + fn build_impl(&self, a: crate::Output, b: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedMatMul", |nd| { nd.add_input(a); nd.add_input(b); @@ -75264,48 +90866,99 @@ impl QuantizedMatMul { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutput { - nd.set_attr_type("Toutput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tactivation { - nd.set_attr_type("Tactivation", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tactivation { + nd.set_attr_type("Tactivation", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedMatMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, a: O0, b: O1, min_a: O2, max_a: O3, min_b: O4, max_b: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedMatMul", |nd| { + nd.add_input(a); + nd.add_input(b); + nd.add_input(min_a); + nd.add_input(max_a); + nd.add_input(min_b); + nd.add_input(max_b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tactivation { + nd.set_attr_type("Tactivation", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedMatMulInst{op}) + } +} +impl QuantizedMatMulInst { + /// Returns the 'out' output of this 'QuantizedMatMul' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_out' output of this 'QuantizedMatMul' operation. + pub fn min_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_out' output of this 'QuantizedMatMul' operation. + pub fn max_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedMatMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedMatMul::new().build(a, b, min_a, max_a, min_b, max_b, scope)`. -pub fn quantized_mat_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - a: O0, - b: O1, - min_a: O2, - max_a: O3, - min_b: O4, - max_b: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_mat_mul, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(a: O0, b: O1, min_a: O2, max_a: O3, min_b: O4, max_b: O5, scope: &mut crate::Scope) -> crate::Result { QuantizedMatMul::new().build(a, b, min_a, max_a, min_b, max_b, scope) } + /// Builder for the `QuantizedMatMulWithBias` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedMatMulWithBias { @@ -75318,6 +90971,12 @@ pub struct QuantizedMatMulWithBias { input_quant_mode: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedMatMulWithBias' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedMatMulWithBiasInst { + /// An instance of a fully built QuantizedMatMulWithBias Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedMatMulWithBias { /// Creates a new `QuantizedMatMulWithBias`. @@ -75344,10 +91003,7 @@ impl QuantizedMatMulWithBias { } /// Sets the `Toutput` attribute. - pub fn Toutput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput>(mut self, value: ArgType) -> Self { self.Toutput = ::std::option::Option::Some(value.into()); self } @@ -75365,10 +91021,7 @@ impl QuantizedMatMulWithBias { } /// Sets the `input_quant_mode` attribute. - pub fn input_quant_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_quant_mode>(mut self, value: ArgType) -> Self { self.input_quant_mode = ::std::option::Option::Some(value.into()); self } @@ -75380,48 +91033,10 @@ impl QuantizedMatMulWithBias { } /// Builds the `QuantizedMatMulWithBias` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - bias: O2, - min_a: O3, - max_a: O4, - min_b: O5, - max_b: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a.into(), - b.into(), - bias.into(), - min_a.into(), - max_a.into(), - min_b.into(), - max_b.into(), - scope, - ) - } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - bias: crate::Output, - min_a: crate::Output, - max_a: crate::Output, - min_b: crate::Output, - max_b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a.into(), b.into(), bias.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), scope) + } + fn build_impl(&self, a: crate::Output, b: crate::Output, bias: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedMatMulWithBias", |nd| { nd.add_input(a); nd.add_input(b); @@ -75433,53 +91048,106 @@ impl QuantizedMatMulWithBias { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tbias { - nd.set_attr_type("Tbias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutput { - nd.set_attr_type("Toutput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.input_quant_mode { - nd.set_attr_string("input_quant_mode", value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_quant_mode { + nd.set_attr_string("input_quant_mode", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedMatMulWithBias` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), bias.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, bias: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedMatMulWithBias", |nd| { + nd.add_input(a); + nd.add_input(b); + nd.add_input(bias); + nd.add_input(min_a); + nd.add_input(max_a); + nd.add_input(min_b); + nd.add_input(max_b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_quant_mode { + nd.set_attr_string("input_quant_mode", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedMatMulWithBiasInst{op}) + } +} +impl QuantizedMatMulWithBiasInst { + /// Returns the 'out' output of this 'QuantizedMatMulWithBias' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_out' output of this 'QuantizedMatMulWithBias' operation. + pub fn min_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_out' output of this 'QuantizedMatMulWithBias' operation. + pub fn max_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedMatMulWithBiasInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedMatMulWithBias::new().build(a, b, bias, min_a, max_a, min_b, max_b, scope)`. -pub fn quantized_mat_mul_with_bias< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - a: O0, - b: O1, - bias: O2, - min_a: O3, - max_a: O4, - min_b: O5, - max_b: O6, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_mat_mul_with_bias, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, scope: &mut crate::Scope) -> crate::Result { QuantizedMatMulWithBias::new().build(a, b, bias, min_a, max_a, min_b, max_b, scope) } + /// Builder for the `QuantizedMatMulWithBiasAndDequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedMatMulWithBiasAndDequantize { @@ -75492,6 +91160,12 @@ pub struct QuantizedMatMulWithBiasAndDequantize { input_quant_mode: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedMatMulWithBiasAndDequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedMatMulWithBiasAndDequantizeInst { + /// An instance of a fully built QuantizedMatMulWithBiasAndDequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedMatMulWithBiasAndDequantize { /// Creates a new `QuantizedMatMulWithBiasAndDequantize`. @@ -75518,10 +91192,7 @@ impl QuantizedMatMulWithBiasAndDequantize { } /// Sets the `Toutput` attribute. - pub fn Toutput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput>(mut self, value: ArgType) -> Self { self.Toutput = ::std::option::Option::Some(value.into()); self } @@ -75539,10 +91210,7 @@ impl QuantizedMatMulWithBiasAndDequantize { } /// Sets the `input_quant_mode` attribute. - pub fn input_quant_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_quant_mode>(mut self, value: ArgType) -> Self { self.input_quant_mode = ::std::option::Option::Some(value.into()); self } @@ -75554,56 +91222,10 @@ impl QuantizedMatMulWithBiasAndDequantize { } /// Builds the `QuantizedMatMulWithBiasAndDequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - bias: O2, - min_a: O3, - max_a: O4, - min_b: O5, - max_b: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a.into(), - b.into(), - bias.into(), - min_a.into(), - max_a.into(), - min_b.into(), - max_b.into(), - min_freezed_output.into(), - max_freezed_output.into(), - scope, - ) - } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - bias: crate::Output, - min_a: crate::Output, - max_a: crate::Output, - min_b: crate::Output, - max_b: crate::Output, - min_freezed_output: crate::Output, - max_freezed_output: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a.into(), b.into(), bias.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_impl(&self, a: crate::Output, b: crate::Output, bias: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedMatMulWithBiasAndDequantize", |nd| { nd.add_input(a); nd.add_input(b); @@ -75617,68 +91239,94 @@ impl QuantizedMatMulWithBiasAndDequantize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tbias { - nd.set_attr_type("Tbias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutput { - nd.set_attr_type("Toutput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.input_quant_mode { - nd.set_attr_string("input_quant_mode", value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_quant_mode { + nd.set_attr_string("input_quant_mode", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedMatMulWithBiasAndDequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), bias.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, bias: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedMatMulWithBiasAndDequantize", |nd| { + nd.add_input(a); + nd.add_input(b); + nd.add_input(bias); + nd.add_input(min_a); + nd.add_input(max_a); + nd.add_input(min_b); + nd.add_input(max_b); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_quant_mode { + nd.set_attr_string("input_quant_mode", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedMatMulWithBiasAndDequantizeInst{op}) + } +} +impl QuantizedMatMulWithBiasAndDequantizeInst { + /// Returns the 'out' output of this 'QuantizedMatMulWithBiasAndDequantize' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QuantizedMatMulWithBiasAndDequantizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedMatMulWithBiasAndDequantize::new().build(a, b, bias, min_a, max_a, min_b, max_b, min_freezed_output, max_freezed_output, scope)`. -pub fn quantized_mat_mul_with_bias_and_dequantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - a: O0, - b: O1, - bias: O2, - min_a: O3, - max_a: O4, - min_b: O5, - max_b: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedMatMulWithBiasAndDequantize::new().build( - a, - b, - bias, - min_a, - max_a, - min_b, - max_b, - min_freezed_output, - max_freezed_output, - scope, - ) +pub fn quantized_mat_mul_with_bias_and_dequantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + QuantizedMatMulWithBiasAndDequantize::new().build(a, b, bias, min_a, max_a, min_b, max_b, min_freezed_output, max_freezed_output, scope) } + /// Builder for the `QuantizedMatMulWithBiasAndRelu` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedMatMulWithBiasAndRelu { @@ -75690,6 +91338,12 @@ pub struct QuantizedMatMulWithBiasAndRelu { input_quant_mode: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedMatMulWithBiasAndRelu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedMatMulWithBiasAndReluInst { + /// An instance of a fully built QuantizedMatMulWithBiasAndRelu Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedMatMulWithBiasAndRelu { /// Creates a new `QuantizedMatMulWithBiasAndRelu`. @@ -75710,10 +91364,7 @@ impl QuantizedMatMulWithBiasAndRelu { } /// Sets the `Toutput` attribute. - pub fn Toutput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput>(mut self, value: ArgType) -> Self { self.Toutput = ::std::option::Option::Some(value.into()); self } @@ -75731,10 +91382,7 @@ impl QuantizedMatMulWithBiasAndRelu { } /// Sets the `input_quant_mode` attribute. - pub fn input_quant_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_quant_mode>(mut self, value: ArgType) -> Self { self.input_quant_mode = ::std::option::Option::Some(value.into()); self } @@ -75746,48 +91394,10 @@ impl QuantizedMatMulWithBiasAndRelu { } /// Builds the `QuantizedMatMulWithBiasAndRelu` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - bias: O2, - min_a: O3, - max_a: O4, - min_b: O5, - max_b: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a.into(), - b.into(), - bias.into(), - min_a.into(), - max_a.into(), - min_b.into(), - max_b.into(), - scope, - ) - } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - bias: crate::Output, - min_a: crate::Output, - max_a: crate::Output, - min_b: crate::Output, - max_b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a.into(), b.into(), bias.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), scope) + } + fn build_impl(&self, a: crate::Output, b: crate::Output, bias: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedMatMulWithBiasAndRelu", |nd| { nd.add_input(a); nd.add_input(b); @@ -75799,50 +91409,100 @@ impl QuantizedMatMulWithBiasAndRelu { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutput { - nd.set_attr_type("Toutput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.input_quant_mode { - nd.set_attr_string("input_quant_mode", value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_quant_mode { + nd.set_attr_string("input_quant_mode", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedMatMulWithBiasAndRelu` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), bias.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, bias: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedMatMulWithBiasAndRelu", |nd| { + nd.add_input(a); + nd.add_input(b); + nd.add_input(bias); + nd.add_input(min_a); + nd.add_input(max_a); + nd.add_input(min_b); + nd.add_input(max_b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_quant_mode { + nd.set_attr_string("input_quant_mode", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedMatMulWithBiasAndReluInst{op}) + } +} +impl QuantizedMatMulWithBiasAndReluInst { + /// Returns the 'out' output of this 'QuantizedMatMulWithBiasAndRelu' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_out' output of this 'QuantizedMatMulWithBiasAndRelu' operation. + pub fn min_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_out' output of this 'QuantizedMatMulWithBiasAndRelu' operation. + pub fn max_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedMatMulWithBiasAndReluInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedMatMulWithBiasAndRelu::new().build(a, b, bias, min_a, max_a, min_b, max_b, scope)`. -pub fn quantized_mat_mul_with_bias_and_relu< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - a: O0, - b: O1, - bias: O2, - min_a: O3, - max_a: O4, - min_b: O5, - max_b: O6, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_mat_mul_with_bias_and_relu, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, scope: &mut crate::Scope) -> crate::Result { QuantizedMatMulWithBiasAndRelu::new().build(a, b, bias, min_a, max_a, min_b, max_b, scope) } + /// Builder for the `QuantizedMatMulWithBiasAndReluAndRequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedMatMulWithBiasAndReluAndRequantize { @@ -75855,6 +91515,12 @@ pub struct QuantizedMatMulWithBiasAndReluAndRequantize { input_quant_mode: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedMatMulWithBiasAndReluAndRequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedMatMulWithBiasAndReluAndRequantizeInst { + /// An instance of a fully built QuantizedMatMulWithBiasAndReluAndRequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedMatMulWithBiasAndReluAndRequantize { /// Creates a new `QuantizedMatMulWithBiasAndReluAndRequantize`. @@ -75881,10 +91547,7 @@ impl QuantizedMatMulWithBiasAndReluAndRequantize { } /// Sets the `Toutput` attribute. - pub fn Toutput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput>(mut self, value: ArgType) -> Self { self.Toutput = ::std::option::Option::Some(value.into()); self } @@ -75902,10 +91565,7 @@ impl QuantizedMatMulWithBiasAndReluAndRequantize { } /// Sets the `input_quant_mode` attribute. - pub fn input_quant_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_quant_mode>(mut self, value: ArgType) -> Self { self.input_quant_mode = ::std::option::Option::Some(value.into()); self } @@ -75917,56 +91577,10 @@ impl QuantizedMatMulWithBiasAndReluAndRequantize { } /// Builds the `QuantizedMatMulWithBiasAndReluAndRequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - bias: O2, - min_a: O3, - max_a: O4, - min_b: O5, - max_b: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a.into(), - b.into(), - bias.into(), - min_a.into(), - max_a.into(), - min_b.into(), - max_b.into(), - min_freezed_output.into(), - max_freezed_output.into(), - scope, - ) - } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - bias: crate::Output, - min_a: crate::Output, - max_a: crate::Output, - min_b: crate::Output, - max_b: crate::Output, - min_freezed_output: crate::Output, - max_freezed_output: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a.into(), b.into(), bias.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_impl(&self, a: crate::Output, b: crate::Output, bias: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedMatMulWithBiasAndReluAndRequantize", |nd| { nd.add_input(a); nd.add_input(b); @@ -75980,68 +91594,108 @@ impl QuantizedMatMulWithBiasAndReluAndRequantize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tbias { - nd.set_attr_type("Tbias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutput { - nd.set_attr_type("Toutput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.input_quant_mode { - nd.set_attr_string("input_quant_mode", value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_quant_mode { + nd.set_attr_string("input_quant_mode", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedMatMulWithBiasAndReluAndRequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), bias.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, bias: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedMatMulWithBiasAndReluAndRequantize", |nd| { + nd.add_input(a); + nd.add_input(b); + nd.add_input(bias); + nd.add_input(min_a); + nd.add_input(max_a); + nd.add_input(min_b); + nd.add_input(max_b); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_quant_mode { + nd.set_attr_string("input_quant_mode", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedMatMulWithBiasAndReluAndRequantizeInst{op}) + } +} +impl QuantizedMatMulWithBiasAndReluAndRequantizeInst { + /// Returns the 'out' output of this 'QuantizedMatMulWithBiasAndReluAndRequantize' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_out' output of this 'QuantizedMatMulWithBiasAndReluAndRequantize' operation. + pub fn min_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_out' output of this 'QuantizedMatMulWithBiasAndReluAndRequantize' operation. + pub fn max_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedMatMulWithBiasAndReluAndRequantizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedMatMulWithBiasAndReluAndRequantize::new().build(a, b, bias, min_a, max_a, min_b, max_b, min_freezed_output, max_freezed_output, scope)`. -pub fn quantized_mat_mul_with_bias_and_relu_and_requantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - a: O0, - b: O1, - bias: O2, - min_a: O3, - max_a: O4, - min_b: O5, - max_b: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedMatMulWithBiasAndReluAndRequantize::new().build( - a, - b, - bias, - min_a, - max_a, - min_b, - max_b, - min_freezed_output, - max_freezed_output, - scope, - ) +pub fn quantized_mat_mul_with_bias_and_relu_and_requantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + QuantizedMatMulWithBiasAndReluAndRequantize::new().build(a, b, bias, min_a, max_a, min_b, max_b, min_freezed_output, max_freezed_output, scope) } + /// Builder for the `QuantizedMatMulWithBiasAndRequantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedMatMulWithBiasAndRequantize { @@ -76054,6 +91708,12 @@ pub struct QuantizedMatMulWithBiasAndRequantize { input_quant_mode: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedMatMulWithBiasAndRequantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedMatMulWithBiasAndRequantizeInst { + /// An instance of a fully built QuantizedMatMulWithBiasAndRequantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedMatMulWithBiasAndRequantize { /// Creates a new `QuantizedMatMulWithBiasAndRequantize`. @@ -76080,10 +91740,7 @@ impl QuantizedMatMulWithBiasAndRequantize { } /// Sets the `Toutput` attribute. - pub fn Toutput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput>(mut self, value: ArgType) -> Self { self.Toutput = ::std::option::Option::Some(value.into()); self } @@ -76101,10 +91758,7 @@ impl QuantizedMatMulWithBiasAndRequantize { } /// Sets the `input_quant_mode` attribute. - pub fn input_quant_mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_quant_mode>(mut self, value: ArgType) -> Self { self.input_quant_mode = ::std::option::Option::Some(value.into()); self } @@ -76116,56 +91770,10 @@ impl QuantizedMatMulWithBiasAndRequantize { } /// Builds the `QuantizedMatMulWithBiasAndRequantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - bias: O2, - min_a: O3, - max_a: O4, - min_b: O5, - max_b: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a.into(), - b.into(), - bias.into(), - min_a.into(), - max_a.into(), - min_b.into(), - max_b.into(), - min_freezed_output.into(), - max_freezed_output.into(), - scope, - ) - } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - bias: crate::Output, - min_a: crate::Output, - max_a: crate::Output, - min_b: crate::Output, - max_b: crate::Output, - min_freezed_output: crate::Output, - max_freezed_output: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a.into(), b.into(), bias.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_impl(&self, a: crate::Output, b: crate::Output, bias: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedMatMulWithBiasAndRequantize", |nd| { nd.add_input(a); nd.add_input(b); @@ -76179,68 +91787,108 @@ impl QuantizedMatMulWithBiasAndRequantize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tbias { - nd.set_attr_type("Tbias", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutput { - nd.set_attr_type("Toutput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.input_quant_mode { - nd.set_attr_string("input_quant_mode", value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_quant_mode { + nd.set_attr_string("input_quant_mode", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedMatMulWithBiasAndRequantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), bias.into(), min_a.into(), max_a.into(), min_b.into(), max_b.into(), min_freezed_output.into(), max_freezed_output.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, bias: crate::Output, min_a: crate::Output, max_a: crate::Output, min_b: crate::Output, max_b: crate::Output, min_freezed_output: crate::Output, max_freezed_output: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedMatMulWithBiasAndRequantize", |nd| { + nd.add_input(a); + nd.add_input(b); + nd.add_input(bias); + nd.add_input(min_a); + nd.add_input(max_a); + nd.add_input(min_b); + nd.add_input(max_b); + nd.add_input(min_freezed_output); + nd.add_input(max_freezed_output); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tbias { + nd.set_attr_type("Tbias", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_quant_mode { + nd.set_attr_string("input_quant_mode", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedMatMulWithBiasAndRequantizeInst{op}) + } +} +impl QuantizedMatMulWithBiasAndRequantizeInst { + /// Returns the 'out' output of this 'QuantizedMatMulWithBiasAndRequantize' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_out' output of this 'QuantizedMatMulWithBiasAndRequantize' operation. + pub fn min_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_out' output of this 'QuantizedMatMulWithBiasAndRequantize' operation. + pub fn max_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedMatMulWithBiasAndRequantizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedMatMulWithBiasAndRequantize::new().build(a, b, bias, min_a, max_a, min_b, max_b, min_freezed_output, max_freezed_output, scope)`. -pub fn quantized_mat_mul_with_bias_and_requantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - a: O0, - b: O1, - bias: O2, - min_a: O3, - max_a: O4, - min_b: O5, - max_b: O6, - min_freezed_output: O7, - max_freezed_output: O8, - scope: &mut crate::Scope, -) -> crate::Result { - QuantizedMatMulWithBiasAndRequantize::new().build( - a, - b, - bias, - min_a, - max_a, - min_b, - max_b, - min_freezed_output, - max_freezed_output, - scope, - ) +pub fn quantized_mat_mul_with_bias_and_requantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(a: O0, b: O1, bias: O2, min_a: O3, max_a: O4, min_b: O5, max_b: O6, min_freezed_output: O7, max_freezed_output: O8, scope: &mut crate::Scope) -> crate::Result { + QuantizedMatMulWithBiasAndRequantize::new().build(a, b, bias, min_a, max_a, min_b, max_b, min_freezed_output, max_freezed_output, scope) } + /// Builder for the `QuantizedMaxPool` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedMaxPool { @@ -76250,6 +91898,12 @@ pub struct QuantizedMaxPool { padding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedMaxPool' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedMaxPoolInst { + /// An instance of a fully built QuantizedMaxPool Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedMaxPool { /// Creates a new `QuantizedMaxPool`. @@ -76264,28 +91918,19 @@ impl QuantizedMaxPool { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `padding` attribute. - pub fn padding>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding>(mut self, value: ArgType) -> Self { self.padding = ::std::option::Option::Some(value.into()); self } @@ -76297,27 +91942,10 @@ impl QuantizedMaxPool { } /// Builds the `QuantizedMaxPool` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - min_input: O1, - max_input: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, min_input: O1, max_input: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), min_input.into(), max_input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - min_input: crate::Output, - max_input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, min_input: crate::Output, max_input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedMaxPool", |nd| { nd.add_input(input); nd.add_input(min_input); @@ -76325,36 +91953,84 @@ impl QuantizedMaxPool { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding { - nd.set_attr_string("padding", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedMaxPool` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, min_input: O1, max_input: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), min_input.into(), max_input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, min_input: crate::Output, max_input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedMaxPool", |nd| { + nd.add_input(input); + nd.add_input(min_input); + nd.add_input(max_input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding { + nd.set_attr_string("padding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedMaxPoolInst{op}) + } +} +impl QuantizedMaxPoolInst { + /// Returns the 'output' output of this 'QuantizedMaxPool' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_output' output of this 'QuantizedMaxPool' operation. + pub fn min_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_output' output of this 'QuantizedMaxPool' operation. + pub fn max_output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedMaxPoolInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedMaxPool::new().build(input, min_input, max_input, scope)`. -pub fn quantized_max_pool< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - min_input: O1, - max_input: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_max_pool, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, min_input: O1, max_input: O2, scope: &mut crate::Scope) -> crate::Result { QuantizedMaxPool::new().build(input, min_input, max_input, scope) } + /// Builder for the `QuantizedMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedMul { @@ -76363,6 +92039,12 @@ pub struct QuantizedMul { Toutput: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedMulInst { + /// An instance of a fully built QuantizedMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedMul { /// Creates a new `QuantizedMul`. @@ -76383,10 +92065,7 @@ impl QuantizedMul { } /// Sets the `Toutput` attribute. - pub fn Toutput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput>(mut self, value: ArgType) -> Self { self.Toutput = ::std::option::Option::Some(value.into()); self } @@ -76398,44 +92077,10 @@ impl QuantizedMul { } /// Builds the `QuantizedMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - min_x: O2, - max_x: O3, - min_y: O4, - max_y: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - x.into(), - y.into(), - min_x.into(), - max_x.into(), - min_y.into(), - max_y.into(), - scope, - ) - } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - min_x: crate::Output, - max_x: crate::Output, - min_y: crate::Output, - max_y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, x: O0, y: O1, min_x: O2, max_x: O3, min_y: O4, max_y: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(x.into(), y.into(), min_x.into(), max_x.into(), min_y.into(), max_y.into(), scope) + } + fn build_impl(&self, x: crate::Output, y: crate::Output, min_x: crate::Output, max_x: crate::Output, min_y: crate::Output, max_y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedMul", |nd| { nd.add_input(x); nd.add_input(y); @@ -76446,39 +92091,81 @@ impl QuantizedMul { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T1 { - nd.set_attr_type("T1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T2 { - nd.set_attr_type("T2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutput { - nd.set_attr_type("Toutput", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, x: O0, y: O1, min_x: O2, max_x: O3, min_y: O4, max_y: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), min_x.into(), max_x.into(), min_y.into(), max_y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, min_x: crate::Output, max_x: crate::Output, min_y: crate::Output, max_y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedMul", |nd| { + nd.add_input(x); + nd.add_input(y); + nd.add_input(min_x); + nd.add_input(max_x); + nd.add_input(min_y); + nd.add_input(max_y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T1 { + nd.set_attr_type("T1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T2 { + nd.set_attr_type("T2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedMulInst{op}) + } +} +impl QuantizedMulInst { + /// Returns the 'z' output of this 'QuantizedMul' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_z' output of this 'QuantizedMul' operation. + pub fn min_z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_z' output of this 'QuantizedMul' operation. + pub fn max_z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedMul::new().build(x, y, min_x, max_x, min_y, max_y, scope)`. -pub fn quantized_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - x: O0, - y: O1, - min_x: O2, - max_x: O3, - min_y: O4, - max_y: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_mul, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(x: O0, y: O1, min_x: O2, max_x: O3, min_y: O4, max_y: O5, scope: &mut crate::Scope) -> crate::Result { QuantizedMul::new().build(x, y, min_x, max_x, min_y, max_y, scope) } + /// Builder for the `QuantizedRelu` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedRelu { @@ -76486,6 +92173,12 @@ pub struct QuantizedRelu { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedRelu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedReluInst { + /// An instance of a fully built QuantizedRelu Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedRelu { /// Creates a new `QuantizedRelu`. @@ -76494,19 +92187,13 @@ impl QuantizedRelu { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -76518,32 +92205,10 @@ impl QuantizedRelu { } /// Builds the `QuantizedRelu` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - features: O0, - min_features: O1, - max_features: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - features.into(), - min_features.into(), - max_features.into(), - scope, - ) - } - - fn build_impl( - &self, - features: crate::Output, - min_features: crate::Output, - max_features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, features: O0, min_features: O1, max_features: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(features.into(), min_features.into(), max_features.into(), scope) + } + fn build_impl(&self, features: crate::Output, min_features: crate::Output, max_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedRelu", |nd| { nd.add_input(features); nd.add_input(min_features); @@ -76551,30 +92216,72 @@ impl QuantizedRelu { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedRelu` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, features: O0, min_features: O1, max_features: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), min_features.into(), max_features.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, min_features: crate::Output, max_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedRelu", |nd| { + nd.add_input(features); + nd.add_input(min_features); + nd.add_input(max_features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedReluInst{op}) + } +} +impl QuantizedReluInst { + /// Returns the 'activations' output of this 'QuantizedRelu' operation. + pub fn activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_activations' output of this 'QuantizedRelu' operation. + pub fn min_activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_activations' output of this 'QuantizedRelu' operation. + pub fn max_activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedReluInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedRelu::new().build(features, min_features, max_features, scope)`. -pub fn quantized_relu< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - features: O0, - min_features: O1, - max_features: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_relu, O1: ::std::convert::Into, O2: ::std::convert::Into>(features: O0, min_features: O1, max_features: O2, scope: &mut crate::Scope) -> crate::Result { QuantizedRelu::new().build(features, min_features, max_features, scope) } + /// Builder for the `QuantizedRelu6` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedRelu6 { @@ -76582,6 +92289,12 @@ pub struct QuantizedRelu6 { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedRelu6' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedRelu6Inst { + /// An instance of a fully built QuantizedRelu6 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedRelu6 { /// Creates a new `QuantizedRelu6`. @@ -76590,19 +92303,13 @@ impl QuantizedRelu6 { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -76614,32 +92321,10 @@ impl QuantizedRelu6 { } /// Builds the `QuantizedRelu6` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - features: O0, - min_features: O1, - max_features: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - features.into(), - min_features.into(), - max_features.into(), - scope, - ) - } - - fn build_impl( - &self, - features: crate::Output, - min_features: crate::Output, - max_features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, features: O0, min_features: O1, max_features: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(features.into(), min_features.into(), max_features.into(), scope) + } + fn build_impl(&self, features: crate::Output, min_features: crate::Output, max_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedRelu6", |nd| { nd.add_input(features); nd.add_input(min_features); @@ -76647,30 +92332,72 @@ impl QuantizedRelu6 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedRelu6` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, features: O0, min_features: O1, max_features: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), min_features.into(), max_features.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, min_features: crate::Output, max_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedRelu6", |nd| { + nd.add_input(features); + nd.add_input(min_features); + nd.add_input(max_features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedRelu6Inst{op}) + } +} +impl QuantizedRelu6Inst { + /// Returns the 'activations' output of this 'QuantizedRelu6' operation. + pub fn activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_activations' output of this 'QuantizedRelu6' operation. + pub fn min_activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_activations' output of this 'QuantizedRelu6' operation. + pub fn max_activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedRelu6Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedRelu6::new().build(features, min_features, max_features, scope)`. -pub fn quantized_relu6< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - features: O0, - min_features: O1, - max_features: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_relu6, O1: ::std::convert::Into, O2: ::std::convert::Into>(features: O0, min_features: O1, max_features: O2, scope: &mut crate::Scope) -> crate::Result { QuantizedRelu6::new().build(features, min_features, max_features, scope) } + /// Builder for the `QuantizedReluX` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedReluX { @@ -76678,6 +92405,12 @@ pub struct QuantizedReluX { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedReluX' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedReluXInst { + /// An instance of a fully built QuantizedReluX Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedReluX { /// Creates a new `QuantizedReluX`. @@ -76686,19 +92419,13 @@ impl QuantizedReluX { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -76710,36 +92437,10 @@ impl QuantizedReluX { } /// Builds the `QuantizedReluX` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - features: O0, - max_value: O1, - min_features: O2, - max_features: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - features.into(), - max_value.into(), - min_features.into(), - max_features.into(), - scope, - ) - } - - fn build_impl( - &self, - features: crate::Output, - max_value: crate::Output, - min_features: crate::Output, - max_features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, features: O0, max_value: O1, min_features: O2, max_features: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(features.into(), max_value.into(), min_features.into(), max_features.into(), scope) + } + fn build_impl(&self, features: crate::Output, max_value: crate::Output, min_features: crate::Output, max_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedReluX", |nd| { nd.add_input(features); nd.add_input(max_value); @@ -76748,32 +92449,73 @@ impl QuantizedReluX { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedReluX` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, features: O0, max_value: O1, min_features: O2, max_features: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), max_value.into(), min_features.into(), max_features.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, max_value: crate::Output, min_features: crate::Output, max_features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedReluX", |nd| { + nd.add_input(features); + nd.add_input(max_value); + nd.add_input(min_features); + nd.add_input(max_features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedReluXInst{op}) + } +} +impl QuantizedReluXInst { + /// Returns the 'activations' output of this 'QuantizedReluX' operation. + pub fn activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'min_activations' output of this 'QuantizedReluX' operation. + pub fn min_activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'max_activations' output of this 'QuantizedReluX' operation. + pub fn max_activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedReluXInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedReluX::new().build(features, max_value, min_features, max_features, scope)`. -pub fn quantized_relu_x< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - features: O0, - max_value: O1, - min_features: O2, - max_features: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_relu_x, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(features: O0, max_value: O1, min_features: O2, max_features: O3, scope: &mut crate::Scope) -> crate::Result { QuantizedReluX::new().build(features, max_value, min_features, max_features, scope) } + /// Builder for the `QuantizedReshape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedReshape { @@ -76781,6 +92523,12 @@ pub struct QuantizedReshape { Tshape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedReshape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedReshapeInst { + /// An instance of a fully built QuantizedReshape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedReshape { /// Creates a new `QuantizedReshape`. @@ -76795,10 +92543,7 @@ impl QuantizedReshape { } /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshape>(mut self, value: ArgType) -> Self { self.Tshape = ::std::option::Option::Some(value.into()); self } @@ -76810,36 +92555,10 @@ impl QuantizedReshape { } /// Builds the `QuantizedReshape` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - tensor: O0, - shape: O1, - input_min: O2, - input_max: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tensor.into(), - shape.into(), - input_min.into(), - input_max.into(), - scope, - ) - } - - fn build_impl( - &self, - tensor: crate::Output, - shape: crate::Output, - input_min: crate::Output, - input_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, tensor: O0, shape: O1, input_min: O2, input_max: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tensor.into(), shape.into(), input_min.into(), input_max.into(), scope) + } + fn build_impl(&self, tensor: crate::Output, shape: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedReshape", |nd| { nd.add_input(tensor); nd.add_input(shape); @@ -76848,32 +92567,73 @@ impl QuantizedReshape { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedReshape` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, tensor: O0, shape: O1, input_min: O2, input_max: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), shape.into(), input_min.into(), input_max.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, shape: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedReshape", |nd| { + nd.add_input(tensor); + nd.add_input(shape); + nd.add_input(input_min); + nd.add_input(input_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedReshapeInst{op}) + } +} +impl QuantizedReshapeInst { + /// Returns the 'output' output of this 'QuantizedReshape' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_min' output of this 'QuantizedReshape' operation. + pub fn output_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_max' output of this 'QuantizedReshape' operation. + pub fn output_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedReshapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedReshape::new().build(tensor, shape, input_min, input_max, scope)`. -pub fn quantized_reshape< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - tensor: O0, - shape: O1, - input_min: O2, - input_max: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_reshape, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(tensor: O0, shape: O1, input_min: O2, input_max: O3, scope: &mut crate::Scope) -> crate::Result { QuantizedReshape::new().build(tensor, shape, input_min, input_max, scope) } + /// Builder for the `QuantizedResizeBilinear` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QuantizedResizeBilinear { @@ -76882,6 +92642,12 @@ pub struct QuantizedResizeBilinear { half_pixel_centers: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QuantizedResizeBilinear' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QuantizedResizeBilinearInst { + /// An instance of a fully built QuantizedResizeBilinear Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QuantizedResizeBilinear { /// Creates a new `QuantizedResizeBilinear`. @@ -76902,10 +92668,7 @@ impl QuantizedResizeBilinear { } /// Sets the `half_pixel_centers` attribute. - pub fn half_pixel_centers>( - mut self, - value: ArgType, - ) -> Self { + pub fn half_pixel_centers>(mut self, value: ArgType) -> Self { self.half_pixel_centers = ::std::option::Option::Some(value.into()); self } @@ -76917,30 +92680,10 @@ impl QuantizedResizeBilinear { } /// Builds the `QuantizedResizeBilinear` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - images: O0, - size: O1, - min: O2, - max: O3, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, images: O0, size: O1, min: O2, max: O3, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), size.into(), min.into(), max.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - size: crate::Output, - min: crate::Output, - max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, size: crate::Output, min: crate::Output, max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QuantizedResizeBilinear", |nd| { nd.add_input(images); nd.add_input(size); @@ -76949,41 +92692,91 @@ impl QuantizedResizeBilinear { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align_corners { - nd.set_attr_bool("align_corners", *value)?; - } - if let ::std::option::Option::Some(value) = &self.half_pixel_centers { - nd.set_attr_bool("half_pixel_centers", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QuantizedResizeBilinear` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, images: O0, size: O1, min: O2, max: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), size.into(), min.into(), max.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, size: crate::Output, min: crate::Output, max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QuantizedResizeBilinear", |nd| { + nd.add_input(images); + nd.add_input(size); + nd.add_input(min); + nd.add_input(max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QuantizedResizeBilinearInst{op}) + } +} +impl QuantizedResizeBilinearInst { + /// Returns the 'resized_images' output of this 'QuantizedResizeBilinear' operation. + pub fn resized_images(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'out_min' output of this 'QuantizedResizeBilinear' operation. + pub fn out_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'out_max' output of this 'QuantizedResizeBilinear' operation. + pub fn out_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for QuantizedResizeBilinearInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QuantizedResizeBilinear::new().build(images, size, min, max, scope)`. -pub fn quantized_resize_bilinear< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - images: O0, - size: O1, - min: O2, - max: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn quantized_resize_bilinear, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(images: O0, size: O1, min: O2, max: O3, scope: &mut crate::Scope) -> crate::Result { QuantizedResizeBilinear::new().build(images, size, min, max, scope) } + /// Builder for the `QueueClose` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueClose { cancel_pending_enqueues: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueClose' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueCloseInst { + /// An instance of a fully built QueueClose Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueClose { /// Creates a new `QueueClose`. @@ -76992,10 +92785,7 @@ impl QueueClose { } /// Sets the `cancel_pending_enqueues` attribute. - pub fn cancel_pending_enqueues>( - mut self, - value: ArgType, - ) -> Self { + pub fn cancel_pending_enqueues>(mut self, value: ArgType) -> Self { self.cancel_pending_enqueues = ::std::option::Option::Some(value.into()); self } @@ -77007,45 +92797,64 @@ impl QueueClose { } /// Builds the `QueueClose` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueClose", |nd| { nd.add_input(handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.cancel_pending_enqueues { - nd.set_attr_bool("cancel_pending_enqueues", *value)?; - } + if let ::std::option::Option::Some(value) = &self.cancel_pending_enqueues { + nd.set_attr_bool("cancel_pending_enqueues", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueClose` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueClose", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.cancel_pending_enqueues { + nd.set_attr_bool("cancel_pending_enqueues", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueCloseInst{op}) + } +} +impl QueueCloseInst { +} +impl Into for QueueCloseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueClose::new().build(handle, scope)`. -pub fn queue_close>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_close>(handle: O0, scope: &mut crate::Scope) -> crate::Result { QueueClose::new().build(handle, scope) } + /// Builder for the `QueueCloseV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueCloseV2 { cancel_pending_enqueues: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueCloseV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueCloseV2Inst { + /// An instance of a fully built QueueCloseV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueCloseV2 { /// Creates a new `QueueCloseV2`. @@ -77054,10 +92863,7 @@ impl QueueCloseV2 { } /// Sets the `cancel_pending_enqueues` attribute. - pub fn cancel_pending_enqueues>( - mut self, - value: ArgType, - ) -> Self { + pub fn cancel_pending_enqueues>(mut self, value: ArgType) -> Self { self.cancel_pending_enqueues = ::std::option::Option::Some(value.into()); self } @@ -77069,39 +92875,52 @@ impl QueueCloseV2 { } /// Builds the `QueueCloseV2` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueCloseV2", |nd| { nd.add_input(handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.cancel_pending_enqueues { - nd.set_attr_bool("cancel_pending_enqueues", *value)?; - } + if let ::std::option::Option::Some(value) = &self.cancel_pending_enqueues { + nd.set_attr_bool("cancel_pending_enqueues", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueCloseV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueCloseV2", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.cancel_pending_enqueues { + nd.set_attr_bool("cancel_pending_enqueues", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueCloseV2Inst{op}) + } +} +impl QueueCloseV2Inst { +} +impl Into for QueueCloseV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueCloseV2::new().build(handle, scope)`. -pub fn queue_close_v2>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_close_v2>(handle: O0, scope: &mut crate::Scope) -> crate::Result { QueueCloseV2::new().build(handle, scope) } + /// Builder for the `QueueDequeue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueDequeue { @@ -77109,6 +92928,12 @@ pub struct QueueDequeue { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueDequeue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueDequeueInst { + /// An instance of a fully built QueueDequeue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueDequeue { /// Creates a new `QueueDequeue`. @@ -77117,10 +92942,7 @@ impl QueueDequeue { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } @@ -77138,42 +92960,65 @@ impl QueueDequeue { } /// Builds the `QueueDequeue` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueDequeue", |nd| { nd.add_input(handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueDequeue` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueDequeue", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueDequeueInst{op}) + } +} +impl QueueDequeueInst { + /// Returns the 'components' output of this 'QueueDequeue' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QueueDequeueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueDequeue::new().build(handle, scope)`. -pub fn queue_dequeue>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_dequeue>(handle: O0, scope: &mut crate::Scope) -> crate::Result { QueueDequeue::new().build(handle, scope) } + /// Builder for the `QueueDequeueMany` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueDequeueMany { @@ -77181,6 +93026,12 @@ pub struct QueueDequeueMany { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueDequeueMany' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueDequeueManyInst { + /// An instance of a fully built QueueDequeueMany Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueDequeueMany { /// Creates a new `QueueDequeueMany`. @@ -77189,10 +93040,7 @@ impl QueueDequeueMany { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } @@ -77210,52 +93058,67 @@ impl QueueDequeueMany { } /// Builds the `QueueDequeueMany` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - n: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), n.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - n: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, n: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueDequeueMany", |nd| { nd.add_input(handle); nd.add_input(n); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueDequeueMany` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), n.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, n: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueDequeueMany", |nd| { + nd.add_input(handle); + nd.add_input(n); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueDequeueManyInst{op}) + } +} +impl QueueDequeueManyInst { + /// Returns the 'components' output of this 'QueueDequeueMany' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QueueDequeueManyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueDequeueMany::new().build(handle, n, scope)`. -pub fn queue_dequeue_many< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - n: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_dequeue_many, O1: ::std::convert::Into>(handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { QueueDequeueMany::new().build(handle, n, scope) } + /// Builder for the `QueueDequeueManyV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueDequeueManyV2 { @@ -77263,6 +93126,12 @@ pub struct QueueDequeueManyV2 { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueDequeueManyV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueDequeueManyV2Inst { + /// An instance of a fully built QueueDequeueManyV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueDequeueManyV2 { /// Creates a new `QueueDequeueManyV2`. @@ -77271,10 +93140,7 @@ impl QueueDequeueManyV2 { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } @@ -77292,52 +93158,67 @@ impl QueueDequeueManyV2 { } /// Builds the `QueueDequeueManyV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - n: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), n.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - n: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, n: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueDequeueManyV2", |nd| { nd.add_input(handle); nd.add_input(n); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueDequeueManyV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), n.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, n: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueDequeueManyV2", |nd| { + nd.add_input(handle); + nd.add_input(n); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueDequeueManyV2Inst{op}) + } +} +impl QueueDequeueManyV2Inst { + /// Returns the 'components' output of this 'QueueDequeueManyV2' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QueueDequeueManyV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueDequeueManyV2::new().build(handle, n, scope)`. -pub fn queue_dequeue_many_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - n: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_dequeue_many_v2, O1: ::std::convert::Into>(handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { QueueDequeueManyV2::new().build(handle, n, scope) } + /// Builder for the `QueueDequeueUpTo` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueDequeueUpTo { @@ -77345,6 +93226,12 @@ pub struct QueueDequeueUpTo { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueDequeueUpTo' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueDequeueUpToInst { + /// An instance of a fully built QueueDequeueUpTo Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueDequeueUpTo { /// Creates a new `QueueDequeueUpTo`. @@ -77353,10 +93240,7 @@ impl QueueDequeueUpTo { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } @@ -77374,52 +93258,67 @@ impl QueueDequeueUpTo { } /// Builds the `QueueDequeueUpTo` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - n: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), n.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - n: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, n: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueDequeueUpTo", |nd| { nd.add_input(handle); nd.add_input(n); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueDequeueUpTo` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), n.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, n: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueDequeueUpTo", |nd| { + nd.add_input(handle); + nd.add_input(n); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueDequeueUpToInst{op}) + } +} +impl QueueDequeueUpToInst { + /// Returns the 'components' output of this 'QueueDequeueUpTo' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QueueDequeueUpToInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueDequeueUpTo::new().build(handle, n, scope)`. -pub fn queue_dequeue_up_to< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - n: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_dequeue_up_to, O1: ::std::convert::Into>(handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { QueueDequeueUpTo::new().build(handle, n, scope) } + /// Builder for the `QueueDequeueUpToV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueDequeueUpToV2 { @@ -77427,6 +93326,12 @@ pub struct QueueDequeueUpToV2 { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueDequeueUpToV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueDequeueUpToV2Inst { + /// An instance of a fully built QueueDequeueUpToV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueDequeueUpToV2 { /// Creates a new `QueueDequeueUpToV2`. @@ -77435,10 +93340,7 @@ impl QueueDequeueUpToV2 { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } @@ -77456,52 +93358,67 @@ impl QueueDequeueUpToV2 { } /// Builds the `QueueDequeueUpToV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - n: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), n.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - n: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, n: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueDequeueUpToV2", |nd| { nd.add_input(handle); nd.add_input(n); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueDequeueUpToV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), n.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, n: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueDequeueUpToV2", |nd| { + nd.add_input(handle); + nd.add_input(n); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueDequeueUpToV2Inst{op}) + } +} +impl QueueDequeueUpToV2Inst { + /// Returns the 'components' output of this 'QueueDequeueUpToV2' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QueueDequeueUpToV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueDequeueUpToV2::new().build(handle, n, scope)`. -pub fn queue_dequeue_up_to_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - n: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_dequeue_up_to_v2, O1: ::std::convert::Into>(handle: O0, n: O1, scope: &mut crate::Scope) -> crate::Result { QueueDequeueUpToV2::new().build(handle, n, scope) } + /// Builder for the `QueueDequeueV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueDequeueV2 { @@ -77509,6 +93426,12 @@ pub struct QueueDequeueV2 { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueDequeueV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueDequeueV2Inst { + /// An instance of a fully built QueueDequeueV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueDequeueV2 { /// Creates a new `QueueDequeueV2`. @@ -77517,10 +93440,7 @@ impl QueueDequeueV2 { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } @@ -77538,42 +93458,65 @@ impl QueueDequeueV2 { } /// Builds the `QueueDequeueV2` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueDequeueV2", |nd| { nd.add_input(handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueDequeueV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueDequeueV2", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueDequeueV2Inst{op}) + } +} +impl QueueDequeueV2Inst { + /// Returns the 'components' output of this 'QueueDequeueV2' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QueueDequeueV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueDequeueV2::new().build(handle, scope)`. -pub fn queue_dequeue_v2>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_dequeue_v2>(handle: O0, scope: &mut crate::Scope) -> crate::Result { QueueDequeueV2::new().build(handle, scope) } + /// Builder for the `QueueEnqueue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueEnqueue { @@ -77581,6 +93524,12 @@ pub struct QueueEnqueue { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueEnqueue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueEnqueueInst { + /// An instance of a fully built QueueEnqueue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueEnqueue { /// Creates a new `QueueEnqueue`. @@ -77589,10 +93538,7 @@ impl QueueEnqueue { } /// Sets the `Tcomponents` attribute. - pub fn Tcomponents>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomponents>>(mut self, value: ArgType) -> Self { self.Tcomponents = ::std::option::Option::Some(value.into()); self } @@ -77610,52 +93556,60 @@ impl QueueEnqueue { } /// Builds the `QueueEnqueue` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - components: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), components.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - components: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueEnqueue", |nd| { nd.add_input(handle); nd.add_input(components); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomponents { - nd.set_attr_type_list("Tcomponents", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueEnqueue` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), components.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueEnqueue", |nd| { + nd.add_input(handle); + nd.add_input(components); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueEnqueueInst{op}) + } +} +impl QueueEnqueueInst { +} +impl Into for QueueEnqueueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueEnqueue::new().build(handle, components, scope)`. -pub fn queue_enqueue< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - components: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_enqueue, O1: ::std::convert::Into>(handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { QueueEnqueue::new().build(handle, components, scope) } + /// Builder for the `QueueEnqueueMany` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueEnqueueMany { @@ -77663,6 +93617,12 @@ pub struct QueueEnqueueMany { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueEnqueueMany' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueEnqueueManyInst { + /// An instance of a fully built QueueEnqueueMany Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueEnqueueMany { /// Creates a new `QueueEnqueueMany`. @@ -77671,10 +93631,7 @@ impl QueueEnqueueMany { } /// Sets the `Tcomponents` attribute. - pub fn Tcomponents>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomponents>>(mut self, value: ArgType) -> Self { self.Tcomponents = ::std::option::Option::Some(value.into()); self } @@ -77692,52 +93649,60 @@ impl QueueEnqueueMany { } /// Builds the `QueueEnqueueMany` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - components: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), components.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - components: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueEnqueueMany", |nd| { nd.add_input(handle); nd.add_input(components); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomponents { - nd.set_attr_type_list("Tcomponents", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueEnqueueMany` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), components.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueEnqueueMany", |nd| { + nd.add_input(handle); + nd.add_input(components); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueEnqueueManyInst{op}) + } +} +impl QueueEnqueueManyInst { +} +impl Into for QueueEnqueueManyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueEnqueueMany::new().build(handle, components, scope)`. -pub fn queue_enqueue_many< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - components: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_enqueue_many, O1: ::std::convert::Into>(handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { QueueEnqueueMany::new().build(handle, components, scope) } + /// Builder for the `QueueEnqueueManyV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueEnqueueManyV2 { @@ -77745,6 +93710,12 @@ pub struct QueueEnqueueManyV2 { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueEnqueueManyV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueEnqueueManyV2Inst { + /// An instance of a fully built QueueEnqueueManyV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueEnqueueManyV2 { /// Creates a new `QueueEnqueueManyV2`. @@ -77753,10 +93724,7 @@ impl QueueEnqueueManyV2 { } /// Sets the `Tcomponents` attribute. - pub fn Tcomponents>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomponents>>(mut self, value: ArgType) -> Self { self.Tcomponents = ::std::option::Option::Some(value.into()); self } @@ -77774,52 +93742,60 @@ impl QueueEnqueueManyV2 { } /// Builds the `QueueEnqueueManyV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - components: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), components.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - components: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueEnqueueManyV2", |nd| { nd.add_input(handle); nd.add_input(components); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomponents { - nd.set_attr_type_list("Tcomponents", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueEnqueueManyV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), components.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueEnqueueManyV2", |nd| { + nd.add_input(handle); + nd.add_input(components); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueEnqueueManyV2Inst{op}) + } +} +impl QueueEnqueueManyV2Inst { +} +impl Into for QueueEnqueueManyV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueEnqueueManyV2::new().build(handle, components, scope)`. -pub fn queue_enqueue_many_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - components: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_enqueue_many_v2, O1: ::std::convert::Into>(handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { QueueEnqueueManyV2::new().build(handle, components, scope) } + /// Builder for the `QueueEnqueueV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueEnqueueV2 { @@ -77827,6 +93803,12 @@ pub struct QueueEnqueueV2 { timeout_ms: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueEnqueueV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueEnqueueV2Inst { + /// An instance of a fully built QueueEnqueueV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueEnqueueV2 { /// Creates a new `QueueEnqueueV2`. @@ -77835,10 +93817,7 @@ impl QueueEnqueueV2 { } /// Sets the `Tcomponents` attribute. - pub fn Tcomponents>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomponents>>(mut self, value: ArgType) -> Self { self.Tcomponents = ::std::option::Option::Some(value.into()); self } @@ -77856,57 +93835,71 @@ impl QueueEnqueueV2 { } /// Builds the `QueueEnqueueV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - components: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), components.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - components: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueEnqueueV2", |nd| { nd.add_input(handle); nd.add_input(components); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomponents { - nd.set_attr_type_list("Tcomponents", value)?; - } - if let ::std::option::Option::Some(value) = &self.timeout_ms { - nd.set_attr_int("timeout_ms", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueEnqueueV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), components.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueEnqueueV2", |nd| { + nd.add_input(handle); + nd.add_input(components); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomponents { + nd.set_attr_type_list("Tcomponents", value)?; + } + if let ::std::option::Option::Some(value) = &self.timeout_ms { + nd.set_attr_int("timeout_ms", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueEnqueueV2Inst{op}) + } +} +impl QueueEnqueueV2Inst { +} +impl Into for QueueEnqueueV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueEnqueueV2::new().build(handle, components, scope)`. -pub fn queue_enqueue_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - components: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_enqueue_v2, O1: ::std::convert::Into>(handle: O0, components: O1, scope: &mut crate::Scope) -> crate::Result { QueueEnqueueV2::new().build(handle, components, scope) } + /// Builder for the `QueueIsClosed` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueIsClosed { control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueIsClosed' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueIsClosedInst { + /// An instance of a fully built QueueIsClosed Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueIsClosed { /// Creates a new `QueueIsClosed`. @@ -77921,19 +93914,10 @@ impl QueueIsClosed { } /// Builds the `QueueIsClosed` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueIsClosed", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -77942,20 +93926,52 @@ impl QueueIsClosed { ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueIsClosed` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueIsClosed", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueIsClosedInst{op}) + } +} +impl QueueIsClosedInst { + /// Returns the 'is_closed' output of this 'QueueIsClosed' operation. + pub fn is_closed(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QueueIsClosedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueIsClosed::new().build(handle, scope)`. -pub fn queue_is_closed>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_is_closed>(handle: O0, scope: &mut crate::Scope) -> crate::Result { QueueIsClosed::new().build(handle, scope) } + /// Builder for the `QueueIsClosedV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueIsClosedV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueIsClosedV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueIsClosedV2Inst { + /// An instance of a fully built QueueIsClosedV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueIsClosedV2 { /// Creates a new `QueueIsClosedV2`. @@ -77970,19 +93986,10 @@ impl QueueIsClosedV2 { } /// Builds the `QueueIsClosedV2` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueIsClosedV2", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -77991,20 +93998,52 @@ impl QueueIsClosedV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueIsClosedV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueIsClosedV2", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueIsClosedV2Inst{op}) + } +} +impl QueueIsClosedV2Inst { + /// Returns the 'is_closed' output of this 'QueueIsClosedV2' operation. + pub fn is_closed(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QueueIsClosedV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueIsClosedV2::new().build(handle, scope)`. -pub fn queue_is_closed_v2>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_is_closed_v2>(handle: O0, scope: &mut crate::Scope) -> crate::Result { QueueIsClosedV2::new().build(handle, scope) } + /// Builder for the `QueueSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueSize { control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueSizeInst { + /// An instance of a fully built QueueSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueSize { /// Creates a new `QueueSize`. @@ -78019,19 +94058,10 @@ impl QueueSize { } /// Builds the `QueueSize` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueSize", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -78040,20 +94070,52 @@ impl QueueSize { ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueSize", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueSizeInst{op}) + } +} +impl QueueSizeInst { + /// Returns the 'size' output of this 'QueueSize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QueueSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueSize::new().build(handle, scope)`. -pub fn queue_size>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_size>(handle: O0, scope: &mut crate::Scope) -> crate::Result { QueueSize::new().build(handle, scope) } + /// Builder for the `QueueSizeV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct QueueSizeV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'QueueSizeV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct QueueSizeV2Inst { + /// An instance of a fully built QueueSizeV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl QueueSizeV2 { /// Creates a new `QueueSizeV2`. @@ -78068,19 +94130,10 @@ impl QueueSizeV2 { } /// Builds the `QueueSizeV2` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("QueueSizeV2", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -78089,15 +94142,41 @@ impl QueueSizeV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `QueueSizeV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("QueueSizeV2", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(QueueSizeV2Inst{op}) + } +} +impl QueueSizeV2Inst { + /// Returns the 'size' output of this 'QueueSizeV2' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for QueueSizeV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `QueueSizeV2::new().build(handle, scope)`. -pub fn queue_size_v2>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn queue_size_v2>(handle: O0, scope: &mut crate::Scope) -> crate::Result { QueueSizeV2::new().build(handle, scope) } + /// Builder for the `RFFT` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RFFT { @@ -78105,6 +94184,12 @@ pub struct RFFT { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RFFT' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RFFTInst { + /// An instance of a fully built RFFT Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RFFT { /// Creates a new `RFFT`. @@ -78119,10 +94204,7 @@ impl RFFT { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -78134,49 +94216,67 @@ impl RFFT { } /// Builds the `RFFT` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - fft_length: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), fft_length.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - fft_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RFFT", |nd| { nd.add_input(input); nd.add_input(fft_length); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Treal { - nd.set_attr_type("Treal", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RFFT` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), fft_length.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RFFT", |nd| { + nd.add_input(input); + nd.add_input(fft_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RFFTInst{op}) + } +} +impl RFFTInst { + /// Returns the 'output' output of this 'RFFT' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RFFTInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RFFT::new().build(input, fft_length, scope)`. -pub fn rfft, O1: ::std::convert::Into>( - input: O0, - fft_length: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rfft, O1: ::std::convert::Into>(input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { RFFT::new().build(input, fft_length, scope) } + /// Builder for the `RFFT2D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RFFT2D { @@ -78184,6 +94284,12 @@ pub struct RFFT2D { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RFFT2D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RFFT2DInst { + /// An instance of a fully built RFFT2D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RFFT2D { /// Creates a new `RFFT2D`. @@ -78198,10 +94304,7 @@ impl RFFT2D { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -78213,49 +94316,67 @@ impl RFFT2D { } /// Builds the `RFFT2D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - fft_length: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), fft_length.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - fft_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RFFT2D", |nd| { nd.add_input(input); nd.add_input(fft_length); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Treal { - nd.set_attr_type("Treal", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RFFT2D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), fft_length.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RFFT2D", |nd| { + nd.add_input(input); + nd.add_input(fft_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RFFT2DInst{op}) + } +} +impl RFFT2DInst { + /// Returns the 'output' output of this 'RFFT2D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RFFT2DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RFFT2D::new().build(input, fft_length, scope)`. -pub fn rfft2_d, O1: ::std::convert::Into>( - input: O0, - fft_length: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rfft2_d, O1: ::std::convert::Into>(input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { RFFT2D::new().build(input, fft_length, scope) } + /// Builder for the `RFFT3D` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RFFT3D { @@ -78263,6 +94384,12 @@ pub struct RFFT3D { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RFFT3D' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RFFT3DInst { + /// An instance of a fully built RFFT3D Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RFFT3D { /// Creates a new `RFFT3D`. @@ -78277,10 +94404,7 @@ impl RFFT3D { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -78292,55 +94416,79 @@ impl RFFT3D { } /// Builds the `RFFT3D` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - fft_length: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), fft_length.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - fft_length: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RFFT3D", |nd| { nd.add_input(input); nd.add_input(fft_length); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Treal { - nd.set_attr_type("Treal", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RFFT3D` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), fft_length.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, fft_length: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RFFT3D", |nd| { + nd.add_input(input); + nd.add_input(fft_length); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RFFT3DInst{op}) + } +} +impl RFFT3DInst { + /// Returns the 'output' output of this 'RFFT3D' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RFFT3DInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RFFT3D::new().build(input, fft_length, scope)`. -pub fn rfft3_d, O1: ::std::convert::Into>( - input: O0, - fft_length: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rfft3_d, O1: ::std::convert::Into>(input: O0, fft_length: O1, scope: &mut crate::Scope) -> crate::Result { RFFT3D::new().build(input, fft_length, scope) } + /// Builder for the `RGBToHSV` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RGBToHSV { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RGBToHSV' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RGBToHSVInst { + /// An instance of a fully built RGBToHSV Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RGBToHSV { /// Creates a new `RGBToHSV`. @@ -78361,39 +94509,59 @@ impl RGBToHSV { } /// Builds the `RGBToHSV` operation. - pub fn build>( - &self, - images: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, images: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RGBToHSV", |nd| { nd.add_input(images); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RGBToHSV` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, images: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RGBToHSV", |nd| { + nd.add_input(images); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RGBToHSVInst{op}) + } +} +impl RGBToHSVInst { + /// Returns the 'output' output of this 'RGBToHSV' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RGBToHSVInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RGBToHSV::new().build(images, scope)`. -pub fn rgbto_hsv>( - images: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rgbto_hsv>(images: O0, scope: &mut crate::Scope) -> crate::Result { RGBToHSV::new().build(images, scope) } + /// Builder for the `RaggedBincount` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RaggedBincount { @@ -78402,6 +94570,12 @@ pub struct RaggedBincount { binary_output: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RaggedBincount' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RaggedBincountInst { + /// An instance of a fully built RaggedBincount Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RaggedBincount { /// Creates a new `RaggedBincount`. @@ -78434,36 +94608,10 @@ impl RaggedBincount { } /// Builds the `RaggedBincount` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - splits: O0, - values: O1, - size: O2, - weights: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - splits.into(), - values.into(), - size.into(), - weights.into(), - scope, - ) - } - - fn build_impl( - &self, - splits: crate::Output, - values: crate::Output, - size: crate::Output, - weights: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, splits: O0, values: O1, size: O2, weights: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(splits.into(), values.into(), size.into(), weights.into(), scope) + } + fn build_impl(&self, splits: crate::Output, values: crate::Output, size: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RaggedBincount", |nd| { nd.add_input(splits); nd.add_input(values); @@ -78472,35 +94620,65 @@ impl RaggedBincount { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.binary_output { - nd.set_attr_bool("binary_output", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RaggedBincount` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, splits: O0, values: O1, size: O2, weights: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(splits.into(), values.into(), size.into(), weights.into(), scope) + } + fn build_instance_impl(&self, splits: crate::Output, values: crate::Output, size: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RaggedBincount", |nd| { + nd.add_input(splits); + nd.add_input(values); + nd.add_input(size); + nd.add_input(weights); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RaggedBincountInst{op}) + } +} +impl RaggedBincountInst { + /// Returns the 'output' output of this 'RaggedBincount' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RaggedBincountInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RaggedBincount::new().build(splits, values, size, weights, scope)`. -pub fn ragged_bincount< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - splits: O0, - values: O1, - size: O2, - weights: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ragged_bincount, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(splits: O0, values: O1, size: O2, weights: O3, scope: &mut crate::Scope) -> crate::Result { RaggedBincount::new().build(splits, values, size, weights, scope) } + /// Builder for the `RaggedCountSparseOutput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RaggedCountSparseOutput { @@ -78511,6 +94689,12 @@ pub struct RaggedCountSparseOutput { output_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RaggedCountSparseOutput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RaggedCountSparseOutputInst { + /// An instance of a fully built RaggedCountSparseOutput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RaggedCountSparseOutput { /// Creates a new `RaggedCountSparseOutput`. @@ -78543,10 +94727,7 @@ impl RaggedCountSparseOutput { } /// Sets the `output_type` attribute. - pub fn output_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_type>(mut self, value: ArgType) -> Self { self.output_type = ::std::option::Option::Some(value.into()); self } @@ -78558,27 +94739,10 @@ impl RaggedCountSparseOutput { } /// Builds the `RaggedCountSparseOutput` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - splits: O0, - values: O1, - weights: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, splits: O0, values: O1, weights: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(splits.into(), values.into(), weights.into(), scope) } - - fn build_impl( - &self, - splits: crate::Output, - values: crate::Output, - weights: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, splits: crate::Output, values: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RaggedCountSparseOutput", |nd| { nd.add_input(splits); nd.add_input(values); @@ -78586,39 +94750,90 @@ impl RaggedCountSparseOutput { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.minlength { - nd.set_attr_int("minlength", *value)?; - } - if let ::std::option::Option::Some(value) = &self.maxlength { - nd.set_attr_int("maxlength", *value)?; - } - if let ::std::option::Option::Some(value) = &self.binary_output { - nd.set_attr_bool("binary_output", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_type { - nd.set_attr_type("output_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.minlength { + nd.set_attr_int("minlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.maxlength { + nd.set_attr_int("maxlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RaggedCountSparseOutput` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, splits: O0, values: O1, weights: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(splits.into(), values.into(), weights.into(), scope) + } + fn build_instance_impl(&self, splits: crate::Output, values: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RaggedCountSparseOutput", |nd| { + nd.add_input(splits); + nd.add_input(values); + nd.add_input(weights); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.minlength { + nd.set_attr_int("minlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.maxlength { + nd.set_attr_int("maxlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RaggedCountSparseOutputInst{op}) + } +} +impl RaggedCountSparseOutputInst { + /// Returns the 'output_indices' output of this 'RaggedCountSparseOutput' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'RaggedCountSparseOutput' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_dense_shape' output of this 'RaggedCountSparseOutput' operation. + pub fn output_dense_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for RaggedCountSparseOutputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RaggedCountSparseOutput::new().build(splits, values, weights, scope)`. -pub fn ragged_count_sparse_output< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - splits: O0, - values: O1, - weights: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ragged_count_sparse_output, O1: ::std::convert::Into, O2: ::std::convert::Into>(splits: O0, values: O1, weights: O2, scope: &mut crate::Scope) -> crate::Result { RaggedCountSparseOutput::new().build(splits, values, weights, scope) } + /// Builder for the `RaggedCross` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RaggedCross { @@ -78635,6 +94850,12 @@ pub struct RaggedCross { out_row_splits_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RaggedCross' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RaggedCrossInst { + /// An instance of a fully built RaggedCross Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RaggedCross { /// Creates a new `RaggedCross`. @@ -78649,10 +94870,7 @@ impl RaggedCross { } /// Sets the `input_order` attribute. - pub fn input_order>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_order>(mut self, value: ArgType) -> Self { self.input_order = ::std::option::Option::Some(value.into()); self } @@ -78676,55 +94894,37 @@ impl RaggedCross { } /// Sets the `ragged_values_types` attribute. - pub fn ragged_values_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ragged_values_types>>(mut self, value: ArgType) -> Self { self.ragged_values_types = ::std::option::Option::Some(value.into()); self } /// Sets the `ragged_splits_types` attribute. - pub fn ragged_splits_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ragged_splits_types>>(mut self, value: ArgType) -> Self { self.ragged_splits_types = ::std::option::Option::Some(value.into()); self } /// Sets the `sparse_values_types` attribute. - pub fn sparse_values_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_values_types>>(mut self, value: ArgType) -> Self { self.sparse_values_types = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_types` attribute. - pub fn dense_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_types>>(mut self, value: ArgType) -> Self { self.dense_types = ::std::option::Option::Some(value.into()); self } /// Sets the `out_values_type` attribute. - pub fn out_values_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_values_type>(mut self, value: ArgType) -> Self { self.out_values_type = ::std::option::Option::Some(value.into()); self } /// Sets the `out_row_splits_type` attribute. - pub fn out_row_splits_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_row_splits_type>(mut self, value: ArgType) -> Self { self.out_row_splits_type = ::std::option::Option::Some(value.into()); self } @@ -78736,44 +94936,10 @@ impl RaggedCross { } /// Builds the `RaggedCross` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - ragged_values: O0, - ragged_row_splits: O1, - sparse_indices: O2, - sparse_values: O3, - sparse_shape: O4, - dense_inputs: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - ragged_values.into(), - ragged_row_splits.into(), - sparse_indices.into(), - sparse_values.into(), - sparse_shape.into(), - dense_inputs.into(), - scope, - ) - } - - fn build_impl( - &self, - ragged_values: crate::Output, - ragged_row_splits: crate::Output, - sparse_indices: crate::Output, - sparse_values: crate::Output, - sparse_shape: crate::Output, - dense_inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, ragged_values: O0, ragged_row_splits: O1, sparse_indices: O2, sparse_values: O3, sparse_shape: O4, dense_inputs: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(ragged_values.into(), ragged_row_splits.into(), sparse_indices.into(), sparse_values.into(), sparse_shape.into(), dense_inputs.into(), scope) + } + fn build_impl(&self, ragged_values: crate::Output, ragged_row_splits: crate::Output, sparse_indices: crate::Output, sparse_values: crate::Output, sparse_shape: crate::Output, dense_inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RaggedCross", |nd| { nd.add_input(ragged_values); nd.add_input(ragged_row_splits); @@ -78784,71 +94950,122 @@ impl RaggedCross { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Nsparse { - nd.set_attr_int("Nsparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.input_order { - nd.set_attr_string("input_order", value)?; - } - if let ::std::option::Option::Some(value) = &self.hashed_output { - nd.set_attr_bool("hashed_output", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_buckets { - nd.set_attr_int("num_buckets", *value)?; - } - if let ::std::option::Option::Some(value) = &self.hash_key { - nd.set_attr_int("hash_key", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ragged_values_types { - nd.set_attr_type_list("ragged_values_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.ragged_splits_types { - nd.set_attr_type_list("ragged_splits_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_values_types { - nd.set_attr_type_list("sparse_values_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_types { - nd.set_attr_type_list("dense_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.out_values_type { - nd.set_attr_type("out_values_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_row_splits_type { - nd.set_attr_type("out_row_splits_type", *value)?; + if let ::std::option::Option::Some(value) = &self.Nsparse { + nd.set_attr_int("Nsparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_order { + nd.set_attr_string("input_order", value)?; + } + if let ::std::option::Option::Some(value) = &self.hashed_output { + nd.set_attr_bool("hashed_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hash_key { + nd.set_attr_int("hash_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_values_types { + nd.set_attr_type_list("ragged_values_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_splits_types { + nd.set_attr_type_list("ragged_splits_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_values_types { + nd.set_attr_type_list("sparse_values_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_types { + nd.set_attr_type_list("dense_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.out_values_type { + nd.set_attr_type("out_values_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_row_splits_type { + nd.set_attr_type("out_row_splits_type", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `RaggedCross` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, ragged_values: O0, ragged_row_splits: O1, sparse_indices: O2, sparse_values: O3, sparse_shape: O4, dense_inputs: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ragged_values.into(), ragged_row_splits.into(), sparse_indices.into(), sparse_values.into(), sparse_shape.into(), dense_inputs.into(), scope) + } + fn build_instance_impl(&self, ragged_values: crate::Output, ragged_row_splits: crate::Output, sparse_indices: crate::Output, sparse_values: crate::Output, sparse_shape: crate::Output, dense_inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RaggedCross", |nd| { + nd.add_input(ragged_values); + nd.add_input(ragged_row_splits); + nd.add_input(sparse_indices); + nd.add_input(sparse_values); + nd.add_input(sparse_shape); + nd.add_input(dense_inputs); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.Nsparse { + nd.set_attr_int("Nsparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.input_order { + nd.set_attr_string("input_order", value)?; + } + if let ::std::option::Option::Some(value) = &self.hashed_output { + nd.set_attr_bool("hashed_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hash_key { + nd.set_attr_int("hash_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_values_types { + nd.set_attr_type_list("ragged_values_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.ragged_splits_types { + nd.set_attr_type_list("ragged_splits_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_values_types { + nd.set_attr_type_list("sparse_values_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_types { + nd.set_attr_type_list("dense_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.out_values_type { + nd.set_attr_type("out_values_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_row_splits_type { + nd.set_attr_type("out_row_splits_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RaggedCrossInst{op}) + } +} +impl RaggedCrossInst { + /// Returns the 'output_values' output of this 'RaggedCross' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_row_splits' output of this 'RaggedCross' operation. + pub fn output_row_splits(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for RaggedCrossInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `RaggedCross::new().build(ragged_values, ragged_row_splits, sparse_indices, sparse_values, sparse_shape, dense_inputs, scope)`. -pub fn ragged_cross< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - ragged_values: O0, - ragged_row_splits: O1, - sparse_indices: O2, - sparse_values: O3, - sparse_shape: O4, - dense_inputs: O5, - scope: &mut crate::Scope, -) -> crate::Result { - RaggedCross::new().build( - ragged_values, - ragged_row_splits, - sparse_indices, - sparse_values, - sparse_shape, - dense_inputs, - scope, - ) +pub fn ragged_cross, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(ragged_values: O0, ragged_row_splits: O1, sparse_indices: O2, sparse_values: O3, sparse_shape: O4, dense_inputs: O5, scope: &mut crate::Scope) -> crate::Result { + RaggedCross::new().build(ragged_values, ragged_row_splits, sparse_indices, sparse_values, sparse_shape, dense_inputs, scope) } + /// Builder for the `RaggedGather` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RaggedGather { @@ -78859,6 +95076,12 @@ pub struct RaggedGather { OUTPUT_RAGGED_RANK: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RaggedGather' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RaggedGatherInst { + /// An instance of a fully built RaggedGather Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RaggedGather { /// Creates a new `RaggedGather`. @@ -78867,46 +95090,31 @@ impl RaggedGather { } /// Sets the `Tvalues` attribute. - pub fn Tvalues>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tvalues>(mut self, value: ArgType) -> Self { self.Tvalues = ::std::option::Option::Some(value.into()); self } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } /// Sets the `Tsplits` attribute. - pub fn Tsplits>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsplits>(mut self, value: ArgType) -> Self { self.Tsplits = ::std::option::Option::Some(value.into()); self } /// Sets the `PARAMS_RAGGED_RANK` attribute. - pub fn PARAMS_RAGGED_RANK>( - mut self, - value: ArgType, - ) -> Self { + pub fn PARAMS_RAGGED_RANK>(mut self, value: ArgType) -> Self { self.PARAMS_RAGGED_RANK = ::std::option::Option::Some(value.into()); self } /// Sets the `OUTPUT_RAGGED_RANK` attribute. - pub fn OUTPUT_RAGGED_RANK>( - mut self, - value: ArgType, - ) -> Self { + pub fn OUTPUT_RAGGED_RANK>(mut self, value: ArgType) -> Self { self.OUTPUT_RAGGED_RANK = ::std::option::Option::Some(value.into()); self } @@ -78918,32 +95126,10 @@ impl RaggedGather { } /// Builds the `RaggedGather` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - params_nested_splits: O0, - params_dense_values: O1, - indices: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - params_nested_splits.into(), - params_dense_values.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - params_nested_splits: crate::Output, - params_dense_values: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, params_nested_splits: O0, params_dense_values: O1, indices: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(params_nested_splits.into(), params_dense_values.into(), indices.into(), scope) + } + fn build_impl(&self, params_nested_splits: crate::Output, params_dense_values: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RaggedGather", |nd| { nd.add_input(params_nested_splits); nd.add_input(params_dense_values); @@ -78951,39 +95137,89 @@ impl RaggedGather { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tvalues { - nd.set_attr_type("Tvalues", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsplits { - nd.set_attr_type("Tsplits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.PARAMS_RAGGED_RANK { - nd.set_attr_int("PARAMS_RAGGED_RANK", *value)?; - } - if let ::std::option::Option::Some(value) = &self.OUTPUT_RAGGED_RANK { - nd.set_attr_int("OUTPUT_RAGGED_RANK", *value)?; + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.PARAMS_RAGGED_RANK { + nd.set_attr_int("PARAMS_RAGGED_RANK", *value)?; + } + if let ::std::option::Option::Some(value) = &self.OUTPUT_RAGGED_RANK { + nd.set_attr_int("OUTPUT_RAGGED_RANK", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `RaggedGather` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, params_nested_splits: O0, params_dense_values: O1, indices: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(params_nested_splits.into(), params_dense_values.into(), indices.into(), scope) + } + fn build_instance_impl(&self, params_nested_splits: crate::Output, params_dense_values: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RaggedGather", |nd| { + nd.add_input(params_nested_splits); + nd.add_input(params_dense_values); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.PARAMS_RAGGED_RANK { + nd.set_attr_int("PARAMS_RAGGED_RANK", *value)?; + } + if let ::std::option::Option::Some(value) = &self.OUTPUT_RAGGED_RANK { + nd.set_attr_int("OUTPUT_RAGGED_RANK", *value)?; + } ::std::result::Result::Ok(()) + })?; + Ok(RaggedGatherInst{op}) + } +} +impl RaggedGatherInst { + /// Returns a Vector of Outputs for 'output_nested_splits' output of this RaggedGather operation. + pub fn output_nested_splits(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("OUTPUT_RAGGED_RANK")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'output_dense_values' output of this 'RaggedGather' operation. + pub fn output_dense_values(&self) -> crate::Result { + let dynamic_offset = (self.op.get_attr_int("OUTPUT_RAGGED_RANK")?+1) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset }) } } - +impl Into for RaggedGatherInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RaggedGather::new().build(params_nested_splits, params_dense_values, indices, scope)`. -pub fn ragged_gather< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - params_nested_splits: O0, - params_dense_values: O1, - indices: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ragged_gather, O1: ::std::convert::Into, O2: ::std::convert::Into>(params_nested_splits: O0, params_dense_values: O1, indices: O2, scope: &mut crate::Scope) -> crate::Result { RaggedGather::new().build(params_nested_splits, params_dense_values, indices, scope) } + /// Builder for the `RaggedRange` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RaggedRange { @@ -78991,6 +95227,12 @@ pub struct RaggedRange { Tsplits: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RaggedRange' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RaggedRangeInst { + /// An instance of a fully built RaggedRange Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RaggedRange { /// Creates a new `RaggedRange`. @@ -79005,10 +95247,7 @@ impl RaggedRange { } /// Sets the `Tsplits` attribute. - pub fn Tsplits>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsplits>(mut self, value: ArgType) -> Self { self.Tsplits = ::std::option::Option::Some(value.into()); self } @@ -79020,27 +95259,10 @@ impl RaggedRange { } /// Builds the `RaggedRange` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - starts: O0, - limits: O1, - deltas: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, starts: O0, limits: O1, deltas: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(starts.into(), limits.into(), deltas.into(), scope) } - - fn build_impl( - &self, - starts: crate::Output, - limits: crate::Output, - deltas: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, starts: crate::Output, limits: crate::Output, deltas: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RaggedRange", |nd| { nd.add_input(starts); nd.add_input(limits); @@ -79048,30 +95270,65 @@ impl RaggedRange { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsplits { - nd.set_attr_type("Tsplits", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RaggedRange` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, starts: O0, limits: O1, deltas: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(starts.into(), limits.into(), deltas.into(), scope) + } + fn build_instance_impl(&self, starts: crate::Output, limits: crate::Output, deltas: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RaggedRange", |nd| { + nd.add_input(starts); + nd.add_input(limits); + nd.add_input(deltas); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RaggedRangeInst{op}) + } +} +impl RaggedRangeInst { + /// Returns the 'rt_nested_splits' output of this 'RaggedRange' operation. + pub fn rt_nested_splits(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'rt_dense_values' output of this 'RaggedRange' operation. + pub fn rt_dense_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for RaggedRangeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RaggedRange::new().build(starts, limits, deltas, scope)`. -pub fn ragged_range< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - starts: O0, - limits: O1, - deltas: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ragged_range, O1: ::std::convert::Into, O2: ::std::convert::Into>(starts: O0, limits: O1, deltas: O2, scope: &mut crate::Scope) -> crate::Result { RaggedRange::new().build(starts, limits, deltas, scope) } + /// Builder for the `RaggedTensorFromVariant` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RaggedTensorFromVariant { @@ -79081,6 +95338,12 @@ pub struct RaggedTensorFromVariant { Tsplits: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RaggedTensorFromVariant' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RaggedTensorFromVariantInst { + /// An instance of a fully built RaggedTensorFromVariant Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RaggedTensorFromVariant { /// Creates a new `RaggedTensorFromVariant`. @@ -79095,28 +95358,19 @@ impl RaggedTensorFromVariant { } /// Sets the `output_ragged_rank` attribute. - pub fn output_ragged_rank>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_ragged_rank>(mut self, value: ArgType) -> Self { self.output_ragged_rank = ::std::option::Option::Some(value.into()); self } /// Sets the `Tvalues` attribute. - pub fn Tvalues>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tvalues>(mut self, value: ArgType) -> Self { self.Tvalues = ::std::option::Option::Some(value.into()); self } /// Sets the `Tsplits` attribute. - pub fn Tsplits>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsplits>(mut self, value: ArgType) -> Self { self.Tsplits = ::std::option::Option::Some(value.into()); self } @@ -79128,48 +95382,90 @@ impl RaggedTensorFromVariant { } /// Builds the `RaggedTensorFromVariant` operation. - pub fn build>( - &self, - encoded_ragged: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, encoded_ragged: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(encoded_ragged.into(), scope) } - - fn build_impl( - &self, - encoded_ragged: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, encoded_ragged: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RaggedTensorFromVariant", |nd| { nd.add_input(encoded_ragged); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.input_ragged_rank { - nd.set_attr_int("input_ragged_rank", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_ragged_rank { - nd.set_attr_int("output_ragged_rank", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tvalues { - nd.set_attr_type("Tvalues", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsplits { - nd.set_attr_type("Tsplits", *value)?; + if let ::std::option::Option::Some(value) = &self.input_ragged_rank { + nd.set_attr_int("input_ragged_rank", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_ragged_rank { + nd.set_attr_int("output_ragged_rank", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `RaggedTensorFromVariant` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, encoded_ragged: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(encoded_ragged.into(), scope) + } + fn build_instance_impl(&self, encoded_ragged: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RaggedTensorFromVariant", |nd| { + nd.add_input(encoded_ragged); + for op in &self.control_inputs { + nd.add_control_input(op); } + if let ::std::option::Option::Some(value) = &self.input_ragged_rank { + nd.set_attr_int("input_ragged_rank", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_ragged_rank { + nd.set_attr_int("output_ragged_rank", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } ::std::result::Result::Ok(()) + })?; + Ok(RaggedTensorFromVariantInst{op}) + } +} +impl RaggedTensorFromVariantInst { + /// Returns a Vector of Outputs for 'output_nested_splits' output of this RaggedTensorFromVariant operation. + pub fn output_nested_splits(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("output_ragged_rank")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns the 'output_dense_values' output of this 'RaggedTensorFromVariant' operation. + pub fn output_dense_values(&self) -> crate::Result { + let dynamic_offset = (self.op.get_attr_int("output_ragged_rank")?+1) as i32; + Ok(crate::Output { + operation: self.op.clone(), + index: dynamic_offset }) } } - +impl Into for RaggedTensorFromVariantInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RaggedTensorFromVariant::new().build(encoded_ragged, scope)`. -pub fn ragged_tensor_from_variant>( - encoded_ragged: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ragged_tensor_from_variant>(encoded_ragged: O0, scope: &mut crate::Scope) -> crate::Result { RaggedTensorFromVariant::new().build(encoded_ragged, scope) } + /// Builder for the `RaggedTensorToSparse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RaggedTensorToSparse { @@ -79178,6 +95474,12 @@ pub struct RaggedTensorToSparse { Tsplits: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RaggedTensorToSparse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RaggedTensorToSparseInst { + /// An instance of a fully built RaggedTensorToSparse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RaggedTensorToSparse { /// Creates a new `RaggedTensorToSparse`. @@ -79198,10 +95500,7 @@ impl RaggedTensorToSparse { } /// Sets the `Tsplits` attribute. - pub fn Tsplits>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsplits>(mut self, value: ArgType) -> Self { self.Tsplits = ::std::option::Option::Some(value.into()); self } @@ -79213,55 +95512,87 @@ impl RaggedTensorToSparse { } /// Builds the `RaggedTensorToSparse` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - rt_nested_splits: O0, - rt_dense_values: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, rt_nested_splits: O0, rt_dense_values: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(rt_nested_splits.into(), rt_dense_values.into(), scope) } - - fn build_impl( - &self, - rt_nested_splits: crate::Output, - rt_dense_values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, rt_nested_splits: crate::Output, rt_dense_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RaggedTensorToSparse", |nd| { nd.add_input(rt_nested_splits); nd.add_input(rt_dense_values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.RAGGED_RANK { - nd.set_attr_int("RAGGED_RANK", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsplits { - nd.set_attr_type("Tsplits", *value)?; - } + if let ::std::option::Option::Some(value) = &self.RAGGED_RANK { + nd.set_attr_int("RAGGED_RANK", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RaggedTensorToSparse` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, rt_nested_splits: O0, rt_dense_values: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(rt_nested_splits.into(), rt_dense_values.into(), scope) + } + fn build_instance_impl(&self, rt_nested_splits: crate::Output, rt_dense_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RaggedTensorToSparse", |nd| { + nd.add_input(rt_nested_splits); + nd.add_input(rt_dense_values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.RAGGED_RANK { + nd.set_attr_int("RAGGED_RANK", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RaggedTensorToSparseInst{op}) + } +} +impl RaggedTensorToSparseInst { + /// Returns the 'sparse_indices' output of this 'RaggedTensorToSparse' operation. + pub fn sparse_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'sparse_values' output of this 'RaggedTensorToSparse' operation. + pub fn sparse_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sparse_dense_shape' output of this 'RaggedTensorToSparse' operation. + pub fn sparse_dense_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for RaggedTensorToSparseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RaggedTensorToSparse::new().build(rt_nested_splits, rt_dense_values, scope)`. -pub fn ragged_tensor_to_sparse< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - rt_nested_splits: O0, - rt_dense_values: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ragged_tensor_to_sparse, O1: ::std::convert::Into>(rt_nested_splits: O0, rt_dense_values: O1, scope: &mut crate::Scope) -> crate::Result { RaggedTensorToSparse::new().build(rt_nested_splits, rt_dense_values, scope) } + /// Builder for the `RaggedTensorToTensor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RaggedTensorToTensor { @@ -79272,6 +95603,12 @@ pub struct RaggedTensorToTensor { row_partition_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RaggedTensorToTensor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RaggedTensorToTensorInst { + /// An instance of a fully built RaggedTensorToTensor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RaggedTensorToTensor { /// Creates a new `RaggedTensorToTensor`. @@ -79286,39 +95623,25 @@ impl RaggedTensorToTensor { } /// Sets the `Tindex` attribute. - pub fn Tindex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindex>(mut self, value: ArgType) -> Self { self.Tindex = ::std::option::Option::Some(value.into()); self } /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshape>(mut self, value: ArgType) -> Self { self.Tshape = ::std::option::Option::Some(value.into()); self } /// Sets the `num_row_partition_tensors` attribute. - pub fn num_row_partition_tensors>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_row_partition_tensors>(mut self, value: ArgType) -> Self { self.num_row_partition_tensors = ::std::option::Option::Some(value.into()); self } /// Sets the `row_partition_types` attribute. - pub fn row_partition_types< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn row_partition_types>>(mut self, value: ArgType) -> Self { self.row_partition_types = ::std::option::Option::Some(value.into()); self } @@ -79330,36 +95653,10 @@ impl RaggedTensorToTensor { } /// Builds the `RaggedTensorToTensor` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - shape: O0, - values: O1, - default_value: O2, - row_partition_tensors: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - shape.into(), - values.into(), - default_value.into(), - row_partition_tensors.into(), - scope, - ) - } - - fn build_impl( - &self, - shape: crate::Output, - values: crate::Output, - default_value: crate::Output, - row_partition_tensors: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, values: O1, default_value: O2, row_partition_tensors: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(shape.into(), values.into(), default_value.into(), row_partition_tensors.into(), scope) + } + fn build_impl(&self, shape: crate::Output, values: crate::Output, default_value: crate::Output, row_partition_tensors: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RaggedTensorToTensor", |nd| { nd.add_input(shape); nd.add_input(values); @@ -79368,41 +95665,77 @@ impl RaggedTensorToTensor { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindex { - nd.set_attr_type("Tindex", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_row_partition_tensors { - nd.set_attr_int("num_row_partition_tensors", *value)?; - } - if let ::std::option::Option::Some(value) = &self.row_partition_types { - nd.set_attr_string_list("row_partition_types", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindex { + nd.set_attr_type("Tindex", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_row_partition_tensors { + nd.set_attr_int("num_row_partition_tensors", *value)?; + } + if let ::std::option::Option::Some(value) = &self.row_partition_types { + nd.set_attr_string_list("row_partition_types", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RaggedTensorToTensor` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, values: O1, default_value: O2, row_partition_tensors: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), values.into(), default_value.into(), row_partition_tensors.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, values: crate::Output, default_value: crate::Output, row_partition_tensors: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RaggedTensorToTensor", |nd| { + nd.add_input(shape); + nd.add_input(values); + nd.add_input(default_value); + nd.add_input(row_partition_tensors); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindex { + nd.set_attr_type("Tindex", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_row_partition_tensors { + nd.set_attr_int("num_row_partition_tensors", *value)?; + } + if let ::std::option::Option::Some(value) = &self.row_partition_types { + nd.set_attr_string_list("row_partition_types", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RaggedTensorToTensorInst{op}) + } +} +impl RaggedTensorToTensorInst { + /// Returns the 'result' output of this 'RaggedTensorToTensor' operation. + pub fn result(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RaggedTensorToTensorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RaggedTensorToTensor::new().build(shape, values, default_value, row_partition_tensors, scope)`. -pub fn ragged_tensor_to_tensor< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - shape: O0, - values: O1, - default_value: O2, - row_partition_tensors: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ragged_tensor_to_tensor, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(shape: O0, values: O1, default_value: O2, row_partition_tensors: O3, scope: &mut crate::Scope) -> crate::Result { RaggedTensorToTensor::new().build(shape, values, default_value, row_partition_tensors, scope) } + /// Builder for the `RaggedTensorToVariant` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RaggedTensorToVariant { @@ -79412,6 +95745,12 @@ pub struct RaggedTensorToVariant { batched_input: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RaggedTensorToVariant' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RaggedTensorToVariantInst { + /// An instance of a fully built RaggedTensorToVariant Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RaggedTensorToVariant { /// Creates a new `RaggedTensorToVariant`. @@ -79426,19 +95765,13 @@ impl RaggedTensorToVariant { } /// Sets the `Tvalues` attribute. - pub fn Tvalues>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tvalues>(mut self, value: ArgType) -> Self { self.Tvalues = ::std::option::Option::Some(value.into()); self } /// Sets the `Tsplits` attribute. - pub fn Tsplits>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsplits>(mut self, value: ArgType) -> Self { self.Tsplits = ::std::option::Option::Some(value.into()); self } @@ -79456,58 +95789,79 @@ impl RaggedTensorToVariant { } /// Builds the `RaggedTensorToVariant` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - rt_nested_splits: O0, - rt_dense_values: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, rt_nested_splits: O0, rt_dense_values: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(rt_nested_splits.into(), rt_dense_values.into(), scope) } - - fn build_impl( - &self, - rt_nested_splits: crate::Output, - rt_dense_values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, rt_nested_splits: crate::Output, rt_dense_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RaggedTensorToVariant", |nd| { nd.add_input(rt_nested_splits); nd.add_input(rt_dense_values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.RAGGED_RANK { - nd.set_attr_int("RAGGED_RANK", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tvalues { - nd.set_attr_type("Tvalues", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsplits { - nd.set_attr_type("Tsplits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.batched_input { - nd.set_attr_bool("batched_input", *value)?; - } + if let ::std::option::Option::Some(value) = &self.RAGGED_RANK { + nd.set_attr_int("RAGGED_RANK", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.batched_input { + nd.set_attr_bool("batched_input", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RaggedTensorToVariant` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, rt_nested_splits: O0, rt_dense_values: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(rt_nested_splits.into(), rt_dense_values.into(), scope) + } + fn build_instance_impl(&self, rt_nested_splits: crate::Output, rt_dense_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RaggedTensorToVariant", |nd| { + nd.add_input(rt_nested_splits); + nd.add_input(rt_dense_values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.RAGGED_RANK { + nd.set_attr_int("RAGGED_RANK", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.batched_input { + nd.set_attr_bool("batched_input", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RaggedTensorToVariantInst{op}) + } +} +impl RaggedTensorToVariantInst { + /// Returns the 'encoded_ragged' output of this 'RaggedTensorToVariant' operation. + pub fn encoded_ragged(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RaggedTensorToVariantInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RaggedTensorToVariant::new().build(rt_nested_splits, rt_dense_values, scope)`. -pub fn ragged_tensor_to_variant< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - rt_nested_splits: O0, - rt_dense_values: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ragged_tensor_to_variant, O1: ::std::convert::Into>(rt_nested_splits: O0, rt_dense_values: O1, scope: &mut crate::Scope) -> crate::Result { RaggedTensorToVariant::new().build(rt_nested_splits, rt_dense_values, scope) } + /// Builder for the `RaggedTensorToVariantGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RaggedTensorToVariantGradient { @@ -79515,6 +95869,12 @@ pub struct RaggedTensorToVariantGradient { Tsplits: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RaggedTensorToVariantGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RaggedTensorToVariantGradientInst { + /// An instance of a fully built RaggedTensorToVariantGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RaggedTensorToVariantGradient { /// Creates a new `RaggedTensorToVariantGradient`. @@ -79523,19 +95883,13 @@ impl RaggedTensorToVariantGradient { } /// Sets the `Tvalues` attribute. - pub fn Tvalues>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tvalues>(mut self, value: ArgType) -> Self { self.Tvalues = ::std::option::Option::Some(value.into()); self } /// Sets the `Tsplits` attribute. - pub fn Tsplits>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsplits>(mut self, value: ArgType) -> Self { self.Tsplits = ::std::option::Option::Some(value.into()); self } @@ -79547,32 +95901,10 @@ impl RaggedTensorToVariantGradient { } /// Builds the `RaggedTensorToVariantGradient` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - encoded_ragged_grad: O0, - row_splits: O1, - dense_values_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - encoded_ragged_grad.into(), - row_splits.into(), - dense_values_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - encoded_ragged_grad: crate::Output, - row_splits: crate::Output, - dense_values_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, encoded_ragged_grad: O0, row_splits: O1, dense_values_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(encoded_ragged_grad.into(), row_splits.into(), dense_values_shape.into(), scope) + } + fn build_impl(&self, encoded_ragged_grad: crate::Output, row_splits: crate::Output, dense_values_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RaggedTensorToVariantGradient", |nd| { nd.add_input(encoded_ragged_grad); nd.add_input(row_splits); @@ -79580,35 +95912,58 @@ impl RaggedTensorToVariantGradient { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tvalues { - nd.set_attr_type("Tvalues", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsplits { - nd.set_attr_type("Tsplits", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RaggedTensorToVariantGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, encoded_ragged_grad: O0, row_splits: O1, dense_values_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(encoded_ragged_grad.into(), row_splits.into(), dense_values_shape.into(), scope) + } + fn build_instance_impl(&self, encoded_ragged_grad: crate::Output, row_splits: crate::Output, dense_values_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RaggedTensorToVariantGradient", |nd| { + nd.add_input(encoded_ragged_grad); + nd.add_input(row_splits); + nd.add_input(dense_values_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RaggedTensorToVariantGradientInst{op}) + } +} +impl RaggedTensorToVariantGradientInst { + /// Returns the 'dense_values_grad' output of this 'RaggedTensorToVariantGradient' operation. + pub fn dense_values_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RaggedTensorToVariantGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RaggedTensorToVariantGradient::new().build(encoded_ragged_grad, row_splits, dense_values_shape, scope)`. -pub fn ragged_tensor_to_variant_gradient< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - encoded_ragged_grad: O0, - row_splits: O1, - dense_values_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { - RaggedTensorToVariantGradient::new().build( - encoded_ragged_grad, - row_splits, - dense_values_shape, - scope, - ) +pub fn ragged_tensor_to_variant_gradient, O1: ::std::convert::Into, O2: ::std::convert::Into>(encoded_ragged_grad: O0, row_splits: O1, dense_values_shape: O2, scope: &mut crate::Scope) -> crate::Result { + RaggedTensorToVariantGradient::new().build(encoded_ragged_grad, row_splits, dense_values_shape, scope) } + /// Builder for the `RandomCrop` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomCrop { @@ -79617,6 +95972,12 @@ pub struct RandomCrop { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomCrop' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomCropInst { + /// An instance of a fully built RandomCrop Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomCrop { /// Creates a new `RandomCrop`. @@ -79649,55 +96010,73 @@ impl RandomCrop { } /// Builds the `RandomCrop` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - image: O0, - size: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, image: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(image.into(), size.into(), scope) } - - fn build_impl( - &self, - image: crate::Output, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, image: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomCrop", |nd| { nd.add_input(image); nd.add_input(size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RandomCrop` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, image: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(image.into(), size.into(), scope) + } + fn build_instance_impl(&self, image: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomCrop", |nd| { + nd.add_input(image); + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomCropInst{op}) + } +} +impl RandomCropInst { + /// Returns the 'output' output of this 'RandomCrop' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomCropInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RandomCrop::new().build(image, size, scope)`. -pub fn random_crop< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - image: O0, - size: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn random_crop, O1: ::std::convert::Into>(image: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { RandomCrop::new().build(image, size, scope) } + /// Builder for the `RandomDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomDataset { @@ -79706,6 +96085,12 @@ pub struct RandomDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomDatasetInst { + /// An instance of a fully built RandomDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomDataset { /// Creates a new `RandomDataset`. @@ -79714,28 +96099,19 @@ impl RandomDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -79747,55 +96123,73 @@ impl RandomDataset { } /// Builds the `RandomDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - seed: O0, - seed2: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, seed: O0, seed2: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(seed.into(), seed2.into(), scope) } - - fn build_impl( - &self, - seed: crate::Output, - seed2: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, seed: crate::Output, seed2: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomDataset", |nd| { nd.add_input(seed); nd.add_input(seed2); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RandomDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, seed: O0, seed2: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(seed.into(), seed2.into(), scope) + } + fn build_instance_impl(&self, seed: crate::Output, seed2: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomDataset", |nd| { + nd.add_input(seed); + nd.add_input(seed2); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomDatasetInst{op}) + } +} +impl RandomDatasetInst { + /// Returns the 'handle' output of this 'RandomDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RandomDataset::new().build(seed, seed2, scope)`. -pub fn random_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - seed: O0, - seed2: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn random_dataset, O1: ::std::convert::Into>(seed: O0, seed2: O1, scope: &mut crate::Scope) -> crate::Result { RandomDataset::new().build(seed, seed2, scope) } + /// Builder for the `RandomGamma` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomGamma { @@ -79805,6 +96199,12 @@ pub struct RandomGamma { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomGamma' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomGammaInst { + /// An instance of a fully built RandomGamma Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomGamma { /// Creates a new `RandomGamma`. @@ -79843,64 +96243,91 @@ impl RandomGamma { } /// Builds the `RandomGamma` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - shape: O0, - alpha: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, shape: O0, alpha: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), alpha.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - alpha: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, alpha: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomGamma", |nd| { nd.add_input(shape); nd.add_input(alpha); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.S { - nd.set_attr_type("S", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RandomGamma` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, shape: O0, alpha: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), alpha.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, alpha: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomGamma", |nd| { + nd.add_input(shape); + nd.add_input(alpha); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomGammaInst{op}) + } +} +impl RandomGammaInst { + /// Returns the 'output' output of this 'RandomGamma' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomGammaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RandomGamma::new().build(shape, alpha, scope)`. -pub fn random_gamma< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - shape: O0, - alpha: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn random_gamma, O1: ::std::convert::Into>(shape: O0, alpha: O1, scope: &mut crate::Scope) -> crate::Result { RandomGamma::new().build(shape, alpha, scope) } + /// Builder for the `RandomGammaGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomGammaGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomGammaGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomGammaGradInst { + /// An instance of a fully built RandomGammaGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomGammaGrad { /// Creates a new `RandomGammaGrad`. @@ -79921,49 +96348,163 @@ impl RandomGammaGrad { } /// Builds the `RandomGammaGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - alpha: O0, - sample: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, alpha: O0, sample: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(alpha.into(), sample.into(), scope) } - - fn build_impl( - &self, - alpha: crate::Output, - sample: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, alpha: crate::Output, sample: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomGammaGrad", |nd| { nd.add_input(alpha); nd.add_input(sample); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RandomGammaGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, alpha: O0, sample: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(alpha.into(), sample.into(), scope) + } + fn build_instance_impl(&self, alpha: crate::Output, sample: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomGammaGrad", |nd| { + nd.add_input(alpha); + nd.add_input(sample); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomGammaGradInst{op}) + } +} +impl RandomGammaGradInst { + /// Returns the 'output' output of this 'RandomGammaGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomGammaGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RandomGammaGrad::new().build(alpha, sample, scope)`. -pub fn random_gamma_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - alpha: O0, - sample: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn random_gamma_grad, O1: ::std::convert::Into>(alpha: O0, sample: O1, scope: &mut crate::Scope) -> crate::Result { RandomGammaGrad::new().build(alpha, sample, scope) } + +/// Builder for the `RandomIndexShuffle` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct RandomIndexShuffle { + dtype: ::std::option::Option, + Tseed: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'RandomIndexShuffle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomIndexShuffleInst { + /// An instance of a fully built RandomIndexShuffle Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl RandomIndexShuffle { + /// Creates a new `RandomIndexShuffle`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `dtype` attribute. + pub fn dtype>(mut self, value: ArgType) -> Self { + self.dtype = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `Tseed` attribute. + pub fn Tseed>(mut self, value: ArgType) -> Self { + self.Tseed = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `RandomIndexShuffle` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, index: O0, seed: O1, max_index: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(index.into(), seed.into(), max_index.into(), scope) + } + fn build_impl(&self, index: crate::Output, seed: crate::Output, max_index: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("RandomIndexShuffle", |nd| { + nd.add_input(index); + nd.add_input(seed); + nd.add_input(max_index); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `RandomIndexShuffle` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, index: O0, seed: O1, max_index: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(index.into(), seed.into(), max_index.into(), scope) + } + fn build_instance_impl(&self, index: crate::Output, seed: crate::Output, max_index: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomIndexShuffle", |nd| { + nd.add_input(index); + nd.add_input(seed); + nd.add_input(max_index); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomIndexShuffleInst{op}) + } +} +impl RandomIndexShuffleInst { + /// Returns the 'output' output of this 'RandomIndexShuffle' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomIndexShuffleInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `RandomIndexShuffle::new().build(index, seed, max_index, scope)`. +pub fn random_index_shuffle, O1: ::std::convert::Into, O2: ::std::convert::Into>(index: O0, seed: O1, max_index: O2, scope: &mut crate::Scope) -> crate::Result { + RandomIndexShuffle::new().build(index, seed, max_index, scope) +} + /// Builder for the `RandomPoisson` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomPoisson { @@ -79973,6 +96514,12 @@ pub struct RandomPoisson { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomPoisson' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomPoissonInst { + /// An instance of a fully built RandomPoisson Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomPoisson { /// Creates a new `RandomPoisson`. @@ -80011,58 +96558,79 @@ impl RandomPoisson { } /// Builds the `RandomPoisson` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - shape: O0, - rate: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, shape: O0, rate: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), rate.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - rate: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomPoisson", |nd| { nd.add_input(shape); nd.add_input(rate); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.S { - nd.set_attr_type("S", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RandomPoisson` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, shape: O0, rate: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), rate.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomPoisson", |nd| { + nd.add_input(shape); + nd.add_input(rate); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomPoissonInst{op}) + } +} +impl RandomPoissonInst { + /// Returns the 'output' output of this 'RandomPoisson' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomPoissonInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RandomPoisson::new().build(shape, rate, scope)`. -pub fn random_poisson< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - shape: O0, - rate: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn random_poisson, O1: ::std::convert::Into>(shape: O0, rate: O1, scope: &mut crate::Scope) -> crate::Result { RandomPoisson::new().build(shape, rate, scope) } + /// Builder for the `RandomPoissonV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomPoissonV2 { @@ -80073,6 +96641,12 @@ pub struct RandomPoissonV2 { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomPoissonV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomPoissonV2Inst { + /// An instance of a fully built RandomPoissonV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomPoissonV2 { /// Creates a new `RandomPoissonV2`. @@ -80117,61 +96691,85 @@ impl RandomPoissonV2 { } /// Builds the `RandomPoissonV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - shape: O0, - rate: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, shape: O0, rate: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), rate.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - rate: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomPoissonV2", |nd| { nd.add_input(shape); nd.add_input(rate); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.S { - nd.set_attr_type("S", *value)?; - } - if let ::std::option::Option::Some(value) = &self.R { - nd.set_attr_type("R", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.R { + nd.set_attr_type("R", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RandomPoissonV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, shape: O0, rate: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), rate.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomPoissonV2", |nd| { + nd.add_input(shape); + nd.add_input(rate); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.R { + nd.set_attr_type("R", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomPoissonV2Inst{op}) + } +} +impl RandomPoissonV2Inst { + /// Returns the 'output' output of this 'RandomPoissonV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomPoissonV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RandomPoissonV2::new().build(shape, rate, scope)`. -pub fn random_poisson_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - shape: O0, - rate: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn random_poisson_v2, O1: ::std::convert::Into>(shape: O0, rate: O1, scope: &mut crate::Scope) -> crate::Result { RandomPoissonV2::new().build(shape, rate, scope) } + /// Builder for the `RandomShuffle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomShuffle { @@ -80180,6 +96778,12 @@ pub struct RandomShuffle { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomShuffle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomShuffleInst { + /// An instance of a fully built RandomShuffle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomShuffle { /// Creates a new `RandomShuffle`. @@ -80212,45 +96816,71 @@ impl RandomShuffle { } /// Builds the `RandomShuffle` operation. - pub fn build>( - &self, - value: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomShuffle", |nd| { nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RandomShuffle` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), scope) + } + fn build_instance_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomShuffle", |nd| { + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomShuffleInst{op}) + } +} +impl RandomShuffleInst { + /// Returns the 'output' output of this 'RandomShuffle' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomShuffleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RandomShuffle::new().build(value, scope)`. -pub fn random_shuffle>( - value: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn random_shuffle>(value: O0, scope: &mut crate::Scope) -> crate::Result { RandomShuffle::new().build(value, scope) } + /// Builder for the `RandomShuffleQueue` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomShuffleQueue { @@ -80264,6 +96894,12 @@ pub struct RandomShuffleQueue { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomShuffleQueue' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomShuffleQueueInst { + /// An instance of a fully built RandomShuffleQueue Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomShuffleQueue { /// Creates a new `RandomShuffleQueue`. @@ -80272,19 +96908,13 @@ impl RandomShuffleQueue { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -80314,19 +96944,13 @@ impl RandomShuffleQueue { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -80338,48 +96962,99 @@ impl RandomShuffleQueue { } /// Builds the `RandomShuffleQueue` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomShuffleQueue", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.min_after_dequeue { - nd.set_attr_int("min_after_dequeue", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.min_after_dequeue { + nd.set_attr_int("min_after_dequeue", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `RandomShuffleQueue` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomShuffleQueue", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.min_after_dequeue { + nd.set_attr_int("min_after_dequeue", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomShuffleQueueInst{op}) + } +} +impl RandomShuffleQueueInst { + /// Returns the 'handle' output of this 'RandomShuffleQueue' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomShuffleQueueInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `RandomShuffleQueue::new().build(scope)`. -pub fn random_shuffle_queue(scope: &mut crate::Scope) -> crate::Result { +pub fn random_shuffle_queue<>(scope: &mut crate::Scope) -> crate::Result { RandomShuffleQueue::new().build(scope) } + /// Builder for the `RandomShuffleQueueV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomShuffleQueueV2 { @@ -80393,6 +97068,12 @@ pub struct RandomShuffleQueueV2 { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomShuffleQueueV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomShuffleQueueV2Inst { + /// An instance of a fully built RandomShuffleQueueV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomShuffleQueueV2 { /// Creates a new `RandomShuffleQueueV2`. @@ -80401,19 +97082,13 @@ impl RandomShuffleQueueV2 { } /// Sets the `component_types` attribute. - pub fn component_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn component_types>>(mut self, value: ArgType) -> Self { self.component_types = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } @@ -80443,19 +97118,13 @@ impl RandomShuffleQueueV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -80467,48 +97136,99 @@ impl RandomShuffleQueueV2 { } /// Builds the `RandomShuffleQueueV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomShuffleQueueV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.component_types { - nd.set_attr_type_list("component_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.min_after_dequeue { - nd.set_attr_int("min_after_dequeue", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.min_after_dequeue { + nd.set_attr_int("min_after_dequeue", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `RandomShuffleQueueV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomShuffleQueueV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.component_types { + nd.set_attr_type_list("component_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.min_after_dequeue { + nd.set_attr_int("min_after_dequeue", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomShuffleQueueV2Inst{op}) + } +} +impl RandomShuffleQueueV2Inst { + /// Returns the 'handle' output of this 'RandomShuffleQueueV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomShuffleQueueV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `RandomShuffleQueueV2::new().build(scope)`. -pub fn random_shuffle_queue_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn random_shuffle_queue_v2<>(scope: &mut crate::Scope) -> crate::Result { RandomShuffleQueueV2::new().build(scope) } + /// Builder for the `RandomStandardNormal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomStandardNormal { @@ -80518,6 +97238,12 @@ pub struct RandomStandardNormal { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomStandardNormal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomStandardNormalInst { + /// An instance of a fully built RandomStandardNormal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomStandardNormal { /// Creates a new `RandomStandardNormal`. @@ -80556,48 +97282,77 @@ impl RandomStandardNormal { } /// Builds the `RandomStandardNormal` operation. - pub fn build>( - &self, - shape: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomStandardNormal", |nd| { nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RandomStandardNormal` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomStandardNormal", |nd| { + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomStandardNormalInst{op}) + } +} +impl RandomStandardNormalInst { + /// Returns the 'output' output of this 'RandomStandardNormal' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomStandardNormalInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RandomStandardNormal::new().build(shape, scope)`. -pub fn random_standard_normal>( - shape: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn random_standard_normal>(shape: O0, scope: &mut crate::Scope) -> crate::Result { RandomStandardNormal::new().build(shape, scope) } + /// Builder for the `RandomUniform` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomUniform { @@ -80607,6 +97362,12 @@ pub struct RandomUniform { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomUniform' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomUniformInst { + /// An instance of a fully built RandomUniform Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomUniform { /// Creates a new `RandomUniform`. @@ -80645,48 +97406,77 @@ impl RandomUniform { } /// Builds the `RandomUniform` operation. - pub fn build>( - &self, - shape: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomUniform", |nd| { nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RandomUniform` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomUniform", |nd| { + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomUniformInst{op}) + } +} +impl RandomUniformInst { + /// Returns the 'output' output of this 'RandomUniform' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomUniformInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RandomUniform::new().build(shape, scope)`. -pub fn random_uniform>( - shape: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn random_uniform>(shape: O0, scope: &mut crate::Scope) -> crate::Result { RandomUniform::new().build(shape, scope) } + /// Builder for the `RandomUniformInt` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RandomUniformInt { @@ -80696,6 +97486,12 @@ pub struct RandomUniformInt { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RandomUniformInt' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RandomUniformIntInst { + /// An instance of a fully built RandomUniformInt Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RandomUniformInt { /// Creates a new `RandomUniformInt`. @@ -80734,27 +97530,10 @@ impl RandomUniformInt { } /// Builds the `RandomUniformInt` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - shape: O0, - minval: O1, - maxval: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, shape: O0, minval: O1, maxval: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), minval.into(), maxval.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - minval: crate::Output, - maxval: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, minval: crate::Output, maxval: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RandomUniformInt", |nd| { nd.add_input(shape); nd.add_input(minval); @@ -80762,42 +97541,82 @@ impl RandomUniformInt { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RandomUniformInt` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, shape: O0, minval: O1, maxval: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), minval.into(), maxval.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, minval: crate::Output, maxval: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RandomUniformInt", |nd| { + nd.add_input(shape); + nd.add_input(minval); + nd.add_input(maxval); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RandomUniformIntInst{op}) + } +} +impl RandomUniformIntInst { + /// Returns the 'output' output of this 'RandomUniformInt' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RandomUniformIntInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RandomUniformInt::new().build(shape, minval, maxval, scope)`. -pub fn random_uniform_int< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - shape: O0, - minval: O1, - maxval: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn random_uniform_int, O1: ::std::convert::Into, O2: ::std::convert::Into>(shape: O0, minval: O1, maxval: O2, scope: &mut crate::Scope) -> crate::Result { RandomUniformInt::new().build(shape, minval, maxval, scope) } + /// Builder for the `Range` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Range { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Range' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RangeInst { + /// An instance of a fully built Range Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Range { /// Creates a new `Range`. @@ -80818,27 +97637,10 @@ impl Range { } /// Builds the `Range` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - start: O0, - limit: O1, - delta: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, start: O0, limit: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(start.into(), limit.into(), delta.into(), scope) } - - fn build_impl( - &self, - start: crate::Output, - limit: crate::Output, - delta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, start: crate::Output, limit: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Range", |nd| { nd.add_input(start); nd.add_input(limit); @@ -80846,27 +97648,52 @@ impl Range { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Range` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, start: O0, limit: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(start.into(), limit.into(), delta.into(), scope) + } + fn build_instance_impl(&self, start: crate::Output, limit: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Range", |nd| { + nd.add_input(start); + nd.add_input(limit); + nd.add_input(delta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RangeInst{op}) + } +} +impl RangeInst { + /// Returns the 'output' output of this 'Range' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RangeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Range::new().build(start, limit, delta, scope)`. -pub fn range< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - start: O0, - limit: O1, - delta: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn range, O1: ::std::convert::Into, O2: ::std::convert::Into>(start: O0, limit: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { Range::new().build(start, limit, delta, scope) } + /// Builder for the `RangeDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RangeDataset { @@ -80875,6 +97702,12 @@ pub struct RangeDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RangeDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RangeDatasetInst { + /// An instance of a fully built RangeDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RangeDataset { /// Creates a new `RangeDataset`. @@ -80883,28 +97716,19 @@ impl RangeDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -80916,27 +97740,10 @@ impl RangeDataset { } /// Builds the `RangeDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - start: O0, - stop: O1, - step: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, start: O0, stop: O1, step: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(start.into(), stop.into(), step.into(), scope) } - - fn build_impl( - &self, - start: crate::Output, - stop: crate::Output, - step: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, start: crate::Output, stop: crate::Output, step: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RangeDataset", |nd| { nd.add_input(start); nd.add_input(stop); @@ -80944,39 +97751,76 @@ impl RangeDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RangeDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, start: O0, stop: O1, step: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(start.into(), stop.into(), step.into(), scope) + } + fn build_instance_impl(&self, start: crate::Output, stop: crate::Output, step: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RangeDataset", |nd| { + nd.add_input(start); + nd.add_input(stop); + nd.add_input(step); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RangeDatasetInst{op}) + } +} +impl RangeDatasetInst { + /// Returns the 'handle' output of this 'RangeDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RangeDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RangeDataset::new().build(start, stop, step, scope)`. -pub fn range_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - start: O0, - stop: O1, - step: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn range_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(start: O0, stop: O1, step: O2, scope: &mut crate::Scope) -> crate::Result { RangeDataset::new().build(start, stop, step, scope) } + /// Builder for the `Rank` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Rank { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Rank' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RankInst { + /// An instance of a fully built Rank Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Rank { /// Creates a new `Rank`. @@ -80997,44 +97841,70 @@ impl Rank { } /// Builds the `Rank` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Rank", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Rank` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Rank", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RankInst{op}) + } +} +impl RankInst { + /// Returns the 'output' output of this 'Rank' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RankInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Rank::new().build(input, scope)`. -pub fn rank>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rank>(input: O0, scope: &mut crate::Scope) -> crate::Result { Rank::new().build(input, scope) } + /// Builder for the `ReadFile` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReadFile { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReadFile' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReadFileInst { + /// An instance of a fully built ReadFile Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReadFile { /// Creates a new `ReadFile`. @@ -81049,19 +97919,10 @@ impl ReadFile { } /// Builds the `ReadFile` operation. - pub fn build>( - &self, - filename: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, filename: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(filename.into(), scope) } - - fn build_impl( - &self, - filename: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, filename: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReadFile", |nd| { nd.add_input(filename); for op in &self.control_inputs { @@ -81070,21 +97931,53 @@ impl ReadFile { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReadFile` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, filename: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filename.into(), scope) + } + fn build_instance_impl(&self, filename: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReadFile", |nd| { + nd.add_input(filename); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReadFileInst{op}) + } +} +impl ReadFileInst { + /// Returns the 'contents' output of this 'ReadFile' operation. + pub fn contents(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReadFileInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReadFile::new().build(filename, scope)`. -pub fn read_file>( - filename: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn read_file>(filename: O0, scope: &mut crate::Scope) -> crate::Result { ReadFile::new().build(filename, scope) } + /// Builder for the `ReadVariableOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReadVariableOp { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ReadVariableOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReadVariableOpInst { + /// An instance of a fully built ReadVariableOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReadVariableOp { /// Creates a new `ReadVariableOp`. @@ -81105,39 +97998,59 @@ impl ReadVariableOp { } /// Builds the `ReadVariableOp` operation. - pub fn build>( - &self, - resource: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReadVariableOp", |nd| { nd.add_input(resource); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReadVariableOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReadVariableOp", |nd| { + nd.add_input(resource); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReadVariableOpInst{op}) + } +} +impl ReadVariableOpInst { + /// Returns the 'value' output of this 'ReadVariableOp' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReadVariableOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReadVariableOp::new().build(resource, scope)`. -pub fn read_variable_op>( - resource: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn read_variable_op>(resource: O0, scope: &mut crate::Scope) -> crate::Result { ReadVariableOp::new().build(resource, scope) } + /// Builder for the `ReadVariableXlaSplitND` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReadVariableXlaSplitND { @@ -81147,6 +98060,12 @@ pub struct ReadVariableXlaSplitND { paddings: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ReadVariableXlaSplitND' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReadVariableXlaSplitNDInst { + /// An instance of a fully built ReadVariableXlaSplitND Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReadVariableXlaSplitND { /// Creates a new `ReadVariableXlaSplitND`. @@ -81167,19 +98086,13 @@ impl ReadVariableXlaSplitND { } /// Sets the `num_splits` attribute. - pub fn num_splits>>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_splits>>(mut self, value: ArgType) -> Self { self.num_splits = ::std::option::Option::Some(value.into()); self } /// Sets the `paddings` attribute. - pub fn paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn paddings>>(mut self, value: ArgType) -> Self { self.paddings = ::std::option::Option::Some(value.into()); self } @@ -81191,53 +98104,93 @@ impl ReadVariableXlaSplitND { } /// Builds the `ReadVariableXlaSplitND` operation. - pub fn build>( - &self, - resource: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReadVariableXlaSplitND", |nd| { nd.add_input(resource); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_splits { - nd.set_attr_int_list("num_splits", value)?; - } - if let ::std::option::Option::Some(value) = &self.paddings { - nd.set_attr_int_list("paddings", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_splits { + nd.set_attr_int_list("num_splits", value)?; + } + if let ::std::option::Option::Some(value) = &self.paddings { + nd.set_attr_int_list("paddings", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReadVariableXlaSplitND` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReadVariableXlaSplitND", |nd| { + nd.add_input(resource); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_splits { + nd.set_attr_int_list("num_splits", value)?; + } + if let ::std::option::Option::Some(value) = &self.paddings { + nd.set_attr_int_list("paddings", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReadVariableXlaSplitNDInst{op}) + } +} +impl ReadVariableXlaSplitNDInst { + /// Returns a Vector of Outputs for 'outputs' output of this ReadVariableXlaSplitND operation. + pub fn outputs(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("N")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for ReadVariableXlaSplitNDInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReadVariableXlaSplitND::new().build(resource, scope)`. -pub fn read_variable_xla_split_nd>( - resource: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn read_variable_xla_split_nd>(resource: O0, scope: &mut crate::Scope) -> crate::Result { ReadVariableXlaSplitND::new().build(resource, scope) } + /// Builder for the `ReaderNumRecordsProduced` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderNumRecordsProduced { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderNumRecordsProduced' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderNumRecordsProducedInst { + /// An instance of a fully built ReaderNumRecordsProduced Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderNumRecordsProduced { /// Creates a new `ReaderNumRecordsProduced`. @@ -81252,19 +98205,10 @@ impl ReaderNumRecordsProduced { } /// Builds the `ReaderNumRecordsProduced` operation. - pub fn build>( - &self, - reader_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderNumRecordsProduced", |nd| { nd.add_input(reader_handle); for op in &self.control_inputs { @@ -81273,20 +98217,52 @@ impl ReaderNumRecordsProduced { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderNumRecordsProduced` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderNumRecordsProduced", |nd| { + nd.add_input(reader_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderNumRecordsProducedInst{op}) + } +} +impl ReaderNumRecordsProducedInst { + /// Returns the 'records_produced' output of this 'ReaderNumRecordsProduced' operation. + pub fn records_produced(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReaderNumRecordsProducedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderNumRecordsProduced::new().build(reader_handle, scope)`. -pub fn reader_num_records_produced>( - reader_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_num_records_produced>(reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { ReaderNumRecordsProduced::new().build(reader_handle, scope) } + /// Builder for the `ReaderNumRecordsProducedV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderNumRecordsProducedV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderNumRecordsProducedV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderNumRecordsProducedV2Inst { + /// An instance of a fully built ReaderNumRecordsProducedV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderNumRecordsProducedV2 { /// Creates a new `ReaderNumRecordsProducedV2`. @@ -81301,19 +98277,10 @@ impl ReaderNumRecordsProducedV2 { } /// Builds the `ReaderNumRecordsProducedV2` operation. - pub fn build>( - &self, - reader_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderNumRecordsProducedV2", |nd| { nd.add_input(reader_handle); for op in &self.control_inputs { @@ -81322,20 +98289,52 @@ impl ReaderNumRecordsProducedV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderNumRecordsProducedV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderNumRecordsProducedV2", |nd| { + nd.add_input(reader_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderNumRecordsProducedV2Inst{op}) + } +} +impl ReaderNumRecordsProducedV2Inst { + /// Returns the 'records_produced' output of this 'ReaderNumRecordsProducedV2' operation. + pub fn records_produced(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReaderNumRecordsProducedV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderNumRecordsProducedV2::new().build(reader_handle, scope)`. -pub fn reader_num_records_produced_v2>( - reader_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_num_records_produced_v2>(reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { ReaderNumRecordsProducedV2::new().build(reader_handle, scope) } + /// Builder for the `ReaderNumWorkUnitsCompleted` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderNumWorkUnitsCompleted { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderNumWorkUnitsCompleted' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderNumWorkUnitsCompletedInst { + /// An instance of a fully built ReaderNumWorkUnitsCompleted Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderNumWorkUnitsCompleted { /// Creates a new `ReaderNumWorkUnitsCompleted`. @@ -81350,19 +98349,10 @@ impl ReaderNumWorkUnitsCompleted { } /// Builds the `ReaderNumWorkUnitsCompleted` operation. - pub fn build>( - &self, - reader_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderNumWorkUnitsCompleted", |nd| { nd.add_input(reader_handle); for op in &self.control_inputs { @@ -81371,20 +98361,52 @@ impl ReaderNumWorkUnitsCompleted { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderNumWorkUnitsCompleted` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderNumWorkUnitsCompleted", |nd| { + nd.add_input(reader_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderNumWorkUnitsCompletedInst{op}) + } +} +impl ReaderNumWorkUnitsCompletedInst { + /// Returns the 'units_completed' output of this 'ReaderNumWorkUnitsCompleted' operation. + pub fn units_completed(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReaderNumWorkUnitsCompletedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderNumWorkUnitsCompleted::new().build(reader_handle, scope)`. -pub fn reader_num_work_units_completed>( - reader_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_num_work_units_completed>(reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { ReaderNumWorkUnitsCompleted::new().build(reader_handle, scope) } + /// Builder for the `ReaderNumWorkUnitsCompletedV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderNumWorkUnitsCompletedV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderNumWorkUnitsCompletedV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderNumWorkUnitsCompletedV2Inst { + /// An instance of a fully built ReaderNumWorkUnitsCompletedV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderNumWorkUnitsCompletedV2 { /// Creates a new `ReaderNumWorkUnitsCompletedV2`. @@ -81399,19 +98421,10 @@ impl ReaderNumWorkUnitsCompletedV2 { } /// Builds the `ReaderNumWorkUnitsCompletedV2` operation. - pub fn build>( - &self, - reader_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderNumWorkUnitsCompletedV2", |nd| { nd.add_input(reader_handle); for op in &self.control_inputs { @@ -81420,20 +98433,52 @@ impl ReaderNumWorkUnitsCompletedV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderNumWorkUnitsCompletedV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderNumWorkUnitsCompletedV2", |nd| { + nd.add_input(reader_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderNumWorkUnitsCompletedV2Inst{op}) + } +} +impl ReaderNumWorkUnitsCompletedV2Inst { + /// Returns the 'units_completed' output of this 'ReaderNumWorkUnitsCompletedV2' operation. + pub fn units_completed(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReaderNumWorkUnitsCompletedV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderNumWorkUnitsCompletedV2::new().build(reader_handle, scope)`. -pub fn reader_num_work_units_completed_v2>( - reader_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_num_work_units_completed_v2>(reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { ReaderNumWorkUnitsCompletedV2::new().build(reader_handle, scope) } + /// Builder for the `ReaderRead` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderRead { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderRead' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderReadInst { + /// An instance of a fully built ReaderRead Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderRead { /// Creates a new `ReaderRead`. @@ -81448,24 +98493,10 @@ impl ReaderRead { } /// Builds the `ReaderRead` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - reader_handle: O0, - queue_handle: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, reader_handle: O0, queue_handle: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), queue_handle.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - queue_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, queue_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderRead", |nd| { nd.add_input(reader_handle); nd.add_input(queue_handle); @@ -81475,24 +98506,60 @@ impl ReaderRead { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderRead` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, reader_handle: O0, queue_handle: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), queue_handle.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, queue_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderRead", |nd| { + nd.add_input(reader_handle); + nd.add_input(queue_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderReadInst{op}) + } +} +impl ReaderReadInst { + /// Returns the 'key' output of this 'ReaderRead' operation. + pub fn key(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'value' output of this 'ReaderRead' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for ReaderReadInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderRead::new().build(reader_handle, queue_handle, scope)`. -pub fn reader_read< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - reader_handle: O0, - queue_handle: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_read, O1: ::std::convert::Into>(reader_handle: O0, queue_handle: O1, scope: &mut crate::Scope) -> crate::Result { ReaderRead::new().build(reader_handle, queue_handle, scope) } + /// Builder for the `ReaderReadUpTo` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderReadUpTo { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderReadUpTo' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderReadUpToInst { + /// An instance of a fully built ReaderReadUpTo Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderReadUpTo { /// Creates a new `ReaderReadUpTo`. @@ -81507,32 +98574,10 @@ impl ReaderReadUpTo { } /// Builds the `ReaderReadUpTo` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - reader_handle: O0, - queue_handle: O1, - num_records: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - reader_handle.into(), - queue_handle.into(), - num_records.into(), - scope, - ) - } - - fn build_impl( - &self, - reader_handle: crate::Output, - queue_handle: crate::Output, - num_records: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, reader_handle: O0, queue_handle: O1, num_records: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(reader_handle.into(), queue_handle.into(), num_records.into(), scope) + } + fn build_impl(&self, reader_handle: crate::Output, queue_handle: crate::Output, num_records: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderReadUpTo", |nd| { nd.add_input(reader_handle); nd.add_input(queue_handle); @@ -81543,26 +98588,61 @@ impl ReaderReadUpTo { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderReadUpTo` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, reader_handle: O0, queue_handle: O1, num_records: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), queue_handle.into(), num_records.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, queue_handle: crate::Output, num_records: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderReadUpTo", |nd| { + nd.add_input(reader_handle); + nd.add_input(queue_handle); + nd.add_input(num_records); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderReadUpToInst{op}) + } +} +impl ReaderReadUpToInst { + /// Returns the 'keys' output of this 'ReaderReadUpTo' operation. + pub fn keys(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'ReaderReadUpTo' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for ReaderReadUpToInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderReadUpTo::new().build(reader_handle, queue_handle, num_records, scope)`. -pub fn reader_read_up_to< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - reader_handle: O0, - queue_handle: O1, - num_records: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_read_up_to, O1: ::std::convert::Into, O2: ::std::convert::Into>(reader_handle: O0, queue_handle: O1, num_records: O2, scope: &mut crate::Scope) -> crate::Result { ReaderReadUpTo::new().build(reader_handle, queue_handle, num_records, scope) } + /// Builder for the `ReaderReadUpToV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderReadUpToV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderReadUpToV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderReadUpToV2Inst { + /// An instance of a fully built ReaderReadUpToV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderReadUpToV2 { /// Creates a new `ReaderReadUpToV2`. @@ -81577,32 +98657,10 @@ impl ReaderReadUpToV2 { } /// Builds the `ReaderReadUpToV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - reader_handle: O0, - queue_handle: O1, - num_records: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - reader_handle.into(), - queue_handle.into(), - num_records.into(), - scope, - ) - } - - fn build_impl( - &self, - reader_handle: crate::Output, - queue_handle: crate::Output, - num_records: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, reader_handle: O0, queue_handle: O1, num_records: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(reader_handle.into(), queue_handle.into(), num_records.into(), scope) + } + fn build_impl(&self, reader_handle: crate::Output, queue_handle: crate::Output, num_records: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderReadUpToV2", |nd| { nd.add_input(reader_handle); nd.add_input(queue_handle); @@ -81613,26 +98671,61 @@ impl ReaderReadUpToV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderReadUpToV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, reader_handle: O0, queue_handle: O1, num_records: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), queue_handle.into(), num_records.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, queue_handle: crate::Output, num_records: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderReadUpToV2", |nd| { + nd.add_input(reader_handle); + nd.add_input(queue_handle); + nd.add_input(num_records); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderReadUpToV2Inst{op}) + } +} +impl ReaderReadUpToV2Inst { + /// Returns the 'keys' output of this 'ReaderReadUpToV2' operation. + pub fn keys(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'ReaderReadUpToV2' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for ReaderReadUpToV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderReadUpToV2::new().build(reader_handle, queue_handle, num_records, scope)`. -pub fn reader_read_up_to_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - reader_handle: O0, - queue_handle: O1, - num_records: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_read_up_to_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(reader_handle: O0, queue_handle: O1, num_records: O2, scope: &mut crate::Scope) -> crate::Result { ReaderReadUpToV2::new().build(reader_handle, queue_handle, num_records, scope) } + /// Builder for the `ReaderReadV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderReadV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderReadV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderReadV2Inst { + /// An instance of a fully built ReaderReadV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderReadV2 { /// Creates a new `ReaderReadV2`. @@ -81647,24 +98740,10 @@ impl ReaderReadV2 { } /// Builds the `ReaderReadV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - reader_handle: O0, - queue_handle: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, reader_handle: O0, queue_handle: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), queue_handle.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - queue_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, queue_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderReadV2", |nd| { nd.add_input(reader_handle); nd.add_input(queue_handle); @@ -81674,24 +98753,60 @@ impl ReaderReadV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderReadV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, reader_handle: O0, queue_handle: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), queue_handle.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, queue_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderReadV2", |nd| { + nd.add_input(reader_handle); + nd.add_input(queue_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderReadV2Inst{op}) + } +} +impl ReaderReadV2Inst { + /// Returns the 'key' output of this 'ReaderReadV2' operation. + pub fn key(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'value' output of this 'ReaderReadV2' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for ReaderReadV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderReadV2::new().build(reader_handle, queue_handle, scope)`. -pub fn reader_read_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - reader_handle: O0, - queue_handle: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_read_v2, O1: ::std::convert::Into>(reader_handle: O0, queue_handle: O1, scope: &mut crate::Scope) -> crate::Result { ReaderReadV2::new().build(reader_handle, queue_handle, scope) } + /// Builder for the `ReaderReset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderReset { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderReset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderResetInst { + /// An instance of a fully built ReaderReset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderReset { /// Creates a new `ReaderReset`. @@ -81706,19 +98821,10 @@ impl ReaderReset { } /// Builds the `ReaderReset` operation. - pub fn build>( - &self, - reader_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderReset", |nd| { nd.add_input(reader_handle); for op in &self.control_inputs { @@ -81727,20 +98833,45 @@ impl ReaderReset { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderReset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderReset", |nd| { + nd.add_input(reader_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderResetInst{op}) + } +} +impl ReaderResetInst { +} +impl Into for ReaderResetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderReset::new().build(reader_handle, scope)`. -pub fn reader_reset>( - reader_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_reset>(reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { ReaderReset::new().build(reader_handle, scope) } + /// Builder for the `ReaderResetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderResetV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderResetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderResetV2Inst { + /// An instance of a fully built ReaderResetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderResetV2 { /// Creates a new `ReaderResetV2`. @@ -81755,19 +98886,10 @@ impl ReaderResetV2 { } /// Builds the `ReaderResetV2` operation. - pub fn build>( - &self, - reader_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderResetV2", |nd| { nd.add_input(reader_handle); for op in &self.control_inputs { @@ -81776,20 +98898,45 @@ impl ReaderResetV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderResetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderResetV2", |nd| { + nd.add_input(reader_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderResetV2Inst{op}) + } +} +impl ReaderResetV2Inst { +} +impl Into for ReaderResetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderResetV2::new().build(reader_handle, scope)`. -pub fn reader_reset_v2>( - reader_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_reset_v2>(reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { ReaderResetV2::new().build(reader_handle, scope) } + /// Builder for the `ReaderRestoreState` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderRestoreState { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderRestoreState' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderRestoreStateInst { + /// An instance of a fully built ReaderRestoreState Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderRestoreState { /// Creates a new `ReaderRestoreState`. @@ -81804,24 +98951,10 @@ impl ReaderRestoreState { } /// Builds the `ReaderRestoreState` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - reader_handle: O0, - state: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, reader_handle: O0, state: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), state.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - state: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, state: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderRestoreState", |nd| { nd.add_input(reader_handle); nd.add_input(state); @@ -81831,24 +98964,46 @@ impl ReaderRestoreState { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderRestoreState` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, reader_handle: O0, state: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), state.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, state: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderRestoreState", |nd| { + nd.add_input(reader_handle); + nd.add_input(state); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderRestoreStateInst{op}) + } +} +impl ReaderRestoreStateInst { +} +impl Into for ReaderRestoreStateInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderRestoreState::new().build(reader_handle, state, scope)`. -pub fn reader_restore_state< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - reader_handle: O0, - state: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_restore_state, O1: ::std::convert::Into>(reader_handle: O0, state: O1, scope: &mut crate::Scope) -> crate::Result { ReaderRestoreState::new().build(reader_handle, state, scope) } + /// Builder for the `ReaderRestoreStateV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderRestoreStateV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderRestoreStateV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderRestoreStateV2Inst { + /// An instance of a fully built ReaderRestoreStateV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderRestoreStateV2 { /// Creates a new `ReaderRestoreStateV2`. @@ -81863,24 +99018,10 @@ impl ReaderRestoreStateV2 { } /// Builds the `ReaderRestoreStateV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - reader_handle: O0, - state: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, reader_handle: O0, state: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), state.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - state: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, state: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderRestoreStateV2", |nd| { nd.add_input(reader_handle); nd.add_input(state); @@ -81890,24 +99031,46 @@ impl ReaderRestoreStateV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderRestoreStateV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, reader_handle: O0, state: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), state.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, state: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderRestoreStateV2", |nd| { + nd.add_input(reader_handle); + nd.add_input(state); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderRestoreStateV2Inst{op}) + } +} +impl ReaderRestoreStateV2Inst { +} +impl Into for ReaderRestoreStateV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderRestoreStateV2::new().build(reader_handle, state, scope)`. -pub fn reader_restore_state_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - reader_handle: O0, - state: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_restore_state_v2, O1: ::std::convert::Into>(reader_handle: O0, state: O1, scope: &mut crate::Scope) -> crate::Result { ReaderRestoreStateV2::new().build(reader_handle, state, scope) } + /// Builder for the `ReaderSerializeState` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderSerializeState { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderSerializeState' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderSerializeStateInst { + /// An instance of a fully built ReaderSerializeState Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderSerializeState { /// Creates a new `ReaderSerializeState`. @@ -81922,19 +99085,10 @@ impl ReaderSerializeState { } /// Builds the `ReaderSerializeState` operation. - pub fn build>( - &self, - reader_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderSerializeState", |nd| { nd.add_input(reader_handle); for op in &self.control_inputs { @@ -81943,20 +99097,52 @@ impl ReaderSerializeState { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderSerializeState` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderSerializeState", |nd| { + nd.add_input(reader_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderSerializeStateInst{op}) + } +} +impl ReaderSerializeStateInst { + /// Returns the 'state' output of this 'ReaderSerializeState' operation. + pub fn state(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReaderSerializeStateInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderSerializeState::new().build(reader_handle, scope)`. -pub fn reader_serialize_state>( - reader_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_serialize_state>(reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { ReaderSerializeState::new().build(reader_handle, scope) } + /// Builder for the `ReaderSerializeStateV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReaderSerializeStateV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'ReaderSerializeStateV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReaderSerializeStateV2Inst { + /// An instance of a fully built ReaderSerializeStateV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReaderSerializeStateV2 { /// Creates a new `ReaderSerializeStateV2`. @@ -81971,19 +99157,10 @@ impl ReaderSerializeStateV2 { } /// Builds the `ReaderSerializeStateV2` operation. - pub fn build>( - &self, - reader_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reader_handle.into(), scope) } - - fn build_impl( - &self, - reader_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReaderSerializeStateV2", |nd| { nd.add_input(reader_handle); for op in &self.control_inputs { @@ -81992,15 +99169,41 @@ impl ReaderSerializeStateV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReaderSerializeStateV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reader_handle.into(), scope) + } + fn build_instance_impl(&self, reader_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReaderSerializeStateV2", |nd| { + nd.add_input(reader_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ReaderSerializeStateV2Inst{op}) + } +} +impl ReaderSerializeStateV2Inst { + /// Returns the 'state' output of this 'ReaderSerializeStateV2' operation. + pub fn state(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReaderSerializeStateV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReaderSerializeStateV2::new().build(reader_handle, scope)`. -pub fn reader_serialize_state_v2>( - reader_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reader_serialize_state_v2>(reader_handle: O0, scope: &mut crate::Scope) -> crate::Result { ReaderSerializeStateV2::new().build(reader_handle, scope) } + /// Builder for the `Real` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Real { @@ -82008,6 +99211,12 @@ pub struct Real { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Real' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RealInst { + /// An instance of a fully built Real Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Real { /// Creates a new `Real`. @@ -82034,48 +99243,77 @@ impl Real { } /// Builds the `Real` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Real", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Real` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Real", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RealInst{op}) + } +} +impl RealInst { + /// Returns the 'output' output of this 'Real' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RealInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Real::new().build(input, scope)`. -pub fn real>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn real>(input: O0, scope: &mut crate::Scope) -> crate::Result { Real::new().build(input, scope) } + /// Builder for the `RealDiv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RealDiv { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RealDiv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RealDivInst { + /// An instance of a fully built RealDiv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RealDiv { /// Creates a new `RealDiv`. @@ -82096,49 +99334,61 @@ impl RealDiv { } /// Builds the `RealDiv` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RealDiv", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RealDiv` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RealDiv", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RealDivInst{op}) + } +} +impl RealDivInst { + /// Returns the 'z' output of this 'RealDiv' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RealDivInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RealDiv::new().build(x, y, scope)`. -pub fn real_div< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn real_div, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RealDiv::new().build(x, y, scope) } + /// Builder for the `RebatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RebatchDataset { @@ -82147,6 +99397,12 @@ pub struct RebatchDataset { use_fallback: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RebatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RebatchDatasetInst { + /// An instance of a fully built RebatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RebatchDataset { /// Creates a new `RebatchDataset`. @@ -82155,19 +99411,13 @@ impl RebatchDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -82185,55 +99435,73 @@ impl RebatchDataset { } /// Builds the `RebatchDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - num_replicas: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, num_replicas: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), num_replicas.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - num_replicas: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, num_replicas: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RebatchDataset", |nd| { nd.add_input(input_dataset); nd.add_input(num_replicas); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_fallback { - nd.set_attr_bool("use_fallback", *value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_fallback { + nd.set_attr_bool("use_fallback", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RebatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, num_replicas: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), num_replicas.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, num_replicas: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RebatchDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(num_replicas); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_fallback { + nd.set_attr_bool("use_fallback", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RebatchDatasetInst{op}) + } +} +impl RebatchDatasetInst { + /// Returns the 'handle' output of this 'RebatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RebatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RebatchDataset::new().build(input_dataset, num_replicas, scope)`. -pub fn rebatch_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - num_replicas: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rebatch_dataset, O1: ::std::convert::Into>(input_dataset: O0, num_replicas: O1, scope: &mut crate::Scope) -> crate::Result { RebatchDataset::new().build(input_dataset, num_replicas, scope) } + /// Builder for the `RebatchDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RebatchDatasetV2 { @@ -82241,6 +99509,12 @@ pub struct RebatchDatasetV2 { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RebatchDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RebatchDatasetV2Inst { + /// An instance of a fully built RebatchDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RebatchDatasetV2 { /// Creates a new `RebatchDatasetV2`. @@ -82249,19 +99523,13 @@ impl RebatchDatasetV2 { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -82273,32 +99541,10 @@ impl RebatchDatasetV2 { } /// Builds the `RebatchDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - batch_sizes: O1, - drop_remainder: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - batch_sizes.into(), - drop_remainder.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - batch_sizes: crate::Output, - drop_remainder: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, batch_sizes: O1, drop_remainder: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), batch_sizes.into(), drop_remainder.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, batch_sizes: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RebatchDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(batch_sizes); @@ -82306,36 +99552,70 @@ impl RebatchDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RebatchDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, batch_sizes: O1, drop_remainder: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), batch_sizes.into(), drop_remainder.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, batch_sizes: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RebatchDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(batch_sizes); + nd.add_input(drop_remainder); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RebatchDatasetV2Inst{op}) + } +} +impl RebatchDatasetV2Inst { + /// Returns the 'handle' output of this 'RebatchDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RebatchDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RebatchDatasetV2::new().build(input_dataset, batch_sizes, drop_remainder, scope)`. -pub fn rebatch_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - batch_sizes: O1, - drop_remainder: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rebatch_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, batch_sizes: O1, drop_remainder: O2, scope: &mut crate::Scope) -> crate::Result { RebatchDatasetV2::new().build(input_dataset, batch_sizes, drop_remainder, scope) } + /// Builder for the `Reciprocal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Reciprocal { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Reciprocal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReciprocalInst { + /// An instance of a fully built Reciprocal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Reciprocal { /// Creates a new `Reciprocal`. @@ -82356,45 +99636,71 @@ impl Reciprocal { } /// Builds the `Reciprocal` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Reciprocal", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Reciprocal` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Reciprocal", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReciprocalInst{op}) + } +} +impl ReciprocalInst { + /// Returns the 'y' output of this 'Reciprocal' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReciprocalInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Reciprocal::new().build(x, scope)`. -pub fn reciprocal>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reciprocal>(x: O0, scope: &mut crate::Scope) -> crate::Result { Reciprocal::new().build(x, scope) } + /// Builder for the `ReciprocalGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReciprocalGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ReciprocalGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReciprocalGradInst { + /// An instance of a fully built ReciprocalGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReciprocalGrad { /// Creates a new `ReciprocalGrad`. @@ -82415,49 +99721,61 @@ impl ReciprocalGrad { } /// Builds the `ReciprocalGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - y: O0, - dy: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(y.into(), dy.into(), scope) } - - fn build_impl( - &self, - y: crate::Output, - dy: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReciprocalGrad", |nd| { nd.add_input(y); nd.add_input(dy); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReciprocalGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(y.into(), dy.into(), scope) + } + fn build_instance_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReciprocalGrad", |nd| { + nd.add_input(y); + nd.add_input(dy); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReciprocalGradInst{op}) + } +} +impl ReciprocalGradInst { + /// Returns the 'z' output of this 'ReciprocalGrad' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReciprocalGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReciprocalGrad::new().build(y, dy, scope)`. -pub fn reciprocal_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - y: O0, - dy: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reciprocal_grad, O1: ::std::convert::Into>(y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { ReciprocalGrad::new().build(y, dy, scope) } + /// Builder for the `RecordInput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RecordInput { @@ -82470,6 +99788,12 @@ pub struct RecordInput { compression_type: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RecordInput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RecordInputInst { + /// An instance of a fully built RecordInput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RecordInput { /// Creates a new `RecordInput`. @@ -82478,10 +99802,7 @@ impl RecordInput { } /// Sets the `file_pattern` attribute. - pub fn file_pattern>( - mut self, - value: ArgType, - ) -> Self { + pub fn file_pattern>(mut self, value: ArgType) -> Self { self.file_pattern = ::std::option::Option::Some(value.into()); self } @@ -82493,10 +99814,7 @@ impl RecordInput { } /// Sets the `file_shuffle_shift_ratio` attribute. - pub fn file_shuffle_shift_ratio>( - mut self, - value: ArgType, - ) -> Self { + pub fn file_shuffle_shift_ratio>(mut self, value: ArgType) -> Self { self.file_shuffle_shift_ratio = ::std::option::Option::Some(value.into()); self } @@ -82520,10 +99838,7 @@ impl RecordInput { } /// Sets the `compression_type` attribute. - pub fn compression_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn compression_type>(mut self, value: ArgType) -> Self { self.compression_type = ::std::option::Option::Some(value.into()); self } @@ -82535,45 +99850,93 @@ impl RecordInput { } /// Builds the `RecordInput` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RecordInput", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.file_pattern { - nd.set_attr_string("file_pattern", value)?; - } - if let ::std::option::Option::Some(value) = &self.file_random_seed { - nd.set_attr_int("file_random_seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.file_shuffle_shift_ratio { - nd.set_attr_float("file_shuffle_shift_ratio", *value)?; - } - if let ::std::option::Option::Some(value) = &self.file_buffer_size { - nd.set_attr_int("file_buffer_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.file_parallelism { - nd.set_attr_int("file_parallelism", *value)?; - } - if let ::std::option::Option::Some(value) = &self.batch_size { - nd.set_attr_int("batch_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.compression_type { - nd.set_attr_string("compression_type", value)?; - } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.file_pattern { + nd.set_attr_string("file_pattern", value)?; + } + if let ::std::option::Option::Some(value) = &self.file_random_seed { + nd.set_attr_int("file_random_seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.file_shuffle_shift_ratio { + nd.set_attr_float("file_shuffle_shift_ratio", *value)?; + } + if let ::std::option::Option::Some(value) = &self.file_buffer_size { + nd.set_attr_int("file_buffer_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.file_parallelism { + nd.set_attr_int("file_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.batch_size { + nd.set_attr_int("batch_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.compression_type { + nd.set_attr_string("compression_type", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `RecordInput` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RecordInput", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.file_pattern { + nd.set_attr_string("file_pattern", value)?; + } + if let ::std::option::Option::Some(value) = &self.file_random_seed { + nd.set_attr_int("file_random_seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.file_shuffle_shift_ratio { + nd.set_attr_float("file_shuffle_shift_ratio", *value)?; + } + if let ::std::option::Option::Some(value) = &self.file_buffer_size { + nd.set_attr_int("file_buffer_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.file_parallelism { + nd.set_attr_int("file_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.batch_size { + nd.set_attr_int("batch_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.compression_type { + nd.set_attr_string("compression_type", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RecordInputInst{op}) + } +} +impl RecordInputInst { + /// Returns the 'records' output of this 'RecordInput' operation. + pub fn records(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RecordInputInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `RecordInput::new().build(scope)`. -pub fn record_input(scope: &mut crate::Scope) -> crate::Result { +pub fn record_input<>(scope: &mut crate::Scope) -> crate::Result { RecordInput::new().build(scope) } + /// Builder for the `Recv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Recv { @@ -82585,6 +99948,12 @@ pub struct Recv { client_terminated: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Recv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RecvInst { + /// An instance of a fully built Recv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Recv { /// Creates a new `Recv`. @@ -82593,55 +99962,37 @@ impl Recv { } /// Sets the `tensor_type` attribute. - pub fn tensor_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_type>(mut self, value: ArgType) -> Self { self.tensor_type = ::std::option::Option::Some(value.into()); self } /// Sets the `tensor_name` attribute. - pub fn tensor_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_name>(mut self, value: ArgType) -> Self { self.tensor_name = ::std::option::Option::Some(value.into()); self } /// Sets the `send_device` attribute. - pub fn send_device>( - mut self, - value: ArgType, - ) -> Self { + pub fn send_device>(mut self, value: ArgType) -> Self { self.send_device = ::std::option::Option::Some(value.into()); self } /// Sets the `send_device_incarnation` attribute. - pub fn send_device_incarnation>( - mut self, - value: ArgType, - ) -> Self { + pub fn send_device_incarnation>(mut self, value: ArgType) -> Self { self.send_device_incarnation = ::std::option::Option::Some(value.into()); self } /// Sets the `recv_device` attribute. - pub fn recv_device>( - mut self, - value: ArgType, - ) -> Self { + pub fn recv_device>(mut self, value: ArgType) -> Self { self.recv_device = ::std::option::Option::Some(value.into()); self } /// Sets the `client_terminated` attribute. - pub fn client_terminated>( - mut self, - value: ArgType, - ) -> Self { + pub fn client_terminated>(mut self, value: ArgType) -> Self { self.client_terminated = ::std::option::Option::Some(value.into()); self } @@ -82653,42 +100004,87 @@ impl Recv { } /// Builds the `Recv` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Recv", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.tensor_type { - nd.set_attr_type("tensor_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_name { - nd.set_attr_string("tensor_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.send_device { - nd.set_attr_string("send_device", value)?; - } - if let ::std::option::Option::Some(value) = &self.send_device_incarnation { - nd.set_attr_int("send_device_incarnation", *value)?; - } - if let ::std::option::Option::Some(value) = &self.recv_device { - nd.set_attr_string("recv_device", value)?; - } - if let ::std::option::Option::Some(value) = &self.client_terminated { - nd.set_attr_bool("client_terminated", *value)?; - } + if let ::std::option::Option::Some(value) = &self.tensor_type { + nd.set_attr_type("tensor_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.send_device { + nd.set_attr_string("send_device", value)?; + } + if let ::std::option::Option::Some(value) = &self.send_device_incarnation { + nd.set_attr_int("send_device_incarnation", *value)?; + } + if let ::std::option::Option::Some(value) = &self.recv_device { + nd.set_attr_string("recv_device", value)?; + } + if let ::std::option::Option::Some(value) = &self.client_terminated { + nd.set_attr_bool("client_terminated", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Recv` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Recv", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.tensor_type { + nd.set_attr_type("tensor_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.send_device { + nd.set_attr_string("send_device", value)?; + } + if let ::std::option::Option::Some(value) = &self.send_device_incarnation { + nd.set_attr_int("send_device_incarnation", *value)?; + } + if let ::std::option::Option::Some(value) = &self.recv_device { + nd.set_attr_string("recv_device", value)?; + } + if let ::std::option::Option::Some(value) = &self.client_terminated { + nd.set_attr_bool("client_terminated", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RecvInst{op}) + } +} +impl RecvInst { + /// Returns the 'tensor' output of this 'Recv' operation. + pub fn tensor(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RecvInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Recv::new().build(scope)`. -pub fn recv(scope: &mut crate::Scope) -> crate::Result { +pub fn recv<>(scope: &mut crate::Scope) -> crate::Result { Recv::new().build(scope) } + /// Builder for the `RecvTPUEmbeddingActivations` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RecvTPUEmbeddingActivations { @@ -82696,6 +100092,12 @@ pub struct RecvTPUEmbeddingActivations { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RecvTPUEmbeddingActivations' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RecvTPUEmbeddingActivationsInst { + /// An instance of a fully built RecvTPUEmbeddingActivations Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RecvTPUEmbeddingActivations { /// Creates a new `RecvTPUEmbeddingActivations`. @@ -82710,10 +100112,7 @@ impl RecvTPUEmbeddingActivations { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -82725,30 +100124,68 @@ impl RecvTPUEmbeddingActivations { } /// Builds the `RecvTPUEmbeddingActivations` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RecvTPUEmbeddingActivations", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_outputs { - nd.set_attr_int("num_outputs", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.num_outputs { + nd.set_attr_int("num_outputs", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RecvTPUEmbeddingActivations` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RecvTPUEmbeddingActivations", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_outputs { + nd.set_attr_int("num_outputs", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RecvTPUEmbeddingActivationsInst{op}) + } +} +impl RecvTPUEmbeddingActivationsInst { + /// Returns a Vector of Outputs for 'outputs' output of this RecvTPUEmbeddingActivations operation. + pub fn outputs(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_outputs")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for RecvTPUEmbeddingActivationsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RecvTPUEmbeddingActivations::new().build(scope)`. -pub fn recv_tpuembedding_activations(scope: &mut crate::Scope) -> crate::Result { +pub fn recv_tpuembedding_activations<>(scope: &mut crate::Scope) -> crate::Result { RecvTPUEmbeddingActivations::new().build(scope) } + /// Builder for the `ReduceDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReduceDataset { @@ -82761,6 +100198,12 @@ pub struct ReduceDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ReduceDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReduceDatasetInst { + /// An instance of a fully built ReduceDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReduceDataset { /// Creates a new `ReduceDataset`. @@ -82769,64 +100212,43 @@ impl ReduceDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Tstate` attribute. - pub fn Tstate>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tstate>>(mut self, value: ArgType) -> Self { self.Tstate = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `use_inter_op_parallelism` attribute. - pub fn use_inter_op_parallelism>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_inter_op_parallelism>(mut self, value: ArgType) -> Self { self.use_inter_op_parallelism = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -82838,32 +100260,10 @@ impl ReduceDataset { } /// Builds the `ReduceDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - initial_state: O1, - other_arguments: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - initial_state.into(), - other_arguments.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - initial_state: crate::Output, - other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, initial_state: O1, other_arguments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), initial_state.into(), other_arguments.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, initial_state: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReduceDataset", |nd| { nd.add_input(input_dataset); nd.add_input(initial_state); @@ -82871,45 +100271,88 @@ impl ReduceDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tstate { - nd.set_attr_type_list("Tstate", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { - nd.set_attr_bool("use_inter_op_parallelism", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tstate { + nd.set_attr_type_list("Tstate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { + nd.set_attr_bool("use_inter_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReduceDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, initial_state: O1, other_arguments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), initial_state.into(), other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, initial_state: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReduceDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(initial_state); + nd.add_input(other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tstate { + nd.set_attr_type_list("Tstate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_inter_op_parallelism { + nd.set_attr_bool("use_inter_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReduceDatasetInst{op}) + } +} +impl ReduceDatasetInst { + /// Returns the 'components' output of this 'ReduceDataset' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReduceDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReduceDataset::new().build(input_dataset, initial_state, other_arguments, scope)`. -pub fn reduce_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - initial_state: O1, - other_arguments: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reduce_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, initial_state: O1, other_arguments: O2, scope: &mut crate::Scope) -> crate::Result { ReduceDataset::new().build(input_dataset, initial_state, other_arguments, scope) } + /// Builder for the `ReduceJoin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReduceJoin { @@ -82917,6 +100360,12 @@ pub struct ReduceJoin { separator: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ReduceJoin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReduceJoinInst { + /// An instance of a fully built ReduceJoin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReduceJoin { /// Creates a new `ReduceJoin`. @@ -82931,10 +100380,7 @@ impl ReduceJoin { } /// Sets the `separator` attribute. - pub fn separator>( - mut self, - value: ArgType, - ) -> Self { + pub fn separator>(mut self, value: ArgType) -> Self { self.separator = ::std::option::Option::Some(value.into()); self } @@ -82946,52 +100392,67 @@ impl ReduceJoin { } /// Builds the `ReduceJoin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - inputs: O0, - reduction_indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, inputs: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), reduction_indices.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - reduction_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReduceJoin", |nd| { nd.add_input(inputs); nd.add_input(reduction_indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.separator { - nd.set_attr_string("separator", value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.separator { + nd.set_attr_string("separator", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReduceJoin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, inputs: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), reduction_indices.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReduceJoin", |nd| { + nd.add_input(inputs); + nd.add_input(reduction_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.separator { + nd.set_attr_string("separator", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReduceJoinInst{op}) + } +} +impl ReduceJoinInst { + /// Returns the 'output' output of this 'ReduceJoin' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReduceJoinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReduceJoin::new().build(inputs, reduction_indices, scope)`. -pub fn reduce_join< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - inputs: O0, - reduction_indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reduce_join, O1: ::std::convert::Into>(inputs: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { ReduceJoin::new().build(inputs, reduction_indices, scope) } + /// Builder for the `RefEnter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RefEnter { @@ -83001,6 +100462,12 @@ pub struct RefEnter { parallel_iterations: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RefEnter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RefEnterInst { + /// An instance of a fully built RefEnter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RefEnter { /// Creates a new `RefEnter`. @@ -83015,10 +100482,7 @@ impl RefEnter { } /// Sets the `frame_name` attribute. - pub fn frame_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn frame_name>(mut self, value: ArgType) -> Self { self.frame_name = ::std::option::Option::Some(value.into()); self } @@ -83030,10 +100494,7 @@ impl RefEnter { } /// Sets the `parallel_iterations` attribute. - pub fn parallel_iterations>( - mut self, - value: ArgType, - ) -> Self { + pub fn parallel_iterations>(mut self, value: ArgType) -> Self { self.parallel_iterations = ::std::option::Option::Some(value.into()); self } @@ -83045,54 +100506,89 @@ impl RefEnter { } /// Builds the `RefEnter` operation. - pub fn build>( - &self, - data: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RefEnter", |nd| { nd.add_input(data); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.frame_name { - nd.set_attr_string("frame_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_constant { - nd.set_attr_bool("is_constant", *value)?; - } - if let ::std::option::Option::Some(value) = &self.parallel_iterations { - nd.set_attr_int("parallel_iterations", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.frame_name { + nd.set_attr_string("frame_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_constant { + nd.set_attr_bool("is_constant", *value)?; + } + if let ::std::option::Option::Some(value) = &self.parallel_iterations { + nd.set_attr_int("parallel_iterations", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RefEnter` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RefEnter", |nd| { + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.frame_name { + nd.set_attr_string("frame_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_constant { + nd.set_attr_bool("is_constant", *value)?; + } + if let ::std::option::Option::Some(value) = &self.parallel_iterations { + nd.set_attr_int("parallel_iterations", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RefEnterInst{op}) + } +} +impl RefEnterInst { + /// Returns the 'output' output of this 'RefEnter' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RefEnterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RefEnter::new().build(data, scope)`. -pub fn ref_enter>( - data: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ref_enter>(data: O0, scope: &mut crate::Scope) -> crate::Result { RefEnter::new().build(data, scope) } + /// Builder for the `RefExit` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RefExit { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RefExit' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RefExitInst { + /// An instance of a fully built RefExit Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RefExit { /// Creates a new `RefExit`. @@ -83113,45 +100609,71 @@ impl RefExit { } /// Builds the `RefExit` operation. - pub fn build>( - &self, - data: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RefExit", |nd| { nd.add_input(data); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RefExit` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RefExit", |nd| { + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RefExitInst{op}) + } +} +impl RefExitInst { + /// Returns the 'output' output of this 'RefExit' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RefExitInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RefExit::new().build(data, scope)`. -pub fn ref_exit>( - data: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ref_exit>(data: O0, scope: &mut crate::Scope) -> crate::Result { RefExit::new().build(data, scope) } + /// Builder for the `RefIdentity` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RefIdentity { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RefIdentity' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RefIdentityInst { + /// An instance of a fully built RefIdentity Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RefIdentity { /// Creates a new `RefIdentity`. @@ -83172,39 +100694,59 @@ impl RefIdentity { } /// Builds the `RefIdentity` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RefIdentity", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RefIdentity` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RefIdentity", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RefIdentityInst{op}) + } +} +impl RefIdentityInst { + /// Returns the 'output' output of this 'RefIdentity' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RefIdentityInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RefIdentity::new().build(input, scope)`. -pub fn ref_identity>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ref_identity>(input: O0, scope: &mut crate::Scope) -> crate::Result { RefIdentity::new().build(input, scope) } + /// Builder for the `RefMerge` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RefMerge { @@ -83212,6 +100754,12 @@ pub struct RefMerge { N: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RefMerge' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RefMergeInst { + /// An instance of a fully built RefMerge Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RefMerge { /// Creates a new `RefMerge`. @@ -83238,48 +100786,84 @@ impl RefMerge { } /// Builds the `RefMerge` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RefMerge", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RefMerge` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RefMerge", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RefMergeInst{op}) + } +} +impl RefMergeInst { + /// Returns the 'output' output of this 'RefMerge' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'value_index' output of this 'RefMerge' operation. + pub fn value_index(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for RefMergeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RefMerge::new().build(inputs, scope)`. -pub fn ref_merge>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ref_merge>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { RefMerge::new().build(inputs, scope) } + /// Builder for the `RefNextIteration` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RefNextIteration { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RefNextIteration' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RefNextIterationInst { + /// An instance of a fully built RefNextIteration Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RefNextIteration { /// Creates a new `RefNextIteration`. @@ -83300,39 +100884,59 @@ impl RefNextIteration { } /// Builds the `RefNextIteration` operation. - pub fn build>( - &self, - data: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RefNextIteration", |nd| { nd.add_input(data); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RefNextIteration` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, data: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RefNextIteration", |nd| { + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RefNextIterationInst{op}) + } +} +impl RefNextIterationInst { + /// Returns the 'output' output of this 'RefNextIteration' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RefNextIterationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RefNextIteration::new().build(data, scope)`. -pub fn ref_next_iteration>( - data: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ref_next_iteration>(data: O0, scope: &mut crate::Scope) -> crate::Result { RefNextIteration::new().build(data, scope) } + /// Builder for the `RefSelect` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RefSelect { @@ -83340,6 +100944,12 @@ pub struct RefSelect { N: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RefSelect' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RefSelectInst { + /// An instance of a fully built RefSelect Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RefSelect { /// Creates a new `RefSelect`. @@ -83366,58 +100976,79 @@ impl RefSelect { } /// Builds the `RefSelect` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - index: O0, - inputs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, index: O0, inputs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(index.into(), inputs.into(), scope) } - - fn build_impl( - &self, - index: crate::Output, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, index: crate::Output, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RefSelect", |nd| { nd.add_input(index); nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RefSelect` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, index: O0, inputs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(index.into(), inputs.into(), scope) + } + fn build_instance_impl(&self, index: crate::Output, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RefSelect", |nd| { + nd.add_input(index); + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RefSelectInst{op}) + } +} +impl RefSelectInst { + /// Returns the 'output' output of this 'RefSelect' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RefSelectInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RefSelect::new().build(index, inputs, scope)`. -pub fn ref_select< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - index: O0, - inputs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ref_select, O1: ::std::convert::Into>(index: O0, inputs: O1, scope: &mut crate::Scope) -> crate::Result { RefSelect::new().build(index, inputs, scope) } + /// Builder for the `RefSwitch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RefSwitch { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RefSwitch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RefSwitchInst { + /// An instance of a fully built RefSwitch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RefSwitch { /// Creates a new `RefSwitch`. @@ -83438,54 +101069,79 @@ impl RefSwitch { } /// Builds the `RefSwitch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - data: O0, - pred: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, data: O0, pred: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), pred.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - pred: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, pred: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RefSwitch", |nd| { nd.add_input(data); nd.add_input(pred); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RefSwitch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, data: O0, pred: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), pred.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, pred: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RefSwitch", |nd| { + nd.add_input(data); + nd.add_input(pred); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RefSwitchInst{op}) + } +} +impl RefSwitchInst { + /// Returns the 'output_false' output of this 'RefSwitch' operation. + pub fn output_false(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_true' output of this 'RefSwitch' operation. + pub fn output_true(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for RefSwitchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RefSwitch::new().build(data, pred, scope)`. -pub fn ref_switch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - data: O0, - pred: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn ref_switch, O1: ::std::convert::Into>(data: O0, pred: O1, scope: &mut crate::Scope) -> crate::Result { RefSwitch::new().build(data, pred, scope) } + /// Builder for the `RegexFullMatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RegexFullMatch { control_inputs: ::std::vec::Vec, } +/// An instance of 'RegexFullMatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RegexFullMatchInst { + /// An instance of a fully built RegexFullMatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RegexFullMatch { /// Creates a new `RegexFullMatch`. @@ -83500,24 +101156,10 @@ impl RegexFullMatch { } /// Builds the `RegexFullMatch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - pattern: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, pattern: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), pattern.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - pattern: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, pattern: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RegexFullMatch", |nd| { nd.add_input(input); nd.add_input(pattern); @@ -83527,25 +101169,54 @@ impl RegexFullMatch { ::std::result::Result::Ok(()) }) } -} + /// Builds the `RegexFullMatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, pattern: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), pattern.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, pattern: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RegexFullMatch", |nd| { + nd.add_input(input); + nd.add_input(pattern); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(RegexFullMatchInst{op}) + } +} +impl RegexFullMatchInst { + /// Returns the 'output' output of this 'RegexFullMatch' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RegexFullMatchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RegexFullMatch::new().build(input, pattern, scope)`. -pub fn regex_full_match< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - pattern: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn regex_full_match, O1: ::std::convert::Into>(input: O0, pattern: O1, scope: &mut crate::Scope) -> crate::Result { RegexFullMatch::new().build(input, pattern, scope) } + /// Builder for the `RegexReplace` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RegexReplace { replace_global: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RegexReplace' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RegexReplaceInst { + /// An instance of a fully built RegexReplace Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RegexReplace { /// Creates a new `RegexReplace`. @@ -83566,27 +101237,10 @@ impl RegexReplace { } /// Builds the `RegexReplace` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - pattern: O1, - rewrite: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, pattern: O1, rewrite: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), pattern.into(), rewrite.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - pattern: crate::Output, - rewrite: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, pattern: crate::Output, rewrite: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RegexReplace", |nd| { nd.add_input(input); nd.add_input(pattern); @@ -83594,27 +101248,52 @@ impl RegexReplace { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.replace_global { - nd.set_attr_bool("replace_global", *value)?; - } + if let ::std::option::Option::Some(value) = &self.replace_global { + nd.set_attr_bool("replace_global", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RegexReplace` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, pattern: O1, rewrite: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), pattern.into(), rewrite.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, pattern: crate::Output, rewrite: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RegexReplace", |nd| { + nd.add_input(input); + nd.add_input(pattern); + nd.add_input(rewrite); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.replace_global { + nd.set_attr_bool("replace_global", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RegexReplaceInst{op}) + } +} +impl RegexReplaceInst { + /// Returns the 'output' output of this 'RegexReplace' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RegexReplaceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RegexReplace::new().build(input, pattern, rewrite, scope)`. -pub fn regex_replace< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - pattern: O1, - rewrite: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn regex_replace, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, pattern: O1, rewrite: O2, scope: &mut crate::Scope) -> crate::Result { RegexReplace::new().build(input, pattern, rewrite, scope) } + /// Builder for the `RegisterDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RegisterDataset { @@ -83623,6 +101302,12 @@ pub struct RegisterDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RegisterDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RegisterDatasetInst { + /// An instance of a fully built RegisterDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RegisterDataset { /// Creates a new `RegisterDataset`. @@ -83631,28 +101316,19 @@ impl RegisterDataset { } /// Sets the `external_state_policy` attribute. - pub fn external_state_policy>( - mut self, - value: ArgType, - ) -> Self { + pub fn external_state_policy>(mut self, value: ArgType) -> Self { self.external_state_policy = ::std::option::Option::Some(value.into()); self } /// Sets the `element_spec` attribute. - pub fn element_spec>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_spec>(mut self, value: ArgType) -> Self { self.element_spec = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -83664,27 +101340,10 @@ impl RegisterDataset { } /// Builds the `RegisterDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - dataset: O0, - address: O1, - protocol: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, dataset: O0, address: O1, protocol: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(dataset.into(), address.into(), protocol.into(), scope) } - - fn build_impl( - &self, - dataset: crate::Output, - address: crate::Output, - protocol: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, dataset: crate::Output, address: crate::Output, protocol: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RegisterDataset", |nd| { nd.add_input(dataset); nd.add_input(address); @@ -83692,39 +101351,76 @@ impl RegisterDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.external_state_policy { - nd.set_attr_int("external_state_policy", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_spec { - nd.set_attr_string("element_spec", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.external_state_policy { + nd.set_attr_int("external_state_policy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_spec { + nd.set_attr_string("element_spec", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RegisterDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, dataset: O0, address: O1, protocol: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dataset.into(), address.into(), protocol.into(), scope) + } + fn build_instance_impl(&self, dataset: crate::Output, address: crate::Output, protocol: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RegisterDataset", |nd| { + nd.add_input(dataset); + nd.add_input(address); + nd.add_input(protocol); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.external_state_policy { + nd.set_attr_int("external_state_policy", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_spec { + nd.set_attr_string("element_spec", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RegisterDatasetInst{op}) + } +} +impl RegisterDatasetInst { + /// Returns the 'dataset_id' output of this 'RegisterDataset' operation. + pub fn dataset_id(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RegisterDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RegisterDataset::new().build(dataset, address, protocol, scope)`. -pub fn register_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - dataset: O0, - address: O1, - protocol: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn register_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(dataset: O0, address: O1, protocol: O2, scope: &mut crate::Scope) -> crate::Result { RegisterDataset::new().build(dataset, address, protocol, scope) } + /// Builder for the `Relu` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Relu { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Relu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReluInst { + /// An instance of a fully built Relu Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Relu { /// Creates a new `Relu`. @@ -83745,45 +101441,71 @@ impl Relu { } /// Builds the `Relu` operation. - pub fn build>( - &self, - features: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(features.into(), scope) } - - fn build_impl( - &self, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Relu", |nd| { nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Relu` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Relu", |nd| { + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReluInst{op}) + } +} +impl ReluInst { + /// Returns the 'activations' output of this 'Relu' operation. + pub fn activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReluInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Relu::new().build(features, scope)`. -pub fn relu>( - features: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn relu>(features: O0, scope: &mut crate::Scope) -> crate::Result { Relu::new().build(features, scope) } + /// Builder for the `Relu6` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Relu6 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Relu6' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Relu6Inst { + /// An instance of a fully built Relu6 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Relu6 { /// Creates a new `Relu6`. @@ -83804,45 +101526,71 @@ impl Relu6 { } /// Builds the `Relu6` operation. - pub fn build>( - &self, - features: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(features.into(), scope) } - - fn build_impl( - &self, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Relu6", |nd| { nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Relu6` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Relu6", |nd| { + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Relu6Inst{op}) + } +} +impl Relu6Inst { + /// Returns the 'activations' output of this 'Relu6' operation. + pub fn activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Relu6Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Relu6::new().build(features, scope)`. -pub fn relu6>( - features: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn relu6>(features: O0, scope: &mut crate::Scope) -> crate::Result { Relu6::new().build(features, scope) } + /// Builder for the `Relu6Grad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Relu6Grad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Relu6Grad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Relu6GradInst { + /// An instance of a fully built Relu6Grad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Relu6Grad { /// Creates a new `Relu6Grad`. @@ -83863,55 +101611,73 @@ impl Relu6Grad { } /// Builds the `Relu6Grad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - gradients: O0, - features: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(gradients.into(), features.into(), scope) } - - fn build_impl( - &self, - gradients: crate::Output, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, gradients: crate::Output, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Relu6Grad", |nd| { nd.add_input(gradients); nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Relu6Grad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), features.into(), scope) + } + fn build_instance_impl(&self, gradients: crate::Output, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Relu6Grad", |nd| { + nd.add_input(gradients); + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Relu6GradInst{op}) + } +} +impl Relu6GradInst { + /// Returns the 'backprops' output of this 'Relu6Grad' operation. + pub fn backprops(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Relu6GradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Relu6Grad::new().build(gradients, features, scope)`. -pub fn relu6_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - gradients: O0, - features: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn relu6_grad, O1: ::std::convert::Into>(gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { Relu6Grad::new().build(gradients, features, scope) } + /// Builder for the `ReluGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReluGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ReluGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReluGradInst { + /// An instance of a fully built ReluGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReluGrad { /// Creates a new `ReluGrad`. @@ -83932,49 +101698,61 @@ impl ReluGrad { } /// Builds the `ReluGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - gradients: O0, - features: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(gradients.into(), features.into(), scope) } - - fn build_impl( - &self, - gradients: crate::Output, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, gradients: crate::Output, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReluGrad", |nd| { nd.add_input(gradients); nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReluGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), features.into(), scope) + } + fn build_instance_impl(&self, gradients: crate::Output, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReluGrad", |nd| { + nd.add_input(gradients); + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReluGradInst{op}) + } +} +impl ReluGradInst { + /// Returns the 'backprops' output of this 'ReluGrad' operation. + pub fn backprops(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReluGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReluGrad::new().build(gradients, features, scope)`. -pub fn relu_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - gradients: O0, - features: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn relu_grad, O1: ::std::convert::Into>(gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { ReluGrad::new().build(gradients, features, scope) } + /// Builder for the `RemoteCall` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RemoteCall { @@ -83983,6 +101761,12 @@ pub struct RemoteCall { f: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RemoteCall' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RemoteCallInst { + /// An instance of a fully built RemoteCall Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RemoteCall { /// Creates a new `RemoteCall`. @@ -83991,28 +101775,19 @@ impl RemoteCall { } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } @@ -84024,55 +101799,73 @@ impl RemoteCall { } /// Builds the `RemoteCall` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - target: O0, - args: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, target: O0, args: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(target.into(), args.into(), scope) } - - fn build_impl( - &self, - target: crate::Output, - args: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, target: crate::Output, args: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RemoteCall", |nd| { nd.add_input(target); nd.add_input(args); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RemoteCall` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, target: O0, args: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(target.into(), args.into(), scope) + } + fn build_instance_impl(&self, target: crate::Output, args: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RemoteCall", |nd| { + nd.add_input(target); + nd.add_input(args); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RemoteCallInst{op}) + } +} +impl RemoteCallInst { + /// Returns the 'output' output of this 'RemoteCall' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RemoteCallInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RemoteCall::new().build(target, args, scope)`. -pub fn remote_call< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - target: O0, - args: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn remote_call, O1: ::std::convert::Into>(target: O0, args: O1, scope: &mut crate::Scope) -> crate::Result { RemoteCall::new().build(target, args, scope) } + /// Builder for the `RepeatDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RepeatDataset { @@ -84081,6 +101874,12 @@ pub struct RepeatDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RepeatDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RepeatDatasetInst { + /// An instance of a fully built RepeatDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RepeatDataset { /// Creates a new `RepeatDataset`. @@ -84089,28 +101888,19 @@ impl RepeatDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -84122,61 +101912,85 @@ impl RepeatDataset { } /// Builds the `RepeatDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - count: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, count: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), count.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - count: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, count: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RepeatDataset", |nd| { nd.add_input(input_dataset); nd.add_input(count); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RepeatDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, count: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), count.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, count: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RepeatDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(count); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RepeatDatasetInst{op}) + } +} +impl RepeatDatasetInst { + /// Returns the 'handle' output of this 'RepeatDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RepeatDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RepeatDataset::new().build(input_dataset, count, scope)`. -pub fn repeat_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - count: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn repeat_dataset, O1: ::std::convert::Into>(input_dataset: O0, count: O1, scope: &mut crate::Scope) -> crate::Result { RepeatDataset::new().build(input_dataset, count, scope) } + /// Builder for the `RequantizationRange` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RequantizationRange { Tinput: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RequantizationRange' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RequantizationRangeInst { + /// An instance of a fully built RequantizationRange Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RequantizationRange { /// Creates a new `RequantizationRange`. @@ -84185,10 +101999,7 @@ impl RequantizationRange { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } @@ -84200,27 +102011,10 @@ impl RequantizationRange { } /// Builds the `RequantizationRange` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - input_min: O1, - input_max: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), input_min.into(), input_max.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - input_min: crate::Output, - input_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RequantizationRange", |nd| { nd.add_input(input); nd.add_input(input_min); @@ -84228,27 +102022,59 @@ impl RequantizationRange { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RequantizationRange` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_min.into(), input_max.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RequantizationRange", |nd| { + nd.add_input(input); + nd.add_input(input_min); + nd.add_input(input_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RequantizationRangeInst{op}) + } +} +impl RequantizationRangeInst { + /// Returns the 'output_min' output of this 'RequantizationRange' operation. + pub fn output_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_max' output of this 'RequantizationRange' operation. + pub fn output_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for RequantizationRangeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RequantizationRange::new().build(input, input_min, input_max, scope)`. -pub fn requantization_range< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - input_min: O1, - input_max: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn requantization_range, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { RequantizationRange::new().build(input, input_min, input_max, scope) } + /// Builder for the `RequantizationRangePerChannel` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RequantizationRangePerChannel { @@ -84256,6 +102082,12 @@ pub struct RequantizationRangePerChannel { clip_value_max: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RequantizationRangePerChannel' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RequantizationRangePerChannelInst { + /// An instance of a fully built RequantizationRangePerChannel Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RequantizationRangePerChannel { /// Creates a new `RequantizationRangePerChannel`. @@ -84282,27 +102114,10 @@ impl RequantizationRangePerChannel { } /// Builds the `RequantizationRangePerChannel` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - input_min: O1, - input_max: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), input_min.into(), input_max.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - input_min: crate::Output, - input_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RequantizationRangePerChannel", |nd| { nd.add_input(input); nd.add_input(input_min); @@ -84310,30 +102125,65 @@ impl RequantizationRangePerChannel { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.clip_value_max { - nd.set_attr_float("clip_value_max", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.clip_value_max { + nd.set_attr_float("clip_value_max", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RequantizationRangePerChannel` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_min.into(), input_max.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RequantizationRangePerChannel", |nd| { + nd.add_input(input); + nd.add_input(input_min); + nd.add_input(input_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.clip_value_max { + nd.set_attr_float("clip_value_max", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RequantizationRangePerChannelInst{op}) + } +} +impl RequantizationRangePerChannelInst { + /// Returns the 'output_min' output of this 'RequantizationRangePerChannel' operation. + pub fn output_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_max' output of this 'RequantizationRangePerChannel' operation. + pub fn output_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for RequantizationRangePerChannelInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RequantizationRangePerChannel::new().build(input, input_min, input_max, scope)`. -pub fn requantization_range_per_channel< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - input_min: O1, - input_max: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn requantization_range_per_channel, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, input_min: O1, input_max: O2, scope: &mut crate::Scope) -> crate::Result { RequantizationRangePerChannel::new().build(input, input_min, input_max, scope) } + /// Builder for the `Requantize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Requantize { @@ -84341,6 +102191,12 @@ pub struct Requantize { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Requantize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RequantizeInst { + /// An instance of a fully built Requantize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Requantize { /// Creates a new `Requantize`. @@ -84349,19 +102205,13 @@ impl Requantize { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -84373,40 +102223,10 @@ impl Requantize { } /// Builds the `Requantize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input: O0, - input_min: O1, - input_max: O2, - requested_output_min: O3, - requested_output_max: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - input_min.into(), - input_max.into(), - requested_output_min.into(), - requested_output_max.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - input_min: crate::Output, - input_max: crate::Output, - requested_output_min: crate::Output, - requested_output_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, requested_output_min: O3, requested_output_max: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), input_min.into(), input_max.into(), requested_output_min.into(), requested_output_max.into(), scope) + } + fn build_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, requested_output_min: crate::Output, requested_output_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Requantize", |nd| { nd.add_input(input); nd.add_input(input_min); @@ -84416,41 +102236,74 @@ impl Requantize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Requantize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, requested_output_min: O3, requested_output_max: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_min.into(), input_max.into(), requested_output_min.into(), requested_output_max.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, requested_output_min: crate::Output, requested_output_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Requantize", |nd| { + nd.add_input(input); + nd.add_input(input_min); + nd.add_input(input_max); + nd.add_input(requested_output_min); + nd.add_input(requested_output_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RequantizeInst{op}) + } +} +impl RequantizeInst { + /// Returns the 'output' output of this 'Requantize' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_min' output of this 'Requantize' operation. + pub fn output_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_max' output of this 'Requantize' operation. + pub fn output_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for RequantizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Requantize::new().build(input, input_min, input_max, requested_output_min, requested_output_max, scope)`. -pub fn requantize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input: O0, - input_min: O1, - input_max: O2, - requested_output_min: O3, - requested_output_max: O4, - scope: &mut crate::Scope, -) -> crate::Result { - Requantize::new().build( - input, - input_min, - input_max, - requested_output_min, - requested_output_max, - scope, - ) +pub fn requantize, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input: O0, input_min: O1, input_max: O2, requested_output_min: O3, requested_output_max: O4, scope: &mut crate::Scope) -> crate::Result { + Requantize::new().build(input, input_min, input_max, requested_output_min, requested_output_max, scope) } + /// Builder for the `RequantizePerChannel` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RequantizePerChannel { @@ -84458,6 +102311,12 @@ pub struct RequantizePerChannel { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RequantizePerChannel' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RequantizePerChannelInst { + /// An instance of a fully built RequantizePerChannel Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RequantizePerChannel { /// Creates a new `RequantizePerChannel`. @@ -84472,10 +102331,7 @@ impl RequantizePerChannel { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -84487,40 +102343,10 @@ impl RequantizePerChannel { } /// Builds the `RequantizePerChannel` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input: O0, - input_min: O1, - input_max: O2, - requested_output_min: O3, - requested_output_max: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - input_min.into(), - input_max.into(), - requested_output_min.into(), - requested_output_max.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - input_min: crate::Output, - input_max: crate::Output, - requested_output_min: crate::Output, - requested_output_max: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, requested_output_min: O3, requested_output_max: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), input_min.into(), input_max.into(), requested_output_min.into(), requested_output_max.into(), scope) + } + fn build_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, requested_output_min: crate::Output, requested_output_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RequantizePerChannel", |nd| { nd.add_input(input); nd.add_input(input_min); @@ -84530,41 +102356,74 @@ impl RequantizePerChannel { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RequantizePerChannel` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, input_min: O1, input_max: O2, requested_output_min: O3, requested_output_max: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), input_min.into(), input_max.into(), requested_output_min.into(), requested_output_max.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, input_min: crate::Output, input_max: crate::Output, requested_output_min: crate::Output, requested_output_max: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RequantizePerChannel", |nd| { + nd.add_input(input); + nd.add_input(input_min); + nd.add_input(input_max); + nd.add_input(requested_output_min); + nd.add_input(requested_output_max); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RequantizePerChannelInst{op}) + } +} +impl RequantizePerChannelInst { + /// Returns the 'output' output of this 'RequantizePerChannel' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_min' output of this 'RequantizePerChannel' operation. + pub fn output_min(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_max' output of this 'RequantizePerChannel' operation. + pub fn output_max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for RequantizePerChannelInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RequantizePerChannel::new().build(input, input_min, input_max, requested_output_min, requested_output_max, scope)`. -pub fn requantize_per_channel< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input: O0, - input_min: O1, - input_max: O2, - requested_output_min: O3, - requested_output_max: O4, - scope: &mut crate::Scope, -) -> crate::Result { - RequantizePerChannel::new().build( - input, - input_min, - input_max, - requested_output_min, - requested_output_max, - scope, - ) +pub fn requantize_per_channel, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input: O0, input_min: O1, input_max: O2, requested_output_min: O3, requested_output_max: O4, scope: &mut crate::Scope) -> crate::Result { + RequantizePerChannel::new().build(input, input_min, input_max, requested_output_min, requested_output_max, scope) } + /// Builder for the `Reshape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Reshape { @@ -84572,6 +102431,12 @@ pub struct Reshape { Tshape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Reshape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReshapeInst { + /// An instance of a fully built Reshape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Reshape { /// Creates a new `Reshape`. @@ -84586,10 +102451,7 @@ impl Reshape { } /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshape>(mut self, value: ArgType) -> Self { self.Tshape = ::std::option::Option::Some(value.into()); self } @@ -84601,49 +102463,67 @@ impl Reshape { } /// Builds the `Reshape` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tensor: O0, - shape: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tensor: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), shape.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Reshape", |nd| { nd.add_input(tensor); nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Reshape` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tensor: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), shape.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Reshape", |nd| { + nd.add_input(tensor); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReshapeInst{op}) + } +} +impl ReshapeInst { + /// Returns the 'output' output of this 'Reshape' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReshapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Reshape::new().build(tensor, shape, scope)`. -pub fn reshape, O1: ::std::convert::Into>( - tensor: O0, - shape: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reshape, O1: ::std::convert::Into>(tensor: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { Reshape::new().build(tensor, shape, scope) } + /// Builder for the `ResizeArea` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResizeArea { @@ -84651,6 +102531,12 @@ pub struct ResizeArea { align_corners: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResizeArea' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResizeAreaInst { + /// An instance of a fully built ResizeArea Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResizeArea { /// Creates a new `ResizeArea`. @@ -84677,52 +102563,67 @@ impl ResizeArea { } /// Builds the `ResizeArea` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - images: O0, - size: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), size.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResizeArea", |nd| { nd.add_input(images); nd.add_input(size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align_corners { - nd.set_attr_bool("align_corners", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResizeArea` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), size.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResizeArea", |nd| { + nd.add_input(images); + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResizeAreaInst{op}) + } +} +impl ResizeAreaInst { + /// Returns the 'resized_images' output of this 'ResizeArea' operation. + pub fn resized_images(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResizeAreaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResizeArea::new().build(images, size, scope)`. -pub fn resize_area< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - images: O0, - size: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resize_area, O1: ::std::convert::Into>(images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { ResizeArea::new().build(images, size, scope) } + /// Builder for the `ResizeBicubic` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResizeBicubic { @@ -84731,6 +102632,12 @@ pub struct ResizeBicubic { half_pixel_centers: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResizeBicubic' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResizeBicubicInst { + /// An instance of a fully built ResizeBicubic Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResizeBicubic { /// Creates a new `ResizeBicubic`. @@ -84751,10 +102658,7 @@ impl ResizeBicubic { } /// Sets the `half_pixel_centers` attribute. - pub fn half_pixel_centers>( - mut self, - value: ArgType, - ) -> Self { + pub fn half_pixel_centers>(mut self, value: ArgType) -> Self { self.half_pixel_centers = ::std::option::Option::Some(value.into()); self } @@ -84766,55 +102670,73 @@ impl ResizeBicubic { } /// Builds the `ResizeBicubic` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - images: O0, - size: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), size.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResizeBicubic", |nd| { nd.add_input(images); nd.add_input(size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align_corners { - nd.set_attr_bool("align_corners", *value)?; - } - if let ::std::option::Option::Some(value) = &self.half_pixel_centers { - nd.set_attr_bool("half_pixel_centers", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResizeBicubic` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), size.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResizeBicubic", |nd| { + nd.add_input(images); + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResizeBicubicInst{op}) + } +} +impl ResizeBicubicInst { + /// Returns the 'resized_images' output of this 'ResizeBicubic' operation. + pub fn resized_images(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResizeBicubicInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResizeBicubic::new().build(images, size, scope)`. -pub fn resize_bicubic< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - images: O0, - size: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resize_bicubic, O1: ::std::convert::Into>(images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { ResizeBicubic::new().build(images, size, scope) } + /// Builder for the `ResizeBicubicGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResizeBicubicGrad { @@ -84823,6 +102745,12 @@ pub struct ResizeBicubicGrad { half_pixel_centers: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResizeBicubicGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResizeBicubicGradInst { + /// An instance of a fully built ResizeBicubicGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResizeBicubicGrad { /// Creates a new `ResizeBicubicGrad`. @@ -84843,10 +102771,7 @@ impl ResizeBicubicGrad { } /// Sets the `half_pixel_centers` attribute. - pub fn half_pixel_centers>( - mut self, - value: ArgType, - ) -> Self { + pub fn half_pixel_centers>(mut self, value: ArgType) -> Self { self.half_pixel_centers = ::std::option::Option::Some(value.into()); self } @@ -84858,55 +102783,73 @@ impl ResizeBicubicGrad { } /// Builds the `ResizeBicubicGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - grads: O0, - original_image: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, grads: O0, original_image: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(grads.into(), original_image.into(), scope) } - - fn build_impl( - &self, - grads: crate::Output, - original_image: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, grads: crate::Output, original_image: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResizeBicubicGrad", |nd| { nd.add_input(grads); nd.add_input(original_image); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align_corners { - nd.set_attr_bool("align_corners", *value)?; - } - if let ::std::option::Option::Some(value) = &self.half_pixel_centers { - nd.set_attr_bool("half_pixel_centers", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResizeBicubicGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, grads: O0, original_image: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(grads.into(), original_image.into(), scope) + } + fn build_instance_impl(&self, grads: crate::Output, original_image: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResizeBicubicGrad", |nd| { + nd.add_input(grads); + nd.add_input(original_image); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResizeBicubicGradInst{op}) + } +} +impl ResizeBicubicGradInst { + /// Returns the 'output' output of this 'ResizeBicubicGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResizeBicubicGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResizeBicubicGrad::new().build(grads, original_image, scope)`. -pub fn resize_bicubic_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - grads: O0, - original_image: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resize_bicubic_grad, O1: ::std::convert::Into>(grads: O0, original_image: O1, scope: &mut crate::Scope) -> crate::Result { ResizeBicubicGrad::new().build(grads, original_image, scope) } + /// Builder for the `ResizeBilinear` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResizeBilinear { @@ -84915,6 +102858,12 @@ pub struct ResizeBilinear { half_pixel_centers: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResizeBilinear' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResizeBilinearInst { + /// An instance of a fully built ResizeBilinear Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResizeBilinear { /// Creates a new `ResizeBilinear`. @@ -84935,10 +102884,7 @@ impl ResizeBilinear { } /// Sets the `half_pixel_centers` attribute. - pub fn half_pixel_centers>( - mut self, - value: ArgType, - ) -> Self { + pub fn half_pixel_centers>(mut self, value: ArgType) -> Self { self.half_pixel_centers = ::std::option::Option::Some(value.into()); self } @@ -84950,55 +102896,73 @@ impl ResizeBilinear { } /// Builds the `ResizeBilinear` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - images: O0, - size: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), size.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResizeBilinear", |nd| { nd.add_input(images); nd.add_input(size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align_corners { - nd.set_attr_bool("align_corners", *value)?; - } - if let ::std::option::Option::Some(value) = &self.half_pixel_centers { - nd.set_attr_bool("half_pixel_centers", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResizeBilinear` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), size.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResizeBilinear", |nd| { + nd.add_input(images); + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResizeBilinearInst{op}) + } +} +impl ResizeBilinearInst { + /// Returns the 'resized_images' output of this 'ResizeBilinear' operation. + pub fn resized_images(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResizeBilinearInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResizeBilinear::new().build(images, size, scope)`. -pub fn resize_bilinear< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - images: O0, - size: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resize_bilinear, O1: ::std::convert::Into>(images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { ResizeBilinear::new().build(images, size, scope) } + /// Builder for the `ResizeBilinearGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResizeBilinearGrad { @@ -85007,6 +102971,12 @@ pub struct ResizeBilinearGrad { half_pixel_centers: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResizeBilinearGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResizeBilinearGradInst { + /// An instance of a fully built ResizeBilinearGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResizeBilinearGrad { /// Creates a new `ResizeBilinearGrad`. @@ -85027,10 +102997,7 @@ impl ResizeBilinearGrad { } /// Sets the `half_pixel_centers` attribute. - pub fn half_pixel_centers>( - mut self, - value: ArgType, - ) -> Self { + pub fn half_pixel_centers>(mut self, value: ArgType) -> Self { self.half_pixel_centers = ::std::option::Option::Some(value.into()); self } @@ -85042,55 +103009,73 @@ impl ResizeBilinearGrad { } /// Builds the `ResizeBilinearGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - grads: O0, - original_image: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, grads: O0, original_image: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(grads.into(), original_image.into(), scope) } - - fn build_impl( - &self, - grads: crate::Output, - original_image: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, grads: crate::Output, original_image: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResizeBilinearGrad", |nd| { nd.add_input(grads); nd.add_input(original_image); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align_corners { - nd.set_attr_bool("align_corners", *value)?; - } - if let ::std::option::Option::Some(value) = &self.half_pixel_centers { - nd.set_attr_bool("half_pixel_centers", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResizeBilinearGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, grads: O0, original_image: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(grads.into(), original_image.into(), scope) + } + fn build_instance_impl(&self, grads: crate::Output, original_image: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResizeBilinearGrad", |nd| { + nd.add_input(grads); + nd.add_input(original_image); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResizeBilinearGradInst{op}) + } +} +impl ResizeBilinearGradInst { + /// Returns the 'output' output of this 'ResizeBilinearGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResizeBilinearGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResizeBilinearGrad::new().build(grads, original_image, scope)`. -pub fn resize_bilinear_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - grads: O0, - original_image: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resize_bilinear_grad, O1: ::std::convert::Into>(grads: O0, original_image: O1, scope: &mut crate::Scope) -> crate::Result { ResizeBilinearGrad::new().build(grads, original_image, scope) } + /// Builder for the `ResizeNearestNeighbor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResizeNearestNeighbor { @@ -85099,6 +103084,12 @@ pub struct ResizeNearestNeighbor { half_pixel_centers: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResizeNearestNeighbor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResizeNearestNeighborInst { + /// An instance of a fully built ResizeNearestNeighbor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResizeNearestNeighbor { /// Creates a new `ResizeNearestNeighbor`. @@ -85119,10 +103110,7 @@ impl ResizeNearestNeighbor { } /// Sets the `half_pixel_centers` attribute. - pub fn half_pixel_centers>( - mut self, - value: ArgType, - ) -> Self { + pub fn half_pixel_centers>(mut self, value: ArgType) -> Self { self.half_pixel_centers = ::std::option::Option::Some(value.into()); self } @@ -85134,55 +103122,73 @@ impl ResizeNearestNeighbor { } /// Builds the `ResizeNearestNeighbor` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - images: O0, - size: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(images.into(), size.into(), scope) } - - fn build_impl( - &self, - images: crate::Output, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, images: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResizeNearestNeighbor", |nd| { nd.add_input(images); nd.add_input(size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align_corners { - nd.set_attr_bool("align_corners", *value)?; - } - if let ::std::option::Option::Some(value) = &self.half_pixel_centers { - nd.set_attr_bool("half_pixel_centers", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResizeNearestNeighbor` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), size.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResizeNearestNeighbor", |nd| { + nd.add_input(images); + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResizeNearestNeighborInst{op}) + } +} +impl ResizeNearestNeighborInst { + /// Returns the 'resized_images' output of this 'ResizeNearestNeighbor' operation. + pub fn resized_images(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResizeNearestNeighborInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResizeNearestNeighbor::new().build(images, size, scope)`. -pub fn resize_nearest_neighbor< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - images: O0, - size: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resize_nearest_neighbor, O1: ::std::convert::Into>(images: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { ResizeNearestNeighbor::new().build(images, size, scope) } + /// Builder for the `ResizeNearestNeighborGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResizeNearestNeighborGrad { @@ -85191,6 +103197,12 @@ pub struct ResizeNearestNeighborGrad { half_pixel_centers: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResizeNearestNeighborGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResizeNearestNeighborGradInst { + /// An instance of a fully built ResizeNearestNeighborGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResizeNearestNeighborGrad { /// Creates a new `ResizeNearestNeighborGrad`. @@ -85211,10 +103223,7 @@ impl ResizeNearestNeighborGrad { } /// Sets the `half_pixel_centers` attribute. - pub fn half_pixel_centers>( - mut self, - value: ArgType, - ) -> Self { + pub fn half_pixel_centers>(mut self, value: ArgType) -> Self { self.half_pixel_centers = ::std::option::Option::Some(value.into()); self } @@ -85226,61 +103235,85 @@ impl ResizeNearestNeighborGrad { } /// Builds the `ResizeNearestNeighborGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - grads: O0, - size: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, grads: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(grads.into(), size.into(), scope) } - - fn build_impl( - &self, - grads: crate::Output, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, grads: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResizeNearestNeighborGrad", |nd| { nd.add_input(grads); nd.add_input(size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.align_corners { - nd.set_attr_bool("align_corners", *value)?; - } - if let ::std::option::Option::Some(value) = &self.half_pixel_centers { - nd.set_attr_bool("half_pixel_centers", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResizeNearestNeighborGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, grads: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(grads.into(), size.into(), scope) + } + fn build_instance_impl(&self, grads: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResizeNearestNeighborGrad", |nd| { + nd.add_input(grads); + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.align_corners { + nd.set_attr_bool("align_corners", *value)?; + } + if let ::std::option::Option::Some(value) = &self.half_pixel_centers { + nd.set_attr_bool("half_pixel_centers", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResizeNearestNeighborGradInst{op}) + } +} +impl ResizeNearestNeighborGradInst { + /// Returns the 'output' output of this 'ResizeNearestNeighborGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResizeNearestNeighborGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResizeNearestNeighborGrad::new().build(grads, size, scope)`. -pub fn resize_nearest_neighbor_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - grads: O0, - size: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resize_nearest_neighbor_grad, O1: ::std::convert::Into>(grads: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { ResizeNearestNeighborGrad::new().build(grads, size, scope) } + /// Builder for the `ResourceAccumulatorApplyGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceAccumulatorApplyGradient { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceAccumulatorApplyGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceAccumulatorApplyGradientInst { + /// An instance of a fully built ResourceAccumulatorApplyGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceAccumulatorApplyGradient { /// Creates a new `ResourceAccumulatorApplyGradient`. @@ -85301,27 +103334,10 @@ impl ResourceAccumulatorApplyGradient { } /// Builds the `ResourceAccumulatorApplyGradient` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - local_step: O1, - gradient: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, local_step: O1, gradient: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), local_step.into(), gradient.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - local_step: crate::Output, - gradient: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, local_step: crate::Output, gradient: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceAccumulatorApplyGradient", |nd| { nd.add_input(handle); nd.add_input(local_step); @@ -85329,32 +103345,56 @@ impl ResourceAccumulatorApplyGradient { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceAccumulatorApplyGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, local_step: O1, gradient: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), local_step.into(), gradient.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, local_step: crate::Output, gradient: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceAccumulatorApplyGradient", |nd| { + nd.add_input(handle); + nd.add_input(local_step); + nd.add_input(gradient); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceAccumulatorApplyGradientInst{op}) + } +} +impl ResourceAccumulatorApplyGradientInst { +} +impl Into for ResourceAccumulatorApplyGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceAccumulatorApplyGradient::new().build(handle, local_step, gradient, scope)`. -pub fn resource_accumulator_apply_gradient< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - local_step: O1, - gradient: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_accumulator_apply_gradient, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, local_step: O1, gradient: O2, scope: &mut crate::Scope) -> crate::Result { ResourceAccumulatorApplyGradient::new().build(handle, local_step, gradient, scope) } + /// Builder for the `ResourceAccumulatorNumAccumulated` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceAccumulatorNumAccumulated { control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceAccumulatorNumAccumulated' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceAccumulatorNumAccumulatedInst { + /// An instance of a fully built ResourceAccumulatorNumAccumulated Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceAccumulatorNumAccumulated { /// Creates a new `ResourceAccumulatorNumAccumulated`. @@ -85369,19 +103409,10 @@ impl ResourceAccumulatorNumAccumulated { } /// Builds the `ResourceAccumulatorNumAccumulated` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceAccumulatorNumAccumulated", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -85390,20 +103421,52 @@ impl ResourceAccumulatorNumAccumulated { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceAccumulatorNumAccumulated` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceAccumulatorNumAccumulated", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceAccumulatorNumAccumulatedInst{op}) + } +} +impl ResourceAccumulatorNumAccumulatedInst { + /// Returns the 'num_accumulated' output of this 'ResourceAccumulatorNumAccumulated' operation. + pub fn num_accumulated(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResourceAccumulatorNumAccumulatedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceAccumulatorNumAccumulated::new().build(handle, scope)`. -pub fn resource_accumulator_num_accumulated>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_accumulator_num_accumulated>(handle: O0, scope: &mut crate::Scope) -> crate::Result { ResourceAccumulatorNumAccumulated::new().build(handle, scope) } + /// Builder for the `ResourceAccumulatorSetGlobalStep` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceAccumulatorSetGlobalStep { control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceAccumulatorSetGlobalStep' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceAccumulatorSetGlobalStepInst { + /// An instance of a fully built ResourceAccumulatorSetGlobalStep Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceAccumulatorSetGlobalStep { /// Creates a new `ResourceAccumulatorSetGlobalStep`. @@ -85418,24 +103481,10 @@ impl ResourceAccumulatorSetGlobalStep { } /// Builds the `ResourceAccumulatorSetGlobalStep` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - new_global_step: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, new_global_step: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), new_global_step.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - new_global_step: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, new_global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceAccumulatorSetGlobalStep", |nd| { nd.add_input(handle); nd.add_input(new_global_step); @@ -85445,25 +103494,47 @@ impl ResourceAccumulatorSetGlobalStep { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceAccumulatorSetGlobalStep` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, new_global_step: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), new_global_step.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, new_global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceAccumulatorSetGlobalStep", |nd| { + nd.add_input(handle); + nd.add_input(new_global_step); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceAccumulatorSetGlobalStepInst{op}) + } +} +impl ResourceAccumulatorSetGlobalStepInst { +} +impl Into for ResourceAccumulatorSetGlobalStepInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceAccumulatorSetGlobalStep::new().build(handle, new_global_step, scope)`. -pub fn resource_accumulator_set_global_step< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - new_global_step: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_accumulator_set_global_step, O1: ::std::convert::Into>(handle: O0, new_global_step: O1, scope: &mut crate::Scope) -> crate::Result { ResourceAccumulatorSetGlobalStep::new().build(handle, new_global_step, scope) } + /// Builder for the `ResourceAccumulatorTakeGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceAccumulatorTakeGradient { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceAccumulatorTakeGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceAccumulatorTakeGradientInst { + /// An instance of a fully built ResourceAccumulatorTakeGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceAccumulatorTakeGradient { /// Creates a new `ResourceAccumulatorTakeGradient`. @@ -85484,49 +103555,61 @@ impl ResourceAccumulatorTakeGradient { } /// Builds the `ResourceAccumulatorTakeGradient` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - num_required: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, num_required: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), num_required.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - num_required: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, num_required: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceAccumulatorTakeGradient", |nd| { nd.add_input(handle); nd.add_input(num_required); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceAccumulatorTakeGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, num_required: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), num_required.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, num_required: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceAccumulatorTakeGradient", |nd| { + nd.add_input(handle); + nd.add_input(num_required); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceAccumulatorTakeGradientInst{op}) + } +} +impl ResourceAccumulatorTakeGradientInst { + /// Returns the 'average' output of this 'ResourceAccumulatorTakeGradient' operation. + pub fn average(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResourceAccumulatorTakeGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceAccumulatorTakeGradient::new().build(handle, num_required, scope)`. -pub fn resource_accumulator_take_gradient< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - num_required: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_accumulator_take_gradient, O1: ::std::convert::Into>(handle: O0, num_required: O1, scope: &mut crate::Scope) -> crate::Result { ResourceAccumulatorTakeGradient::new().build(handle, num_required, scope) } + /// Builder for the `ResourceApplyAdaMax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyAdaMax { @@ -85534,6 +103617,12 @@ pub struct ResourceApplyAdaMax { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyAdaMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyAdaMaxInst { + /// An instance of a fully built ResourceApplyAdaMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyAdaMax { /// Creates a new `ResourceApplyAdaMax`. @@ -85560,56 +103649,10 @@ impl ResourceApplyAdaMax { } /// Builds the `ResourceApplyAdaMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - m: O1, - v: O2, - beta1_power: O3, - lr: O4, - beta1: O5, - beta2: O6, - epsilon: O7, - grad: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - m.into(), - v.into(), - beta1_power.into(), - lr.into(), - beta1.into(), - beta2.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - m: crate::Output, - v: crate::Output, - beta1_power: crate::Output, - lr: crate::Output, - beta1: crate::Output, - beta2: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, m: O1, v: O2, beta1_power: O3, lr: O4, beta1: O5, beta2: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), m.into(), v.into(), beta1_power.into(), lr.into(), beta1.into(), beta2.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, m: crate::Output, v: crate::Output, beta1_power: crate::Output, lr: crate::Output, beta1: crate::Output, beta2: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyAdaMax", |nd| { nd.add_input(var); nd.add_input(m); @@ -85623,53 +103666,57 @@ impl ResourceApplyAdaMax { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyAdaMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, m: O1, v: O2, beta1_power: O3, lr: O4, beta1: O5, beta2: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), m.into(), v.into(), beta1_power.into(), lr.into(), beta1.into(), beta2.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, m: crate::Output, v: crate::Output, beta1_power: crate::Output, lr: crate::Output, beta1: crate::Output, beta2: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyAdaMax", |nd| { + nd.add_input(var); + nd.add_input(m); + nd.add_input(v); + nd.add_input(beta1_power); + nd.add_input(lr); + nd.add_input(beta1); + nd.add_input(beta2); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyAdaMaxInst{op}) + } +} +impl ResourceApplyAdaMaxInst { +} +impl Into for ResourceApplyAdaMaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyAdaMax::new().build(var, m, v, beta1_power, lr, beta1, beta2, epsilon, grad, scope)`. -pub fn resource_apply_ada_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - m: O1, - v: O2, - beta1_power: O3, - lr: O4, - beta1: O5, - beta2: O6, - epsilon: O7, - grad: O8, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceApplyAdaMax::new().build( - var, - m, - v, - beta1_power, - lr, - beta1, - beta2, - epsilon, - grad, - scope, - ) +pub fn resource_apply_ada_max, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, m: O1, v: O2, beta1_power: O3, lr: O4, beta1: O5, beta2: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + ResourceApplyAdaMax::new().build(var, m, v, beta1_power, lr, beta1, beta2, epsilon, grad, scope) } + /// Builder for the `ResourceApplyAdadelta` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyAdadelta { @@ -85677,6 +103724,12 @@ pub struct ResourceApplyAdadelta { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyAdadelta' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyAdadeltaInst { + /// An instance of a fully built ResourceApplyAdadelta Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyAdadelta { /// Creates a new `ResourceApplyAdadelta`. @@ -85703,48 +103756,10 @@ impl ResourceApplyAdadelta { } /// Builds the `ResourceApplyAdadelta` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - accum_update: O2, - lr: O3, - rho: O4, - epsilon: O5, - grad: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - accum_update.into(), - lr.into(), - rho.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - accum_update: crate::Output, - lr: crate::Output, - rho: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), accum_update.into(), lr.into(), rho.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, accum_update: crate::Output, lr: crate::Output, rho: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyAdadelta", |nd| { nd.add_input(var); nd.add_input(accum); @@ -85756,38 +103771,55 @@ impl ResourceApplyAdadelta { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyAdadelta` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), accum_update.into(), lr.into(), rho.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, accum_update: crate::Output, lr: crate::Output, rho: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyAdadelta", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(accum_update); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyAdadeltaInst{op}) + } +} +impl ResourceApplyAdadeltaInst { +} +impl Into for ResourceApplyAdadeltaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyAdadelta::new().build(var, accum, accum_update, lr, rho, epsilon, grad, scope)`. -pub fn resource_apply_adadelta< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - var: O0, - accum: O1, - accum_update: O2, - lr: O3, - rho: O4, - epsilon: O5, - grad: O6, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_adadelta, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { ResourceApplyAdadelta::new().build(var, accum, accum_update, lr, rho, epsilon, grad, scope) } + /// Builder for the `ResourceApplyAdagrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyAdagrad { @@ -85796,6 +103828,12 @@ pub struct ResourceApplyAdagrad { update_slots: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyAdagrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyAdagradInst { + /// An instance of a fully built ResourceApplyAdagrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyAdagrad { /// Creates a new `ResourceApplyAdagrad`. @@ -85828,30 +103866,10 @@ impl ResourceApplyAdagrad { } /// Builds the `ResourceApplyAdagrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - grad: O3, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, scope: &mut crate::Scope) -> crate::Result { self.build_impl(var.into(), accum.into(), lr.into(), grad.into(), scope) } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyAdagrad", |nd| { nd.add_input(var); nd.add_input(accum); @@ -85860,35 +103878,58 @@ impl ResourceApplyAdagrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.update_slots { - nd.set_attr_bool("update_slots", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyAdagrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyAdagrad", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyAdagradInst{op}) + } +} +impl ResourceApplyAdagradInst { +} +impl Into for ResourceApplyAdagradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyAdagrad::new().build(var, accum, lr, grad, scope)`. -pub fn resource_apply_adagrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - grad: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_adagrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(var: O0, accum: O1, lr: O2, grad: O3, scope: &mut crate::Scope) -> crate::Result { ResourceApplyAdagrad::new().build(var, accum, lr, grad, scope) } + /// Builder for the `ResourceApplyAdagradDA` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyAdagradDA { @@ -85896,6 +103937,12 @@ pub struct ResourceApplyAdagradDA { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyAdagradDA' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyAdagradDAInst { + /// An instance of a fully built ResourceApplyAdagradDA Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyAdagradDA { /// Creates a new `ResourceApplyAdagradDA`. @@ -85922,52 +103969,10 @@ impl ResourceApplyAdagradDA { } /// Builds the `ResourceApplyAdagradDA` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - var: O0, - gradient_accumulator: O1, - gradient_squared_accumulator: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - global_step: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - gradient_accumulator.into(), - gradient_squared_accumulator.into(), - grad.into(), - lr.into(), - l1.into(), - l2.into(), - global_step.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - gradient_accumulator: crate::Output, - gradient_squared_accumulator: crate::Output, - grad: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - global_step: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, lr: O4, l1: O5, l2: O6, global_step: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), gradient_accumulator.into(), gradient_squared_accumulator.into(), grad.into(), lr.into(), l1.into(), l2.into(), global_step.into(), scope) + } + fn build_impl(&self, var: crate::Output, gradient_accumulator: crate::Output, gradient_squared_accumulator: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyAdagradDA", |nd| { nd.add_input(var); nd.add_input(gradient_accumulator); @@ -85980,50 +103985,56 @@ impl ResourceApplyAdagradDA { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyAdagradDA` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, lr: O4, l1: O5, l2: O6, global_step: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), gradient_accumulator.into(), gradient_squared_accumulator.into(), grad.into(), lr.into(), l1.into(), l2.into(), global_step.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, gradient_accumulator: crate::Output, gradient_squared_accumulator: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyAdagradDA", |nd| { + nd.add_input(var); + nd.add_input(gradient_accumulator); + nd.add_input(gradient_squared_accumulator); + nd.add_input(grad); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(global_step); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyAdagradDAInst{op}) + } +} +impl ResourceApplyAdagradDAInst { +} +impl Into for ResourceApplyAdagradDAInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyAdagradDA::new().build(var, gradient_accumulator, gradient_squared_accumulator, grad, lr, l1, l2, global_step, scope)`. -pub fn resource_apply_adagrad_da< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - var: O0, - gradient_accumulator: O1, - gradient_squared_accumulator: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - global_step: O7, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceApplyAdagradDA::new().build( - var, - gradient_accumulator, - gradient_squared_accumulator, - grad, - lr, - l1, - l2, - global_step, - scope, - ) +pub fn resource_apply_adagrad_da, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, lr: O4, l1: O5, l2: O6, global_step: O7, scope: &mut crate::Scope) -> crate::Result { + ResourceApplyAdagradDA::new().build(var, gradient_accumulator, gradient_squared_accumulator, grad, lr, l1, l2, global_step, scope) } + /// Builder for the `ResourceApplyAdagradV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyAdagradV2 { @@ -86032,6 +104043,12 @@ pub struct ResourceApplyAdagradV2 { update_slots: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyAdagradV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyAdagradV2Inst { + /// An instance of a fully built ResourceApplyAdagradV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyAdagradV2 { /// Creates a new `ResourceApplyAdagradV2`. @@ -86064,40 +104081,10 @@ impl ResourceApplyAdagradV2 { } /// Builds the `ResourceApplyAdagradV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - epsilon: O3, - grad: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyAdagradV2", |nd| { nd.add_input(var); nd.add_input(accum); @@ -86107,37 +104094,59 @@ impl ResourceApplyAdagradV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.update_slots { - nd.set_attr_bool("update_slots", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyAdagradV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyAdagradV2", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyAdagradV2Inst{op}) + } +} +impl ResourceApplyAdagradV2Inst { +} +impl Into for ResourceApplyAdagradV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyAdagradV2::new().build(var, accum, lr, epsilon, grad, scope)`. -pub fn resource_apply_adagrad_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - epsilon: O3, - grad: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_adagrad_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, scope: &mut crate::Scope) -> crate::Result { ResourceApplyAdagradV2::new().build(var, accum, lr, epsilon, grad, scope) } + /// Builder for the `ResourceApplyAdam` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyAdam { @@ -86146,6 +104155,12 @@ pub struct ResourceApplyAdam { use_nesterov: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyAdam' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyAdamInst { + /// An instance of a fully built ResourceApplyAdam Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyAdam { /// Creates a new `ResourceApplyAdam`. @@ -86178,60 +104193,10 @@ impl ResourceApplyAdam { } /// Builds the `ResourceApplyAdam` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - var: O0, - m: O1, - v: O2, - beta1_power: O3, - beta2_power: O4, - lr: O5, - beta1: O6, - beta2: O7, - epsilon: O8, - grad: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - m.into(), - v.into(), - beta1_power.into(), - beta2_power.into(), - lr.into(), - beta1.into(), - beta2.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - m: crate::Output, - v: crate::Output, - beta1_power: crate::Output, - beta2_power: crate::Output, - lr: crate::Output, - beta1: crate::Output, - beta2: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, m: O1, v: O2, beta1_power: O3, beta2_power: O4, lr: O5, beta1: O6, beta2: O7, epsilon: O8, grad: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), m.into(), v.into(), beta1_power.into(), beta2_power.into(), lr.into(), beta1.into(), beta2.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, m: crate::Output, v: crate::Output, beta1_power: crate::Output, beta2_power: crate::Output, lr: crate::Output, beta1: crate::Output, beta2: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyAdam", |nd| { nd.add_input(var); nd.add_input(m); @@ -86246,59 +104211,64 @@ impl ResourceApplyAdam { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_nesterov { - nd.set_attr_bool("use_nesterov", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyAdam` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, m: O1, v: O2, beta1_power: O3, beta2_power: O4, lr: O5, beta1: O6, beta2: O7, epsilon: O8, grad: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), m.into(), v.into(), beta1_power.into(), beta2_power.into(), lr.into(), beta1.into(), beta2.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, m: crate::Output, v: crate::Output, beta1_power: crate::Output, beta2_power: crate::Output, lr: crate::Output, beta1: crate::Output, beta2: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyAdam", |nd| { + nd.add_input(var); + nd.add_input(m); + nd.add_input(v); + nd.add_input(beta1_power); + nd.add_input(beta2_power); + nd.add_input(lr); + nd.add_input(beta1); + nd.add_input(beta2); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyAdamInst{op}) + } +} +impl ResourceApplyAdamInst { +} +impl Into for ResourceApplyAdamInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyAdam::new().build(var, m, v, beta1_power, beta2_power, lr, beta1, beta2, epsilon, grad, scope)`. -pub fn resource_apply_adam< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - var: O0, - m: O1, - v: O2, - beta1_power: O3, - beta2_power: O4, - lr: O5, - beta1: O6, - beta2: O7, - epsilon: O8, - grad: O9, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceApplyAdam::new().build( - var, - m, - v, - beta1_power, - beta2_power, - lr, - beta1, - beta2, - epsilon, - grad, - scope, - ) +pub fn resource_apply_adam, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(var: O0, m: O1, v: O2, beta1_power: O3, beta2_power: O4, lr: O5, beta1: O6, beta2: O7, epsilon: O8, grad: O9, scope: &mut crate::Scope) -> crate::Result { + ResourceApplyAdam::new().build(var, m, v, beta1_power, beta2_power, lr, beta1, beta2, epsilon, grad, scope) } + /// Builder for the `ResourceApplyAdamWithAmsgrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyAdamWithAmsgrad { @@ -86306,6 +104276,12 @@ pub struct ResourceApplyAdamWithAmsgrad { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyAdamWithAmsgrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyAdamWithAmsgradInst { + /// An instance of a fully built ResourceApplyAdamWithAmsgrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyAdamWithAmsgrad { /// Creates a new `ResourceApplyAdamWithAmsgrad`. @@ -86332,64 +104308,10 @@ impl ResourceApplyAdamWithAmsgrad { } /// Builds the `ResourceApplyAdamWithAmsgrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, - >( - &self, - var: O0, - m: O1, - v: O2, - vhat: O3, - beta1_power: O4, - beta2_power: O5, - lr: O6, - beta1: O7, - beta2: O8, - epsilon: O9, - grad: O10, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - m.into(), - v.into(), - vhat.into(), - beta1_power.into(), - beta2_power.into(), - lr.into(), - beta1.into(), - beta2.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - m: crate::Output, - v: crate::Output, - vhat: crate::Output, - beta1_power: crate::Output, - beta2_power: crate::Output, - lr: crate::Output, - beta1: crate::Output, - beta2: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into>(&self, var: O0, m: O1, v: O2, vhat: O3, beta1_power: O4, beta2_power: O5, lr: O6, beta1: O7, beta2: O8, epsilon: O9, grad: O10, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), m.into(), v.into(), vhat.into(), beta1_power.into(), beta2_power.into(), lr.into(), beta1.into(), beta2.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, m: crate::Output, v: crate::Output, vhat: crate::Output, beta1_power: crate::Output, beta2_power: crate::Output, lr: crate::Output, beta1: crate::Output, beta2: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyAdamWithAmsgrad", |nd| { nd.add_input(var); nd.add_input(m); @@ -86405,59 +104327,59 @@ impl ResourceApplyAdamWithAmsgrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyAdamWithAmsgrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into>(&self, var: O0, m: O1, v: O2, vhat: O3, beta1_power: O4, beta2_power: O5, lr: O6, beta1: O7, beta2: O8, epsilon: O9, grad: O10, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), m.into(), v.into(), vhat.into(), beta1_power.into(), beta2_power.into(), lr.into(), beta1.into(), beta2.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, m: crate::Output, v: crate::Output, vhat: crate::Output, beta1_power: crate::Output, beta2_power: crate::Output, lr: crate::Output, beta1: crate::Output, beta2: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyAdamWithAmsgrad", |nd| { + nd.add_input(var); + nd.add_input(m); + nd.add_input(v); + nd.add_input(vhat); + nd.add_input(beta1_power); + nd.add_input(beta2_power); + nd.add_input(lr); + nd.add_input(beta1); + nd.add_input(beta2); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyAdamWithAmsgradInst{op}) + } +} +impl ResourceApplyAdamWithAmsgradInst { +} +impl Into for ResourceApplyAdamWithAmsgradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyAdamWithAmsgrad::new().build(var, m, v, vhat, beta1_power, beta2_power, lr, beta1, beta2, epsilon, grad, scope)`. -pub fn resource_apply_adam_with_amsgrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - O10: ::std::convert::Into, ->( - var: O0, - m: O1, - v: O2, - vhat: O3, - beta1_power: O4, - beta2_power: O5, - lr: O6, - beta1: O7, - beta2: O8, - epsilon: O9, - grad: O10, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceApplyAdamWithAmsgrad::new().build( - var, - m, - v, - vhat, - beta1_power, - beta2_power, - lr, - beta1, - beta2, - epsilon, - grad, - scope, - ) +pub fn resource_apply_adam_with_amsgrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into, O10: ::std::convert::Into>(var: O0, m: O1, v: O2, vhat: O3, beta1_power: O4, beta2_power: O5, lr: O6, beta1: O7, beta2: O8, epsilon: O9, grad: O10, scope: &mut crate::Scope) -> crate::Result { + ResourceApplyAdamWithAmsgrad::new().build(var, m, v, vhat, beta1_power, beta2_power, lr, beta1, beta2, epsilon, grad, scope) } + /// Builder for the `ResourceApplyAddSign` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyAddSign { @@ -86465,6 +104387,12 @@ pub struct ResourceApplyAddSign { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyAddSign' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyAddSignInst { + /// An instance of a fully built ResourceApplyAddSign Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyAddSign { /// Creates a new `ResourceApplyAddSign`. @@ -86491,48 +104419,10 @@ impl ResourceApplyAddSign { } /// Builds the `ResourceApplyAddSign` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - var: O0, - m: O1, - lr: O2, - alpha: O3, - sign_decay: O4, - beta: O5, - grad: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - m.into(), - lr.into(), - alpha.into(), - sign_decay.into(), - beta.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - m: crate::Output, - lr: crate::Output, - alpha: crate::Output, - sign_decay: crate::Output, - beta: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, m: O1, lr: O2, alpha: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), m.into(), lr.into(), alpha.into(), sign_decay.into(), beta.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, m: crate::Output, lr: crate::Output, alpha: crate::Output, sign_decay: crate::Output, beta: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyAddSign", |nd| { nd.add_input(var); nd.add_input(m); @@ -86544,38 +104434,55 @@ impl ResourceApplyAddSign { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyAddSign` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, m: O1, lr: O2, alpha: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), m.into(), lr.into(), alpha.into(), sign_decay.into(), beta.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, m: crate::Output, lr: crate::Output, alpha: crate::Output, sign_decay: crate::Output, beta: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyAddSign", |nd| { + nd.add_input(var); + nd.add_input(m); + nd.add_input(lr); + nd.add_input(alpha); + nd.add_input(sign_decay); + nd.add_input(beta); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyAddSignInst{op}) + } +} +impl ResourceApplyAddSignInst { +} +impl Into for ResourceApplyAddSignInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyAddSign::new().build(var, m, lr, alpha, sign_decay, beta, grad, scope)`. -pub fn resource_apply_add_sign< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - var: O0, - m: O1, - lr: O2, - alpha: O3, - sign_decay: O4, - beta: O5, - grad: O6, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_add_sign, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(var: O0, m: O1, lr: O2, alpha: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { ResourceApplyAddSign::new().build(var, m, lr, alpha, sign_decay, beta, grad, scope) } + /// Builder for the `ResourceApplyCenteredRMSProp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyCenteredRMSProp { @@ -86583,6 +104490,12 @@ pub struct ResourceApplyCenteredRMSProp { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyCenteredRMSProp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyCenteredRMSPropInst { + /// An instance of a fully built ResourceApplyCenteredRMSProp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyCenteredRMSProp { /// Creates a new `ResourceApplyCenteredRMSProp`. @@ -86609,56 +104522,10 @@ impl ResourceApplyCenteredRMSProp { } /// Builds the `ResourceApplyCenteredRMSProp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - mg: O1, - ms: O2, - mom: O3, - lr: O4, - rho: O5, - momentum: O6, - epsilon: O7, - grad: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - mg.into(), - ms.into(), - mom.into(), - lr.into(), - rho.into(), - momentum.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - mg: crate::Output, - ms: crate::Output, - mom: crate::Output, - lr: crate::Output, - rho: crate::Output, - momentum: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), mg.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, mg: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyCenteredRMSProp", |nd| { nd.add_input(var); nd.add_input(mg); @@ -86672,43 +104539,57 @@ impl ResourceApplyCenteredRMSProp { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyCenteredRMSProp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), mg.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, mg: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyCenteredRMSProp", |nd| { + nd.add_input(var); + nd.add_input(mg); + nd.add_input(ms); + nd.add_input(mom); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(momentum); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyCenteredRMSPropInst{op}) + } +} +impl ResourceApplyCenteredRMSPropInst { +} +impl Into for ResourceApplyCenteredRMSPropInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyCenteredRMSProp::new().build(var, mg, ms, mom, lr, rho, momentum, epsilon, grad, scope)`. -pub fn resource_apply_centered_rmsprop< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - mg: O1, - ms: O2, - mom: O3, - lr: O4, - rho: O5, - momentum: O6, - epsilon: O7, - grad: O8, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceApplyCenteredRMSProp::new() - .build(var, mg, ms, mom, lr, rho, momentum, epsilon, grad, scope) +pub fn resource_apply_centered_rmsprop, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, scope: &mut crate::Scope) -> crate::Result { + ResourceApplyCenteredRMSProp::new().build(var, mg, ms, mom, lr, rho, momentum, epsilon, grad, scope) } + /// Builder for the `ResourceApplyFtrl` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyFtrl { @@ -86717,6 +104598,12 @@ pub struct ResourceApplyFtrl { multiply_linear_by_lr: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyFtrl' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyFtrlInst { + /// An instance of a fully built ResourceApplyFtrl Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyFtrl { /// Creates a new `ResourceApplyFtrl`. @@ -86737,10 +104624,7 @@ impl ResourceApplyFtrl { } /// Sets the `multiply_linear_by_lr` attribute. - pub fn multiply_linear_by_lr>( - mut self, - value: ArgType, - ) -> Self { + pub fn multiply_linear_by_lr>(mut self, value: ArgType) -> Self { self.multiply_linear_by_lr = ::std::option::Option::Some(value.into()); self } @@ -86752,52 +104636,10 @@ impl ResourceApplyFtrl { } /// Builds the `ResourceApplyFtrl` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - linear: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - lr_power: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - linear.into(), - grad.into(), - lr.into(), - l1.into(), - l2.into(), - lr_power.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - linear: crate::Output, - grad: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - lr_power: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, lr_power: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), linear.into(), grad.into(), lr.into(), l1.into(), l2.into(), lr_power.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyFtrl", |nd| { nd.add_input(var); nd.add_input(accum); @@ -86810,43 +104652,62 @@ impl ResourceApplyFtrl { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { - nd.set_attr_bool("multiply_linear_by_lr", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyFtrl` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, lr_power: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), linear.into(), grad.into(), lr.into(), l1.into(), l2.into(), lr_power.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyFtrl", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(linear); + nd.add_input(grad); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(lr_power); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyFtrlInst{op}) + } +} +impl ResourceApplyFtrlInst { +} +impl Into for ResourceApplyFtrlInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyFtrl::new().build(var, accum, linear, grad, lr, l1, l2, lr_power, scope)`. -pub fn resource_apply_ftrl< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - var: O0, - accum: O1, - linear: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - lr_power: O7, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_ftrl, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, lr_power: O7, scope: &mut crate::Scope) -> crate::Result { ResourceApplyFtrl::new().build(var, accum, linear, grad, lr, l1, l2, lr_power, scope) } + /// Builder for the `ResourceApplyFtrlV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyFtrlV2 { @@ -86855,6 +104716,12 @@ pub struct ResourceApplyFtrlV2 { multiply_linear_by_lr: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyFtrlV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyFtrlV2Inst { + /// An instance of a fully built ResourceApplyFtrlV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyFtrlV2 { /// Creates a new `ResourceApplyFtrlV2`. @@ -86875,10 +104742,7 @@ impl ResourceApplyFtrlV2 { } /// Sets the `multiply_linear_by_lr` attribute. - pub fn multiply_linear_by_lr>( - mut self, - value: ArgType, - ) -> Self { + pub fn multiply_linear_by_lr>(mut self, value: ArgType) -> Self { self.multiply_linear_by_lr = ::std::option::Option::Some(value.into()); self } @@ -86890,56 +104754,10 @@ impl ResourceApplyFtrlV2 { } /// Builds the `ResourceApplyFtrlV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - linear: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - l2_shrinkage: O7, - lr_power: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - linear.into(), - grad.into(), - lr.into(), - l1.into(), - l2.into(), - l2_shrinkage.into(), - lr_power.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - linear: crate::Output, - grad: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - l2_shrinkage: crate::Output, - lr_power: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, l2_shrinkage: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), linear.into(), grad.into(), lr.into(), l1.into(), l2.into(), l2_shrinkage.into(), lr_power.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, l2_shrinkage: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyFtrlV2", |nd| { nd.add_input(var); nd.add_input(accum); @@ -86953,56 +104771,63 @@ impl ResourceApplyFtrlV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { - nd.set_attr_bool("multiply_linear_by_lr", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyFtrlV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, l2_shrinkage: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), linear.into(), grad.into(), lr.into(), l1.into(), l2.into(), l2_shrinkage.into(), lr_power.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, l2_shrinkage: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyFtrlV2", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(linear); + nd.add_input(grad); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(l2_shrinkage); + nd.add_input(lr_power); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyFtrlV2Inst{op}) + } +} +impl ResourceApplyFtrlV2Inst { +} +impl Into for ResourceApplyFtrlV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyFtrlV2::new().build(var, accum, linear, grad, lr, l1, l2, l2_shrinkage, lr_power, scope)`. -pub fn resource_apply_ftrl_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - accum: O1, - linear: O2, - grad: O3, - lr: O4, - l1: O5, - l2: O6, - l2_shrinkage: O7, - lr_power: O8, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceApplyFtrlV2::new().build( - var, - accum, - linear, - grad, - lr, - l1, - l2, - l2_shrinkage, - lr_power, - scope, - ) +pub fn resource_apply_ftrl_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, accum: O1, linear: O2, grad: O3, lr: O4, l1: O5, l2: O6, l2_shrinkage: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + ResourceApplyFtrlV2::new().build(var, accum, linear, grad, lr, l1, l2, l2_shrinkage, lr_power, scope) } + /// Builder for the `ResourceApplyGradientDescent` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyGradientDescent { @@ -87010,6 +104835,12 @@ pub struct ResourceApplyGradientDescent { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyGradientDescent' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyGradientDescentInst { + /// An instance of a fully built ResourceApplyGradientDescent Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyGradientDescent { /// Creates a new `ResourceApplyGradientDescent`. @@ -87036,27 +104867,10 @@ impl ResourceApplyGradientDescent { } /// Builds the `ResourceApplyGradientDescent` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - var: O0, - alpha: O1, - delta: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, var: O0, alpha: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(var.into(), alpha.into(), delta.into(), scope) } - - fn build_impl( - &self, - var: crate::Output, - alpha: crate::Output, - delta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, var: crate::Output, alpha: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyGradientDescent", |nd| { nd.add_input(var); nd.add_input(alpha); @@ -87064,30 +104878,51 @@ impl ResourceApplyGradientDescent { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyGradientDescent` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, var: O0, alpha: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), alpha.into(), delta.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, alpha: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyGradientDescent", |nd| { + nd.add_input(var); + nd.add_input(alpha); + nd.add_input(delta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyGradientDescentInst{op}) + } +} +impl ResourceApplyGradientDescentInst { +} +impl Into for ResourceApplyGradientDescentInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyGradientDescent::new().build(var, alpha, delta, scope)`. -pub fn resource_apply_gradient_descent< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - var: O0, - alpha: O1, - delta: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_gradient_descent, O1: ::std::convert::Into, O2: ::std::convert::Into>(var: O0, alpha: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { ResourceApplyGradientDescent::new().build(var, alpha, delta, scope) } + /// Builder for the `ResourceApplyKerasMomentum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyKerasMomentum { @@ -87096,6 +104931,12 @@ pub struct ResourceApplyKerasMomentum { use_nesterov: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyKerasMomentum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyKerasMomentumInst { + /// An instance of a fully built ResourceApplyKerasMomentum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyKerasMomentum { /// Creates a new `ResourceApplyKerasMomentum`. @@ -87128,40 +104969,10 @@ impl ResourceApplyKerasMomentum { } /// Builds the `ResourceApplyKerasMomentum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - grad: O3, - momentum: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - grad.into(), - momentum.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - grad: crate::Output, - momentum: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, momentum: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), grad.into(), momentum.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyKerasMomentum", |nd| { nd.add_input(var); nd.add_input(accum); @@ -87171,37 +104982,59 @@ impl ResourceApplyKerasMomentum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_nesterov { - nd.set_attr_bool("use_nesterov", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyKerasMomentum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, momentum: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), grad.into(), momentum.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyKerasMomentum", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(grad); + nd.add_input(momentum); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyKerasMomentumInst{op}) + } +} +impl ResourceApplyKerasMomentumInst { +} +impl Into for ResourceApplyKerasMomentumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyKerasMomentum::new().build(var, accum, lr, grad, momentum, scope)`. -pub fn resource_apply_keras_momentum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - grad: O3, - momentum: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_keras_momentum, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(var: O0, accum: O1, lr: O2, grad: O3, momentum: O4, scope: &mut crate::Scope) -> crate::Result { ResourceApplyKerasMomentum::new().build(var, accum, lr, grad, momentum, scope) } + /// Builder for the `ResourceApplyMomentum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyMomentum { @@ -87210,6 +105043,12 @@ pub struct ResourceApplyMomentum { use_nesterov: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyMomentum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyMomentumInst { + /// An instance of a fully built ResourceApplyMomentum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyMomentum { /// Creates a new `ResourceApplyMomentum`. @@ -87242,40 +105081,10 @@ impl ResourceApplyMomentum { } /// Builds the `ResourceApplyMomentum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - grad: O3, - momentum: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - grad.into(), - momentum.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - grad: crate::Output, - momentum: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, momentum: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), grad.into(), momentum.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyMomentum", |nd| { nd.add_input(var); nd.add_input(accum); @@ -87285,37 +105094,59 @@ impl ResourceApplyMomentum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_nesterov { - nd.set_attr_bool("use_nesterov", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyMomentum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, momentum: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), grad.into(), momentum.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyMomentum", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(grad); + nd.add_input(momentum); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyMomentumInst{op}) + } +} +impl ResourceApplyMomentumInst { +} +impl Into for ResourceApplyMomentumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyMomentum::new().build(var, accum, lr, grad, momentum, scope)`. -pub fn resource_apply_momentum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - grad: O3, - momentum: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_momentum, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(var: O0, accum: O1, lr: O2, grad: O3, momentum: O4, scope: &mut crate::Scope) -> crate::Result { ResourceApplyMomentum::new().build(var, accum, lr, grad, momentum, scope) } + /// Builder for the `ResourceApplyPowerSign` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyPowerSign { @@ -87323,6 +105154,12 @@ pub struct ResourceApplyPowerSign { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyPowerSign' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyPowerSignInst { + /// An instance of a fully built ResourceApplyPowerSign Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyPowerSign { /// Creates a new `ResourceApplyPowerSign`. @@ -87349,48 +105186,10 @@ impl ResourceApplyPowerSign { } /// Builds the `ResourceApplyPowerSign` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - var: O0, - m: O1, - lr: O2, - logbase: O3, - sign_decay: O4, - beta: O5, - grad: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - m.into(), - lr.into(), - logbase.into(), - sign_decay.into(), - beta.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - m: crate::Output, - lr: crate::Output, - logbase: crate::Output, - sign_decay: crate::Output, - beta: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, m: O1, lr: O2, logbase: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), m.into(), lr.into(), logbase.into(), sign_decay.into(), beta.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, m: crate::Output, lr: crate::Output, logbase: crate::Output, sign_decay: crate::Output, beta: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyPowerSign", |nd| { nd.add_input(var); nd.add_input(m); @@ -87402,38 +105201,55 @@ impl ResourceApplyPowerSign { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyPowerSign` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, m: O1, lr: O2, logbase: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), m.into(), lr.into(), logbase.into(), sign_decay.into(), beta.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, m: crate::Output, lr: crate::Output, logbase: crate::Output, sign_decay: crate::Output, beta: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyPowerSign", |nd| { + nd.add_input(var); + nd.add_input(m); + nd.add_input(lr); + nd.add_input(logbase); + nd.add_input(sign_decay); + nd.add_input(beta); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyPowerSignInst{op}) + } +} +impl ResourceApplyPowerSignInst { +} +impl Into for ResourceApplyPowerSignInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyPowerSign::new().build(var, m, lr, logbase, sign_decay, beta, grad, scope)`. -pub fn resource_apply_power_sign< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - var: O0, - m: O1, - lr: O2, - logbase: O3, - sign_decay: O4, - beta: O5, - grad: O6, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_power_sign, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(var: O0, m: O1, lr: O2, logbase: O3, sign_decay: O4, beta: O5, grad: O6, scope: &mut crate::Scope) -> crate::Result { ResourceApplyPowerSign::new().build(var, m, lr, logbase, sign_decay, beta, grad, scope) } + /// Builder for the `ResourceApplyProximalAdagrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyProximalAdagrad { @@ -87441,6 +105257,12 @@ pub struct ResourceApplyProximalAdagrad { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyProximalAdagrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyProximalAdagradInst { + /// An instance of a fully built ResourceApplyProximalAdagrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyProximalAdagrad { /// Creates a new `ResourceApplyProximalAdagrad`. @@ -87467,44 +105289,10 @@ impl ResourceApplyProximalAdagrad { } /// Builds the `ResourceApplyProximalAdagrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - l1: O3, - l2: O4, - grad: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - l1.into(), - l2.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), l1.into(), l2.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyProximalAdagrad", |nd| { nd.add_input(var); nd.add_input(accum); @@ -87515,36 +105303,54 @@ impl ResourceApplyProximalAdagrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyProximalAdagrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), l1.into(), l2.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyProximalAdagrad", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyProximalAdagradInst{op}) + } +} +impl ResourceApplyProximalAdagradInst { +} +impl Into for ResourceApplyProximalAdagradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyProximalAdagrad::new().build(var, accum, lr, l1, l2, grad, scope)`. -pub fn resource_apply_proximal_adagrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - l1: O3, - l2: O4, - grad: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_proximal_adagrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, scope: &mut crate::Scope) -> crate::Result { ResourceApplyProximalAdagrad::new().build(var, accum, lr, l1, l2, grad, scope) } + /// Builder for the `ResourceApplyProximalGradientDescent` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyProximalGradientDescent { @@ -87552,6 +105358,12 @@ pub struct ResourceApplyProximalGradientDescent { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyProximalGradientDescent' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyProximalGradientDescentInst { + /// An instance of a fully built ResourceApplyProximalGradientDescent Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyProximalGradientDescent { /// Creates a new `ResourceApplyProximalGradientDescent`. @@ -87578,40 +105390,10 @@ impl ResourceApplyProximalGradientDescent { } /// Builds the `ResourceApplyProximalGradientDescent` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - var: O0, - alpha: O1, - l1: O2, - l2: O3, - delta: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - alpha.into(), - l1.into(), - l2.into(), - delta.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - alpha: crate::Output, - l1: crate::Output, - l2: crate::Output, - delta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, alpha: O1, l1: O2, l2: O3, delta: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), alpha.into(), l1.into(), l2.into(), delta.into(), scope) + } + fn build_impl(&self, var: crate::Output, alpha: crate::Output, l1: crate::Output, l2: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyProximalGradientDescent", |nd| { nd.add_input(var); nd.add_input(alpha); @@ -87621,34 +105403,53 @@ impl ResourceApplyProximalGradientDescent { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyProximalGradientDescent` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, alpha: O1, l1: O2, l2: O3, delta: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), alpha.into(), l1.into(), l2.into(), delta.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, alpha: crate::Output, l1: crate::Output, l2: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyProximalGradientDescent", |nd| { + nd.add_input(var); + nd.add_input(alpha); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(delta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyProximalGradientDescentInst{op}) + } +} +impl ResourceApplyProximalGradientDescentInst { +} +impl Into for ResourceApplyProximalGradientDescentInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyProximalGradientDescent::new().build(var, alpha, l1, l2, delta, scope)`. -pub fn resource_apply_proximal_gradient_descent< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - var: O0, - alpha: O1, - l1: O2, - l2: O3, - delta: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_proximal_gradient_descent, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(var: O0, alpha: O1, l1: O2, l2: O3, delta: O4, scope: &mut crate::Scope) -> crate::Result { ResourceApplyProximalGradientDescent::new().build(var, alpha, l1, l2, delta, scope) } + /// Builder for the `ResourceApplyRMSProp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceApplyRMSProp { @@ -87656,6 +105457,12 @@ pub struct ResourceApplyRMSProp { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceApplyRMSProp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceApplyRMSPropInst { + /// An instance of a fully built ResourceApplyRMSProp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceApplyRMSProp { /// Creates a new `ResourceApplyRMSProp`. @@ -87682,52 +105489,10 @@ impl ResourceApplyRMSProp { } /// Builds the `ResourceApplyRMSProp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - var: O0, - ms: O1, - mom: O2, - lr: O3, - rho: O4, - momentum: O5, - epsilon: O6, - grad: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - ms.into(), - mom.into(), - lr.into(), - rho.into(), - momentum.into(), - epsilon.into(), - grad.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - ms: crate::Output, - mom: crate::Output, - lr: crate::Output, - rho: crate::Output, - momentum: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), scope) + } + fn build_impl(&self, var: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceApplyRMSProp", |nd| { nd.add_input(var); nd.add_input(ms); @@ -87740,40 +105505,56 @@ impl ResourceApplyRMSProp { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceApplyRMSProp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceApplyRMSProp", |nd| { + nd.add_input(var); + nd.add_input(ms); + nd.add_input(mom); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(momentum); + nd.add_input(epsilon); + nd.add_input(grad); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceApplyRMSPropInst{op}) + } +} +impl ResourceApplyRMSPropInst { +} +impl Into for ResourceApplyRMSPropInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceApplyRMSProp::new().build(var, ms, mom, lr, rho, momentum, epsilon, grad, scope)`. -pub fn resource_apply_rmsprop< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - var: O0, - ms: O1, - mom: O2, - lr: O3, - rho: O4, - momentum: O5, - epsilon: O6, - grad: O7, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_apply_rmsprop, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, scope: &mut crate::Scope) -> crate::Result { ResourceApplyRMSProp::new().build(var, ms, mom, lr, rho, momentum, epsilon, grad, scope) } + /// Builder for the `ResourceConditionalAccumulator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceConditionalAccumulator { @@ -87784,6 +105565,12 @@ pub struct ResourceConditionalAccumulator { reduction_type: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceConditionalAccumulator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceConditionalAccumulatorInst { + /// An instance of a fully built ResourceConditionalAccumulator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceConditionalAccumulator { /// Creates a new `ResourceConditionalAccumulator`. @@ -87804,28 +105591,19 @@ impl ResourceConditionalAccumulator { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `reduction_type` attribute. - pub fn reduction_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduction_type>(mut self, value: ArgType) -> Self { self.reduction_type = ::std::option::Option::Some(value.into()); self } @@ -87837,41 +105615,81 @@ impl ResourceConditionalAccumulator { } /// Builds the `ResourceConditionalAccumulator` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceConditionalAccumulator", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.reduction_type { - nd.set_attr_string("reduction_type", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction_type { + nd.set_attr_string("reduction_type", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceConditionalAccumulator` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceConditionalAccumulator", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction_type { + nd.set_attr_string("reduction_type", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceConditionalAccumulatorInst{op}) + } +} +impl ResourceConditionalAccumulatorInst { + /// Returns the 'handle' output of this 'ResourceConditionalAccumulator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResourceConditionalAccumulatorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceConditionalAccumulator::new().build(scope)`. -pub fn resource_conditional_accumulator( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_conditional_accumulator<>(scope: &mut crate::Scope) -> crate::Result { ResourceConditionalAccumulator::new().build(scope) } + /// Builder for the `ResourceCountUpTo` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceCountUpTo { @@ -87879,6 +105697,12 @@ pub struct ResourceCountUpTo { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceCountUpTo' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceCountUpToInst { + /// An instance of a fully built ResourceCountUpTo Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceCountUpTo { /// Creates a new `ResourceCountUpTo`. @@ -87905,42 +105729,65 @@ impl ResourceCountUpTo { } /// Builds the `ResourceCountUpTo` operation. - pub fn build>( - &self, - resource: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceCountUpTo", |nd| { nd.add_input(resource); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.limit { - nd.set_attr_int("limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.limit { + nd.set_attr_int("limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceCountUpTo` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceCountUpTo", |nd| { + nd.add_input(resource); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.limit { + nd.set_attr_int("limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceCountUpToInst{op}) + } +} +impl ResourceCountUpToInst { + /// Returns the 'output' output of this 'ResourceCountUpTo' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResourceCountUpToInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceCountUpTo::new().build(resource, scope)`. -pub fn resource_count_up_to>( - resource: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_count_up_to>(resource: O0, scope: &mut crate::Scope) -> crate::Result { ResourceCountUpTo::new().build(resource, scope) } + /// Builder for the `ResourceGather` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceGather { @@ -87950,6 +105797,12 @@ pub struct ResourceGather { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceGather' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceGatherInst { + /// An instance of a fully built ResourceGather Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceGather { /// Creates a new `ResourceGather`. @@ -87976,10 +105829,7 @@ impl ResourceGather { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -87991,58 +105841,79 @@ impl ResourceGather { } /// Builds the `ResourceGather` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - resource: O0, - indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, resource: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), indices.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceGather", |nd| { nd.add_input(resource); nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.batch_dims { - nd.set_attr_int("batch_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.validate_indices { - nd.set_attr_bool("validate_indices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.batch_dims { + nd.set_attr_int("batch_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceGather` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, resource: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), indices.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceGather", |nd| { + nd.add_input(resource); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.batch_dims { + nd.set_attr_int("batch_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceGatherInst{op}) + } +} +impl ResourceGatherInst { + /// Returns the 'output' output of this 'ResourceGather' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResourceGatherInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceGather::new().build(resource, indices, scope)`. -pub fn resource_gather< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - resource: O0, - indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_gather, O1: ::std::convert::Into>(resource: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { ResourceGather::new().build(resource, indices, scope) } + /// Builder for the `ResourceGatherNd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceGatherNd { @@ -88050,6 +105921,12 @@ pub struct ResourceGatherNd { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceGatherNd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceGatherNdInst { + /// An instance of a fully built ResourceGatherNd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceGatherNd { /// Creates a new `ResourceGatherNd`. @@ -88064,10 +105941,7 @@ impl ResourceGatherNd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -88079,52 +105953,67 @@ impl ResourceGatherNd { } /// Builds the `ResourceGatherNd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - resource: O0, - indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, resource: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), indices.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceGatherNd", |nd| { nd.add_input(resource); nd.add_input(indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceGatherNd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, resource: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), indices.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceGatherNd", |nd| { + nd.add_input(resource); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceGatherNdInst{op}) + } +} +impl ResourceGatherNdInst { + /// Returns the 'output' output of this 'ResourceGatherNd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ResourceGatherNdInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceGatherNd::new().build(resource, indices, scope)`. -pub fn resource_gather_nd< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - resource: O0, - indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_gather_nd, O1: ::std::convert::Into>(resource: O0, indices: O1, scope: &mut crate::Scope) -> crate::Result { ResourceGatherNd::new().build(resource, indices, scope) } + /// Builder for the `ResourceScatterAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceScatterAdd { @@ -88132,6 +106021,12 @@ pub struct ResourceScatterAdd { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceScatterAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterAddInst { + /// An instance of a fully built ResourceScatterAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceScatterAdd { /// Creates a new `ResourceScatterAdd`. @@ -88146,10 +106041,197 @@ impl ResourceScatterAdd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { + self.Tindices = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `ResourceScatterAdd` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(resource.into(), indices.into(), updates.into(), scope) + } + fn build_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("ResourceScatterAdd", |nd| { + nd.add_input(resource); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ResourceScatterAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterAdd", |nd| { + nd.add_input(resource); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterAddInst{op}) + } +} +impl ResourceScatterAddInst { +} +impl Into for ResourceScatterAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `ResourceScatterAdd::new().build(resource, indices, updates, scope)`. +pub fn resource_scatter_add, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + ResourceScatterAdd::new().build(resource, indices, updates, scope) +} + +/// Builder for the `ResourceScatterDiv` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct ResourceScatterDiv { + dtype: ::std::option::Option, + Tindices: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'ResourceScatterDiv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterDivInst { + /// An instance of a fully built ResourceScatterDiv Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl ResourceScatterDiv { + /// Creates a new `ResourceScatterDiv`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `dtype` attribute. + pub fn dtype>(mut self, value: ArgType) -> Self { + self.dtype = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `Tindices` attribute. + pub fn Tindices>(mut self, value: ArgType) -> Self { + self.Tindices = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `ResourceScatterDiv` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(resource.into(), indices.into(), updates.into(), scope) + } + fn build_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("ResourceScatterDiv", |nd| { + nd.add_input(resource); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ResourceScatterDiv` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterDiv", |nd| { + nd.add_input(resource); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterDivInst{op}) + } +} +impl ResourceScatterDivInst { +} +impl Into for ResourceScatterDivInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `ResourceScatterDiv::new().build(resource, indices, updates, scope)`. +pub fn resource_scatter_div, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + ResourceScatterDiv::new().build(resource, indices, updates, scope) +} + +/// Builder for the `ResourceScatterMax` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct ResourceScatterMax { + dtype: ::std::option::Option, + Tindices: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'ResourceScatterMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterMaxInst { + /// An instance of a fully built ResourceScatterMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl ResourceScatterMax { + /// Creates a new `ResourceScatterMax`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `dtype` attribute. + pub fn dtype>(mut self, value: ArgType) -> Self { + self.dtype = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `Tindices` attribute. + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -88160,235 +106242,63 @@ impl ResourceScatterAdd { self } - /// Builds the `ResourceScatterAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + /// Builds the `ResourceScatterMax` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("ResourceScatterAdd", |nd| { + fn build_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("ResourceScatterMax", |nd| { nd.add_input(resource); nd.add_input(indices); nd.add_input(updates); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} -/// Shorthand for `ResourceScatterAdd::new().build(resource, indices, updates, scope)`. -pub fn resource_scatter_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceScatterAdd::new().build(resource, indices, updates, scope) -} -/// Builder for the `ResourceScatterDiv` operation. -#[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct ResourceScatterDiv { - dtype: ::std::option::Option, - Tindices: ::std::option::Option, - control_inputs: ::std::vec::Vec, -} - -impl ResourceScatterDiv { - /// Creates a new `ResourceScatterDiv`. - pub fn new() -> Self { - Self::default() - } - - /// Sets the `dtype` attribute. - pub fn dtype>(mut self, value: ArgType) -> Self { - self.dtype = ::std::option::Option::Some(value.into()); - self + /// Builds the `ResourceScatterMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), indices.into(), updates.into(), scope) } - - /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { - self.Tindices = ::std::option::Option::Some(value.into()); - self - } - - /// Adds a control input. - pub fn add_control_input(mut self, op: crate::Operation) -> Self { - self.control_inputs.push(op); - self - } - - /// Builds the `ResourceScatterDiv` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl(resource.into(), indices.into(), updates.into(), scope) - } - - fn build_impl( - &self, - resource: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("ResourceScatterDiv", |nd| { + fn build_instance_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterMax", |nd| { nd.add_input(resource); nd.add_input(indices); nd.add_input(updates); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) - }) + })?; + Ok(ResourceScatterMaxInst{op}) } } - -/// Shorthand for `ResourceScatterDiv::new().build(resource, indices, updates, scope)`. -pub fn resource_scatter_div< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceScatterDiv::new().build(resource, indices, updates, scope) -} -/// Builder for the `ResourceScatterMax` operation. -#[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct ResourceScatterMax { - dtype: ::std::option::Option, - Tindices: ::std::option::Option, - control_inputs: ::std::vec::Vec, +impl ResourceScatterMaxInst { } - -impl ResourceScatterMax { - /// Creates a new `ResourceScatterMax`. - pub fn new() -> Self { - Self::default() - } - - /// Sets the `dtype` attribute. - pub fn dtype>(mut self, value: ArgType) -> Self { - self.dtype = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { - self.Tindices = ::std::option::Option::Some(value.into()); - self - } - - /// Adds a control input. - pub fn add_control_input(mut self, op: crate::Operation) -> Self { - self.control_inputs.push(op); - self - } - - /// Builds the `ResourceScatterMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl(resource.into(), indices.into(), updates.into(), scope) - } - - fn build_impl( - &self, - resource: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("ResourceScatterMax", |nd| { - nd.add_input(resource); - nd.add_input(indices); - nd.add_input(updates); - for op in &self.control_inputs { - nd.add_control_input(op); - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - ::std::result::Result::Ok(()) - }) +impl Into for ResourceScatterMaxInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ResourceScatterMax::new().build(resource, indices, updates, scope)`. -pub fn resource_scatter_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_scatter_max, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ResourceScatterMax::new().build(resource, indices, updates, scope) } + /// Builder for the `ResourceScatterMin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceScatterMin { @@ -88396,6 +106306,12 @@ pub struct ResourceScatterMin { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceScatterMin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterMinInst { + /// An instance of a fully built ResourceScatterMin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceScatterMin { /// Creates a new `ResourceScatterMin`. @@ -88410,10 +106326,7 @@ impl ResourceScatterMin { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -88425,27 +106338,10 @@ impl ResourceScatterMin { } /// Builds the `ResourceScatterMin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceScatterMin", |nd| { nd.add_input(resource); nd.add_input(indices); @@ -88453,30 +106349,51 @@ impl ResourceScatterMin { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceScatterMin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterMin", |nd| { + nd.add_input(resource); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterMinInst{op}) + } +} +impl ResourceScatterMinInst { +} +impl Into for ResourceScatterMinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceScatterMin::new().build(resource, indices, updates, scope)`. -pub fn resource_scatter_min< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_scatter_min, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ResourceScatterMin::new().build(resource, indices, updates, scope) } + /// Builder for the `ResourceScatterMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceScatterMul { @@ -88484,6 +106401,12 @@ pub struct ResourceScatterMul { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceScatterMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterMulInst { + /// An instance of a fully built ResourceScatterMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceScatterMul { /// Creates a new `ResourceScatterMul`. @@ -88498,10 +106421,7 @@ impl ResourceScatterMul { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -88513,27 +106433,10 @@ impl ResourceScatterMul { } /// Builds the `ResourceScatterMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceScatterMul", |nd| { nd.add_input(resource); nd.add_input(indices); @@ -88541,30 +106444,51 @@ impl ResourceScatterMul { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceScatterMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterMul", |nd| { + nd.add_input(resource); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterMulInst{op}) + } +} +impl ResourceScatterMulInst { +} +impl Into for ResourceScatterMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceScatterMul::new().build(resource, indices, updates, scope)`. -pub fn resource_scatter_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_scatter_mul, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ResourceScatterMul::new().build(resource, indices, updates, scope) } + /// Builder for the `ResourceScatterNdAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceScatterNdAdd { @@ -88573,6 +106497,12 @@ pub struct ResourceScatterNdAdd { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceScatterNdAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterNdAddInst { + /// An instance of a fully built ResourceScatterNdAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceScatterNdAdd { /// Creates a new `ResourceScatterNdAdd`. @@ -88587,10 +106517,7 @@ impl ResourceScatterNdAdd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -88608,27 +106535,10 @@ impl ResourceScatterNdAdd { } /// Builds the `ResourceScatterNdAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceScatterNdAdd", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -88636,33 +106546,57 @@ impl ResourceScatterNdAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceScatterNdAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterNdAdd", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterNdAddInst{op}) + } +} +impl ResourceScatterNdAddInst { +} +impl Into for ResourceScatterNdAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceScatterNdAdd::new().build(ref_, indices, updates, scope)`. -pub fn resource_scatter_nd_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_scatter_nd_add, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ResourceScatterNdAdd::new().build(ref_, indices, updates, scope) } + /// Builder for the `ResourceScatterNdMax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceScatterNdMax { @@ -88671,6 +106605,12 @@ pub struct ResourceScatterNdMax { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceScatterNdMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterNdMaxInst { + /// An instance of a fully built ResourceScatterNdMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceScatterNdMax { /// Creates a new `ResourceScatterNdMax`. @@ -88685,10 +106625,7 @@ impl ResourceScatterNdMax { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -88706,27 +106643,10 @@ impl ResourceScatterNdMax { } /// Builds the `ResourceScatterNdMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceScatterNdMax", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -88734,33 +106654,57 @@ impl ResourceScatterNdMax { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceScatterNdMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterNdMax", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterNdMaxInst{op}) + } +} +impl ResourceScatterNdMaxInst { +} +impl Into for ResourceScatterNdMaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceScatterNdMax::new().build(ref_, indices, updates, scope)`. -pub fn resource_scatter_nd_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_scatter_nd_max, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ResourceScatterNdMax::new().build(ref_, indices, updates, scope) } + /// Builder for the `ResourceScatterNdMin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceScatterNdMin { @@ -88769,6 +106713,12 @@ pub struct ResourceScatterNdMin { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceScatterNdMin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterNdMinInst { + /// An instance of a fully built ResourceScatterNdMin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceScatterNdMin { /// Creates a new `ResourceScatterNdMin`. @@ -88783,10 +106733,7 @@ impl ResourceScatterNdMin { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -88804,27 +106751,10 @@ impl ResourceScatterNdMin { } /// Builds the `ResourceScatterNdMin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceScatterNdMin", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -88832,33 +106762,57 @@ impl ResourceScatterNdMin { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceScatterNdMin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterNdMin", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterNdMinInst{op}) + } +} +impl ResourceScatterNdMinInst { +} +impl Into for ResourceScatterNdMinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceScatterNdMin::new().build(ref_, indices, updates, scope)`. -pub fn resource_scatter_nd_min< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_scatter_nd_min, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ResourceScatterNdMin::new().build(ref_, indices, updates, scope) } + /// Builder for the `ResourceScatterNdSub` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceScatterNdSub { @@ -88867,6 +106821,12 @@ pub struct ResourceScatterNdSub { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceScatterNdSub' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterNdSubInst { + /// An instance of a fully built ResourceScatterNdSub Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceScatterNdSub { /// Creates a new `ResourceScatterNdSub`. @@ -88881,10 +106841,7 @@ impl ResourceScatterNdSub { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -88902,27 +106859,10 @@ impl ResourceScatterNdSub { } /// Builds the `ResourceScatterNdSub` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceScatterNdSub", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -88930,33 +106870,57 @@ impl ResourceScatterNdSub { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceScatterNdSub` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterNdSub", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterNdSubInst{op}) + } +} +impl ResourceScatterNdSubInst { +} +impl Into for ResourceScatterNdSubInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceScatterNdSub::new().build(ref_, indices, updates, scope)`. -pub fn resource_scatter_nd_sub< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_scatter_nd_sub, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ResourceScatterNdSub::new().build(ref_, indices, updates, scope) } + /// Builder for the `ResourceScatterNdUpdate` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceScatterNdUpdate { @@ -88965,6 +106929,12 @@ pub struct ResourceScatterNdUpdate { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceScatterNdUpdate' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterNdUpdateInst { + /// An instance of a fully built ResourceScatterNdUpdate Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceScatterNdUpdate { /// Creates a new `ResourceScatterNdUpdate`. @@ -88979,10 +106949,7 @@ impl ResourceScatterNdUpdate { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -89000,27 +106967,10 @@ impl ResourceScatterNdUpdate { } /// Builds the `ResourceScatterNdUpdate` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceScatterNdUpdate", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -89028,33 +106978,57 @@ impl ResourceScatterNdUpdate { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceScatterNdUpdate` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterNdUpdate", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterNdUpdateInst{op}) + } +} +impl ResourceScatterNdUpdateInst { +} +impl Into for ResourceScatterNdUpdateInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceScatterNdUpdate::new().build(ref_, indices, updates, scope)`. -pub fn resource_scatter_nd_update< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_scatter_nd_update, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ResourceScatterNdUpdate::new().build(ref_, indices, updates, scope) } + /// Builder for the `ResourceScatterSub` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceScatterSub { @@ -89062,6 +107036,12 @@ pub struct ResourceScatterSub { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceScatterSub' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterSubInst { + /// An instance of a fully built ResourceScatterSub Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceScatterSub { /// Creates a new `ResourceScatterSub`. @@ -89076,10 +107056,7 @@ impl ResourceScatterSub { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -89091,27 +107068,10 @@ impl ResourceScatterSub { } /// Builds the `ResourceScatterSub` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceScatterSub", |nd| { nd.add_input(resource); nd.add_input(indices); @@ -89119,30 +107079,51 @@ impl ResourceScatterSub { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceScatterSub` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterSub", |nd| { + nd.add_input(resource); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterSubInst{op}) + } +} +impl ResourceScatterSubInst { +} +impl Into for ResourceScatterSubInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceScatterSub::new().build(resource, indices, updates, scope)`. -pub fn resource_scatter_sub< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_scatter_sub, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ResourceScatterSub::new().build(resource, indices, updates, scope) } + /// Builder for the `ResourceScatterUpdate` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceScatterUpdate { @@ -89150,6 +107131,12 @@ pub struct ResourceScatterUpdate { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceScatterUpdate' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceScatterUpdateInst { + /// An instance of a fully built ResourceScatterUpdate Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceScatterUpdate { /// Creates a new `ResourceScatterUpdate`. @@ -89164,10 +107151,7 @@ impl ResourceScatterUpdate { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -89179,27 +107163,10 @@ impl ResourceScatterUpdate { } /// Builds the `ResourceScatterUpdate` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceScatterUpdate", |nd| { nd.add_input(resource); nd.add_input(indices); @@ -89207,30 +107174,51 @@ impl ResourceScatterUpdate { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceScatterUpdate` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceScatterUpdate", |nd| { + nd.add_input(resource); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceScatterUpdateInst{op}) + } +} +impl ResourceScatterUpdateInst { +} +impl Into for ResourceScatterUpdateInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceScatterUpdate::new().build(resource, indices, updates, scope)`. -pub fn resource_scatter_update< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_scatter_update, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ResourceScatterUpdate::new().build(resource, indices, updates, scope) } + /// Builder for the `ResourceSparseApplyAdadelta` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyAdadelta { @@ -89239,6 +107227,12 @@ pub struct ResourceSparseApplyAdadelta { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyAdadelta' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyAdadeltaInst { + /// An instance of a fully built ResourceSparseApplyAdadelta Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyAdadelta { /// Creates a new `ResourceSparseApplyAdadelta`. @@ -89253,10 +107247,7 @@ impl ResourceSparseApplyAdadelta { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -89274,52 +107265,10 @@ impl ResourceSparseApplyAdadelta { } /// Builds the `ResourceSparseApplyAdadelta` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - accum_update: O2, - lr: O3, - rho: O4, - epsilon: O5, - grad: O6, - indices: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - accum_update.into(), - lr.into(), - rho.into(), - epsilon.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - accum_update: crate::Output, - lr: crate::Output, - rho: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, indices: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), accum_update.into(), lr.into(), rho.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, accum_update: crate::Output, lr: crate::Output, rho: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceSparseApplyAdadelta", |nd| { nd.add_input(var); nd.add_input(accum); @@ -89332,53 +107281,62 @@ impl ResourceSparseApplyAdadelta { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceSparseApplyAdadelta` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, indices: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), accum_update.into(), lr.into(), rho.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, accum_update: crate::Output, lr: crate::Output, rho: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyAdadelta", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(accum_update); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(epsilon); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyAdadeltaInst{op}) + } +} +impl ResourceSparseApplyAdadeltaInst { +} +impl Into for ResourceSparseApplyAdadeltaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceSparseApplyAdadelta::new().build(var, accum, accum_update, lr, rho, epsilon, grad, indices, scope)`. -pub fn resource_sparse_apply_adadelta< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - var: O0, - accum: O1, - accum_update: O2, - lr: O3, - rho: O4, - epsilon: O5, - grad: O6, - indices: O7, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceSparseApplyAdadelta::new().build( - var, - accum, - accum_update, - lr, - rho, - epsilon, - grad, - indices, - scope, - ) +pub fn resource_sparse_apply_adadelta, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, indices: O7, scope: &mut crate::Scope) -> crate::Result { + ResourceSparseApplyAdadelta::new().build(var, accum, accum_update, lr, rho, epsilon, grad, indices, scope) } + /// Builder for the `ResourceSparseApplyAdagrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyAdagrad { @@ -89388,6 +107346,12 @@ pub struct ResourceSparseApplyAdagrad { update_slots: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyAdagrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyAdagradInst { + /// An instance of a fully built ResourceSparseApplyAdagrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyAdagrad { /// Creates a new `ResourceSparseApplyAdagrad`. @@ -89402,10 +107366,7 @@ impl ResourceSparseApplyAdagrad { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -89429,40 +107390,10 @@ impl ResourceSparseApplyAdagrad { } /// Builds the `ResourceSparseApplyAdagrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - grad: O3, - indices: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, indices: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceSparseApplyAdagrad", |nd| { nd.add_input(var); nd.add_input(accum); @@ -89472,40 +107403,65 @@ impl ResourceSparseApplyAdagrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.update_slots { - nd.set_attr_bool("update_slots", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceSparseApplyAdagrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, indices: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyAdagrad", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyAdagradInst{op}) + } +} +impl ResourceSparseApplyAdagradInst { +} +impl Into for ResourceSparseApplyAdagradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceSparseApplyAdagrad::new().build(var, accum, lr, grad, indices, scope)`. -pub fn resource_sparse_apply_adagrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - grad: O3, - indices: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_sparse_apply_adagrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(var: O0, accum: O1, lr: O2, grad: O3, indices: O4, scope: &mut crate::Scope) -> crate::Result { ResourceSparseApplyAdagrad::new().build(var, accum, lr, grad, indices, scope) } + /// Builder for the `ResourceSparseApplyAdagradDA` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyAdagradDA { @@ -89514,6 +107470,12 @@ pub struct ResourceSparseApplyAdagradDA { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyAdagradDA' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyAdagradDAInst { + /// An instance of a fully built ResourceSparseApplyAdagradDA Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyAdagradDA { /// Creates a new `ResourceSparseApplyAdagradDA`. @@ -89528,10 +107490,7 @@ impl ResourceSparseApplyAdagradDA { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -89549,56 +107508,10 @@ impl ResourceSparseApplyAdagradDA { } /// Builds the `ResourceSparseApplyAdagradDA` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - gradient_accumulator: O1, - gradient_squared_accumulator: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - global_step: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - gradient_accumulator.into(), - gradient_squared_accumulator.into(), - grad.into(), - indices.into(), - lr.into(), - l1.into(), - l2.into(), - global_step.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - gradient_accumulator: crate::Output, - gradient_squared_accumulator: crate::Output, - grad: crate::Output, - indices: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - global_step: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, global_step: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), gradient_accumulator.into(), gradient_squared_accumulator.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), global_step.into(), scope) + } + fn build_impl(&self, var: crate::Output, gradient_accumulator: crate::Output, gradient_squared_accumulator: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceSparseApplyAdagradDA", |nd| { nd.add_input(var); nd.add_input(gradient_accumulator); @@ -89612,56 +107525,63 @@ impl ResourceSparseApplyAdagradDA { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceSparseApplyAdagradDA` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, global_step: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), gradient_accumulator.into(), gradient_squared_accumulator.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), global_step.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, gradient_accumulator: crate::Output, gradient_squared_accumulator: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyAdagradDA", |nd| { + nd.add_input(var); + nd.add_input(gradient_accumulator); + nd.add_input(gradient_squared_accumulator); + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(global_step); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyAdagradDAInst{op}) + } +} +impl ResourceSparseApplyAdagradDAInst { +} +impl Into for ResourceSparseApplyAdagradDAInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceSparseApplyAdagradDA::new().build(var, gradient_accumulator, gradient_squared_accumulator, grad, indices, lr, l1, l2, global_step, scope)`. -pub fn resource_sparse_apply_adagrad_da< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - gradient_accumulator: O1, - gradient_squared_accumulator: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - global_step: O8, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceSparseApplyAdagradDA::new().build( - var, - gradient_accumulator, - gradient_squared_accumulator, - grad, - indices, - lr, - l1, - l2, - global_step, - scope, - ) +pub fn resource_sparse_apply_adagrad_da, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, global_step: O8, scope: &mut crate::Scope) -> crate::Result { + ResourceSparseApplyAdagradDA::new().build(var, gradient_accumulator, gradient_squared_accumulator, grad, indices, lr, l1, l2, global_step, scope) } + /// Builder for the `ResourceSparseApplyAdagradV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyAdagradV2 { @@ -89671,6 +107591,12 @@ pub struct ResourceSparseApplyAdagradV2 { update_slots: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyAdagradV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyAdagradV2Inst { + /// An instance of a fully built ResourceSparseApplyAdagradV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyAdagradV2 { /// Creates a new `ResourceSparseApplyAdagradV2`. @@ -89685,10 +107611,7 @@ impl ResourceSparseApplyAdagradV2 { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -89712,44 +107635,10 @@ impl ResourceSparseApplyAdagradV2 { } /// Builds the `ResourceSparseApplyAdagradV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - epsilon: O3, - grad: O4, - indices: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - epsilon.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceSparseApplyAdagradV2", |nd| { nd.add_input(var); nd.add_input(accum); @@ -89760,42 +107649,66 @@ impl ResourceSparseApplyAdagradV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.update_slots { - nd.set_attr_bool("update_slots", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceSparseApplyAdagradV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyAdagradV2", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(epsilon); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyAdagradV2Inst{op}) + } +} +impl ResourceSparseApplyAdagradV2Inst { +} +impl Into for ResourceSparseApplyAdagradV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceSparseApplyAdagradV2::new().build(var, accum, lr, epsilon, grad, indices, scope)`. -pub fn resource_sparse_apply_adagrad_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - epsilon: O3, - grad: O4, - indices: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_sparse_apply_adagrad_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { ResourceSparseApplyAdagradV2::new().build(var, accum, lr, epsilon, grad, indices, scope) } + /// Builder for the `ResourceSparseApplyCenteredRMSProp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyCenteredRMSProp { @@ -89804,6 +107717,12 @@ pub struct ResourceSparseApplyCenteredRMSProp { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyCenteredRMSProp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyCenteredRMSPropInst { + /// An instance of a fully built ResourceSparseApplyCenteredRMSProp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyCenteredRMSProp { /// Creates a new `ResourceSparseApplyCenteredRMSProp`. @@ -89818,10 +107737,7 @@ impl ResourceSparseApplyCenteredRMSProp { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -89839,60 +107755,10 @@ impl ResourceSparseApplyCenteredRMSProp { } /// Builds the `ResourceSparseApplyCenteredRMSProp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - var: O0, - mg: O1, - ms: O2, - mom: O3, - lr: O4, - rho: O5, - momentum: O6, - epsilon: O7, - grad: O8, - indices: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - mg.into(), - ms.into(), - mom.into(), - lr.into(), - rho.into(), - momentum.into(), - epsilon.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - mg: crate::Output, - ms: crate::Output, - mom: crate::Output, - lr: crate::Output, - rho: crate::Output, - momentum: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, indices: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), mg.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, mg: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceSparseApplyCenteredRMSProp", |nd| { nd.add_input(var); nd.add_input(mg); @@ -89907,49 +107773,64 @@ impl ResourceSparseApplyCenteredRMSProp { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceSparseApplyCenteredRMSProp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, indices: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), mg.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, mg: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyCenteredRMSProp", |nd| { + nd.add_input(var); + nd.add_input(mg); + nd.add_input(ms); + nd.add_input(mom); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(momentum); + nd.add_input(epsilon); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyCenteredRMSPropInst{op}) + } +} +impl ResourceSparseApplyCenteredRMSPropInst { +} +impl Into for ResourceSparseApplyCenteredRMSPropInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceSparseApplyCenteredRMSProp::new().build(var, mg, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope)`. -pub fn resource_sparse_apply_centered_rmsprop< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - var: O0, - mg: O1, - ms: O2, - mom: O3, - lr: O4, - rho: O5, - momentum: O6, - epsilon: O7, - grad: O8, - indices: O9, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceSparseApplyCenteredRMSProp::new().build( - var, mg, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope, - ) +pub fn resource_sparse_apply_centered_rmsprop, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, indices: O9, scope: &mut crate::Scope) -> crate::Result { + ResourceSparseApplyCenteredRMSProp::new().build(var, mg, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope) } + /// Builder for the `ResourceSparseApplyFtrl` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyFtrl { @@ -89959,6 +107840,12 @@ pub struct ResourceSparseApplyFtrl { multiply_linear_by_lr: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyFtrl' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyFtrlInst { + /// An instance of a fully built ResourceSparseApplyFtrl Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyFtrl { /// Creates a new `ResourceSparseApplyFtrl`. @@ -89973,10 +107860,7 @@ impl ResourceSparseApplyFtrl { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -89988,10 +107872,7 @@ impl ResourceSparseApplyFtrl { } /// Sets the `multiply_linear_by_lr` attribute. - pub fn multiply_linear_by_lr>( - mut self, - value: ArgType, - ) -> Self { + pub fn multiply_linear_by_lr>(mut self, value: ArgType) -> Self { self.multiply_linear_by_lr = ::std::option::Option::Some(value.into()); self } @@ -90003,56 +107884,10 @@ impl ResourceSparseApplyFtrl { } /// Builds the `ResourceSparseApplyFtrl` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - linear: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - lr_power: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - linear.into(), - grad.into(), - indices.into(), - lr.into(), - l1.into(), - l2.into(), - lr_power.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - linear: crate::Output, - grad: crate::Output, - indices: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - lr_power: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), linear.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), lr_power.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceSparseApplyFtrl", |nd| { nd.add_input(var); nd.add_input(accum); @@ -90066,50 +107901,69 @@ impl ResourceSparseApplyFtrl { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { - nd.set_attr_bool("multiply_linear_by_lr", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceSparseApplyFtrl` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), linear.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), lr_power.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyFtrl", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(linear); + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(lr_power); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyFtrlInst{op}) + } +} +impl ResourceSparseApplyFtrlInst { +} +impl Into for ResourceSparseApplyFtrlInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceSparseApplyFtrl::new().build(var, accum, linear, grad, indices, lr, l1, l2, lr_power, scope)`. -pub fn resource_sparse_apply_ftrl< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - accum: O1, - linear: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - lr_power: O8, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceSparseApplyFtrl::new().build( - var, accum, linear, grad, indices, lr, l1, l2, lr_power, scope, - ) +pub fn resource_sparse_apply_ftrl, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + ResourceSparseApplyFtrl::new().build(var, accum, linear, grad, indices, lr, l1, l2, lr_power, scope) } + /// Builder for the `ResourceSparseApplyFtrlV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyFtrlV2 { @@ -90119,6 +107973,12 @@ pub struct ResourceSparseApplyFtrlV2 { multiply_linear_by_lr: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyFtrlV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyFtrlV2Inst { + /// An instance of a fully built ResourceSparseApplyFtrlV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyFtrlV2 { /// Creates a new `ResourceSparseApplyFtrlV2`. @@ -90133,10 +107993,7 @@ impl ResourceSparseApplyFtrlV2 { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -90148,10 +108005,7 @@ impl ResourceSparseApplyFtrlV2 { } /// Sets the `multiply_linear_by_lr` attribute. - pub fn multiply_linear_by_lr>( - mut self, - value: ArgType, - ) -> Self { + pub fn multiply_linear_by_lr>(mut self, value: ArgType) -> Self { self.multiply_linear_by_lr = ::std::option::Option::Some(value.into()); self } @@ -90163,60 +108017,10 @@ impl ResourceSparseApplyFtrlV2 { } /// Builds the `ResourceSparseApplyFtrlV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - linear: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - l2_shrinkage: O8, - lr_power: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - linear.into(), - grad.into(), - indices.into(), - lr.into(), - l1.into(), - l2.into(), - l2_shrinkage.into(), - lr_power.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - linear: crate::Output, - grad: crate::Output, - indices: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - l2_shrinkage: crate::Output, - lr_power: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, l2_shrinkage: O8, lr_power: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), linear.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), l2_shrinkage.into(), lr_power.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, l2_shrinkage: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceSparseApplyFtrlV2", |nd| { nd.add_input(var); nd.add_input(accum); @@ -90231,62 +108035,70 @@ impl ResourceSparseApplyFtrlV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { - nd.set_attr_bool("multiply_linear_by_lr", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceSparseApplyFtrlV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, l2_shrinkage: O8, lr_power: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), linear.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), l2_shrinkage.into(), lr_power.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, l2_shrinkage: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyFtrlV2", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(linear); + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(l2_shrinkage); + nd.add_input(lr_power); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyFtrlV2Inst{op}) + } +} +impl ResourceSparseApplyFtrlV2Inst { +} +impl Into for ResourceSparseApplyFtrlV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceSparseApplyFtrlV2::new().build(var, accum, linear, grad, indices, lr, l1, l2, l2_shrinkage, lr_power, scope)`. -pub fn resource_sparse_apply_ftrl_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - var: O0, - accum: O1, - linear: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - l2_shrinkage: O8, - lr_power: O9, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceSparseApplyFtrlV2::new().build( - var, - accum, - linear, - grad, - indices, - lr, - l1, - l2, - l2_shrinkage, - lr_power, - scope, - ) +pub fn resource_sparse_apply_ftrl_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, l2_shrinkage: O8, lr_power: O9, scope: &mut crate::Scope) -> crate::Result { + ResourceSparseApplyFtrlV2::new().build(var, accum, linear, grad, indices, lr, l1, l2, l2_shrinkage, lr_power, scope) } + /// Builder for the `ResourceSparseApplyKerasMomentum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyKerasMomentum { @@ -90296,6 +108108,12 @@ pub struct ResourceSparseApplyKerasMomentum { use_nesterov: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyKerasMomentum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyKerasMomentumInst { + /// An instance of a fully built ResourceSparseApplyKerasMomentum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyKerasMomentum { /// Creates a new `ResourceSparseApplyKerasMomentum`. @@ -90310,10 +108128,7 @@ impl ResourceSparseApplyKerasMomentum { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -90337,44 +108152,10 @@ impl ResourceSparseApplyKerasMomentum { } /// Builds the `ResourceSparseApplyKerasMomentum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - grad: O3, - indices: O4, - momentum: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - grad.into(), - indices.into(), - momentum.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - grad: crate::Output, - indices: crate::Output, - momentum: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, indices: O4, momentum: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), grad.into(), indices.into(), momentum.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, indices: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceSparseApplyKerasMomentum", |nd| { nd.add_input(var); nd.add_input(accum); @@ -90385,42 +108166,66 @@ impl ResourceSparseApplyKerasMomentum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_nesterov { - nd.set_attr_bool("use_nesterov", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceSparseApplyKerasMomentum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, indices: O4, momentum: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), grad.into(), indices.into(), momentum.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, indices: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyKerasMomentum", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(momentum); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyKerasMomentumInst{op}) + } +} +impl ResourceSparseApplyKerasMomentumInst { +} +impl Into for ResourceSparseApplyKerasMomentumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceSparseApplyKerasMomentum::new().build(var, accum, lr, grad, indices, momentum, scope)`. -pub fn resource_sparse_apply_keras_momentum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - grad: O3, - indices: O4, - momentum: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_sparse_apply_keras_momentum, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(var: O0, accum: O1, lr: O2, grad: O3, indices: O4, momentum: O5, scope: &mut crate::Scope) -> crate::Result { ResourceSparseApplyKerasMomentum::new().build(var, accum, lr, grad, indices, momentum, scope) } + /// Builder for the `ResourceSparseApplyMomentum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyMomentum { @@ -90430,6 +108235,12 @@ pub struct ResourceSparseApplyMomentum { use_nesterov: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyMomentum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyMomentumInst { + /// An instance of a fully built ResourceSparseApplyMomentum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyMomentum { /// Creates a new `ResourceSparseApplyMomentum`. @@ -90444,10 +108255,7 @@ impl ResourceSparseApplyMomentum { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -90471,44 +108279,10 @@ impl ResourceSparseApplyMomentum { } /// Builds the `ResourceSparseApplyMomentum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - grad: O3, - indices: O4, - momentum: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - grad.into(), - indices.into(), - momentum.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - grad: crate::Output, - indices: crate::Output, - momentum: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, indices: O4, momentum: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), grad.into(), indices.into(), momentum.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, indices: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceSparseApplyMomentum", |nd| { nd.add_input(var); nd.add_input(accum); @@ -90519,42 +108293,66 @@ impl ResourceSparseApplyMomentum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_nesterov { - nd.set_attr_bool("use_nesterov", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceSparseApplyMomentum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, indices: O4, momentum: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), grad.into(), indices.into(), momentum.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, indices: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyMomentum", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(momentum); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyMomentumInst{op}) + } +} +impl ResourceSparseApplyMomentumInst { +} +impl Into for ResourceSparseApplyMomentumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceSparseApplyMomentum::new().build(var, accum, lr, grad, indices, momentum, scope)`. -pub fn resource_sparse_apply_momentum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - grad: O3, - indices: O4, - momentum: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_sparse_apply_momentum, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(var: O0, accum: O1, lr: O2, grad: O3, indices: O4, momentum: O5, scope: &mut crate::Scope) -> crate::Result { ResourceSparseApplyMomentum::new().build(var, accum, lr, grad, indices, momentum, scope) } + /// Builder for the `ResourceSparseApplyProximalAdagrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyProximalAdagrad { @@ -90563,6 +108361,12 @@ pub struct ResourceSparseApplyProximalAdagrad { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyProximalAdagrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyProximalAdagradInst { + /// An instance of a fully built ResourceSparseApplyProximalAdagrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyProximalAdagrad { /// Creates a new `ResourceSparseApplyProximalAdagrad`. @@ -90577,10 +108381,123 @@ impl ResourceSparseApplyProximalAdagrad { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { + self.Tindices = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `use_locking` attribute. + pub fn use_locking>(mut self, value: ArgType) -> Self { + self.use_locking = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `ResourceSparseApplyProximalAdagrad` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, indices: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), l1.into(), l2.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("ResourceSparseApplyProximalAdagrad", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ResourceSparseApplyProximalAdagrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, indices: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), l1.into(), l2.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyProximalAdagrad", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyProximalAdagradInst{op}) + } +} +impl ResourceSparseApplyProximalAdagradInst { +} +impl Into for ResourceSparseApplyProximalAdagradInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `ResourceSparseApplyProximalAdagrad::new().build(var, accum, lr, l1, l2, grad, indices, scope)`. +pub fn resource_sparse_apply_proximal_adagrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, indices: O6, scope: &mut crate::Scope) -> crate::Result { + ResourceSparseApplyProximalAdagrad::new().build(var, accum, lr, l1, l2, grad, indices, scope) +} + +/// Builder for the `ResourceSparseApplyProximalGradientDescent` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct ResourceSparseApplyProximalGradientDescent { + T: ::std::option::Option, + Tindices: ::std::option::Option, + use_locking: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'ResourceSparseApplyProximalGradientDescent' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyProximalGradientDescentInst { + /// An instance of a fully built ResourceSparseApplyProximalGradientDescent Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl ResourceSparseApplyProximalGradientDescent { + /// Creates a new `ResourceSparseApplyProximalGradientDescent`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `T` attribute. + pub fn T>(mut self, value: ArgType) -> Self { + self.T = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `Tindices` attribute. + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -90597,53 +108514,14 @@ impl ResourceSparseApplyProximalAdagrad { self } - /// Builds the `ResourceSparseApplyProximalAdagrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - l1: O3, - l2: O4, - grad: O5, - indices: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - l1.into(), - l2.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("ResourceSparseApplyProximalAdagrad", |nd| { + /// Builds the `ResourceSparseApplyProximalGradientDescent` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, alpha: O1, l1: O2, l2: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), alpha.into(), l1.into(), l2.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, alpha: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("ResourceSparseApplyProximalGradientDescent", |nd| { nd.add_input(var); - nd.add_input(accum); - nd.add_input(lr); + nd.add_input(alpha); nd.add_input(l1); nd.add_input(l2); nd.add_input(grad); @@ -90651,123 +108529,25 @@ impl ResourceSparseApplyProximalAdagrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} - -/// Shorthand for `ResourceSparseApplyProximalAdagrad::new().build(var, accum, lr, l1, l2, grad, indices, scope)`. -pub fn resource_sparse_apply_proximal_adagrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - l1: O3, - l2: O4, - grad: O5, - indices: O6, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceSparseApplyProximalAdagrad::new().build(var, accum, lr, l1, l2, grad, indices, scope) -} -/// Builder for the `ResourceSparseApplyProximalGradientDescent` operation. -#[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct ResourceSparseApplyProximalGradientDescent { - T: ::std::option::Option, - Tindices: ::std::option::Option, - use_locking: ::std::option::Option, - control_inputs: ::std::vec::Vec, -} - -impl ResourceSparseApplyProximalGradientDescent { - /// Creates a new `ResourceSparseApplyProximalGradientDescent`. - pub fn new() -> Self { - Self::default() - } - - /// Sets the `T` attribute. - pub fn T>(mut self, value: ArgType) -> Self { - self.T = ::std::option::Option::Some(value.into()); - self - } - /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { - self.Tindices = ::std::option::Option::Some(value.into()); - self + /// Builds the `ResourceSparseApplyProximalGradientDescent` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, alpha: O1, l1: O2, l2: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), alpha.into(), l1.into(), l2.into(), grad.into(), indices.into(), scope) } - - /// Sets the `use_locking` attribute. - pub fn use_locking>(mut self, value: ArgType) -> Self { - self.use_locking = ::std::option::Option::Some(value.into()); - self - } - - /// Adds a control input. - pub fn add_control_input(mut self, op: crate::Operation) -> Self { - self.control_inputs.push(op); - self - } - - /// Builds the `ResourceSparseApplyProximalGradientDescent` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - var: O0, - alpha: O1, - l1: O2, - l2: O3, - grad: O4, - indices: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - alpha.into(), - l1.into(), - l2.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - alpha: crate::Output, - l1: crate::Output, - l2: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("ResourceSparseApplyProximalGradientDescent", |nd| { + fn build_instance_impl(&self, var: crate::Output, alpha: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyProximalGradientDescent", |nd| { nd.add_input(var); nd.add_input(alpha); nd.add_input(l1); @@ -90777,40 +108557,32 @@ impl ResourceSparseApplyProximalGradientDescent { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) - }) + })?; + Ok(ResourceSparseApplyProximalGradientDescentInst{op}) + } +} +impl ResourceSparseApplyProximalGradientDescentInst { +} +impl Into for ResourceSparseApplyProximalGradientDescentInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ResourceSparseApplyProximalGradientDescent::new().build(var, alpha, l1, l2, grad, indices, scope)`. -pub fn resource_sparse_apply_proximal_gradient_descent< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - var: O0, - alpha: O1, - l1: O2, - l2: O3, - grad: O4, - indices: O5, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceSparseApplyProximalGradientDescent::new() - .build(var, alpha, l1, l2, grad, indices, scope) +pub fn resource_sparse_apply_proximal_gradient_descent, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(var: O0, alpha: O1, l1: O2, l2: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { + ResourceSparseApplyProximalGradientDescent::new().build(var, alpha, l1, l2, grad, indices, scope) } + /// Builder for the `ResourceSparseApplyRMSProp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceSparseApplyRMSProp { @@ -90819,6 +108591,12 @@ pub struct ResourceSparseApplyRMSProp { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceSparseApplyRMSProp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceSparseApplyRMSPropInst { + /// An instance of a fully built ResourceSparseApplyRMSProp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceSparseApplyRMSProp { /// Creates a new `ResourceSparseApplyRMSProp`. @@ -90833,10 +108611,7 @@ impl ResourceSparseApplyRMSProp { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -90854,56 +108629,10 @@ impl ResourceSparseApplyRMSProp { } /// Builds the `ResourceSparseApplyRMSProp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - ms: O1, - mom: O2, - lr: O3, - rho: O4, - momentum: O5, - epsilon: O6, - grad: O7, - indices: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - ms.into(), - mom.into(), - lr.into(), - rho.into(), - momentum.into(), - epsilon.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - ms: crate::Output, - mom: crate::Output, - lr: crate::Output, - rho: crate::Output, - momentum: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, indices: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceSparseApplyRMSProp", |nd| { nd.add_input(var); nd.add_input(ms); @@ -90917,47 +108646,63 @@ impl ResourceSparseApplyRMSProp { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceSparseApplyRMSProp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, indices: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceSparseApplyRMSProp", |nd| { + nd.add_input(var); + nd.add_input(ms); + nd.add_input(mom); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(momentum); + nd.add_input(epsilon); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceSparseApplyRMSPropInst{op}) + } +} +impl ResourceSparseApplyRMSPropInst { +} +impl Into for ResourceSparseApplyRMSPropInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceSparseApplyRMSProp::new().build(var, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope)`. -pub fn resource_sparse_apply_rmsprop< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - ms: O1, - mom: O2, - lr: O3, - rho: O4, - momentum: O5, - epsilon: O6, - grad: O7, - indices: O8, - scope: &mut crate::Scope, -) -> crate::Result { - ResourceSparseApplyRMSProp::new().build( - var, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope, - ) +pub fn resource_sparse_apply_rmsprop, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, indices: O8, scope: &mut crate::Scope) -> crate::Result { + ResourceSparseApplyRMSProp::new().build(var, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope) } + /// Builder for the `ResourceStridedSliceAssign` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ResourceStridedSliceAssign { @@ -90970,6 +108715,12 @@ pub struct ResourceStridedSliceAssign { shrink_axis_mask: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ResourceStridedSliceAssign' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ResourceStridedSliceAssignInst { + /// An instance of a fully built ResourceStridedSliceAssign Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ResourceStridedSliceAssign { /// Creates a new `ResourceStridedSliceAssign`. @@ -91026,40 +108777,10 @@ impl ResourceStridedSliceAssign { } /// Builds the `ResourceStridedSliceAssign` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - ref_: O0, - begin: O1, - end: O2, - strides: O3, - value: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - ref_.into(), - begin.into(), - end.into(), - strides.into(), - value.into(), - scope, - ) - } - - fn build_impl( - &self, - ref_: crate::Output, - begin: crate::Output, - end: crate::Output, - strides: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, ref_: O0, begin: O1, end: O2, strides: O3, value: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(ref_.into(), begin.into(), end.into(), strides.into(), value.into(), scope) + } + fn build_impl(&self, ref_: crate::Output, begin: crate::Output, end: crate::Output, strides: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ResourceStridedSliceAssign", |nd| { nd.add_input(ref_); nd.add_input(begin); @@ -91069,49 +108790,83 @@ impl ResourceStridedSliceAssign { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Index { - nd.set_attr_type("Index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.begin_mask { - nd.set_attr_int("begin_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.end_mask { - nd.set_attr_int("end_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ellipsis_mask { - nd.set_attr_int("ellipsis_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.new_axis_mask { - nd.set_attr_int("new_axis_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { - nd.set_attr_int("shrink_axis_mask", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.begin_mask { + nd.set_attr_int("begin_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.end_mask { + nd.set_attr_int("end_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ellipsis_mask { + nd.set_attr_int("ellipsis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.new_axis_mask { + nd.set_attr_int("new_axis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { + nd.set_attr_int("shrink_axis_mask", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ResourceStridedSliceAssign` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, ref_: O0, begin: O1, end: O2, strides: O3, value: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), begin.into(), end.into(), strides.into(), value.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, begin: crate::Output, end: crate::Output, strides: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ResourceStridedSliceAssign", |nd| { + nd.add_input(ref_); + nd.add_input(begin); + nd.add_input(end); + nd.add_input(strides); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.begin_mask { + nd.set_attr_int("begin_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.end_mask { + nd.set_attr_int("end_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ellipsis_mask { + nd.set_attr_int("ellipsis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.new_axis_mask { + nd.set_attr_int("new_axis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { + nd.set_attr_int("shrink_axis_mask", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ResourceStridedSliceAssignInst{op}) + } +} +impl ResourceStridedSliceAssignInst { +} +impl Into for ResourceStridedSliceAssignInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ResourceStridedSliceAssign::new().build(ref_, begin, end, strides, value, scope)`. -pub fn resource_strided_slice_assign< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - ref_: O0, - begin: O1, - end: O2, - strides: O3, - value: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn resource_strided_slice_assign, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(ref_: O0, begin: O1, end: O2, strides: O3, value: O4, scope: &mut crate::Scope) -> crate::Result { ResourceStridedSliceAssign::new().build(ref_, begin, end, strides, value, scope) } + /// Builder for the `Restore` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Restore { @@ -91119,6 +108874,12 @@ pub struct Restore { preferred_shard: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Restore' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RestoreInst { + /// An instance of a fully built Restore Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Restore { /// Creates a new `Restore`. @@ -91145,49 +108906,67 @@ impl Restore { } /// Builds the `Restore` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - file_pattern: O0, - tensor_name: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, file_pattern: O0, tensor_name: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(file_pattern.into(), tensor_name.into(), scope) } - - fn build_impl( - &self, - file_pattern: crate::Output, - tensor_name: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, file_pattern: crate::Output, tensor_name: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Restore", |nd| { nd.add_input(file_pattern); nd.add_input(tensor_name); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dt { - nd.set_attr_type("dt", *value)?; - } - if let ::std::option::Option::Some(value) = &self.preferred_shard { - nd.set_attr_int("preferred_shard", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dt { + nd.set_attr_type("dt", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preferred_shard { + nd.set_attr_int("preferred_shard", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Restore` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, file_pattern: O0, tensor_name: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(file_pattern.into(), tensor_name.into(), scope) + } + fn build_instance_impl(&self, file_pattern: crate::Output, tensor_name: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Restore", |nd| { + nd.add_input(file_pattern); + nd.add_input(tensor_name); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dt { + nd.set_attr_type("dt", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preferred_shard { + nd.set_attr_int("preferred_shard", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RestoreInst{op}) + } +} +impl RestoreInst { + /// Returns the 'tensor' output of this 'Restore' operation. + pub fn tensor(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RestoreInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Restore::new().build(file_pattern, tensor_name, scope)`. -pub fn restore, O1: ::std::convert::Into>( - file_pattern: O0, - tensor_name: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn restore, O1: ::std::convert::Into>(file_pattern: O0, tensor_name: O1, scope: &mut crate::Scope) -> crate::Result { Restore::new().build(file_pattern, tensor_name, scope) } + /// Builder for the `RestoreSlice` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RestoreSlice { @@ -91195,6 +108974,12 @@ pub struct RestoreSlice { preferred_shard: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RestoreSlice' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RestoreSliceInst { + /// An instance of a fully built RestoreSlice Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RestoreSlice { /// Creates a new `RestoreSlice`. @@ -91221,32 +109006,10 @@ impl RestoreSlice { } /// Builds the `RestoreSlice` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - file_pattern: O0, - tensor_name: O1, - shape_and_slice: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - file_pattern.into(), - tensor_name.into(), - shape_and_slice.into(), - scope, - ) - } - - fn build_impl( - &self, - file_pattern: crate::Output, - tensor_name: crate::Output, - shape_and_slice: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, file_pattern: O0, tensor_name: O1, shape_and_slice: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(file_pattern.into(), tensor_name.into(), shape_and_slice.into(), scope) + } + fn build_impl(&self, file_pattern: crate::Output, tensor_name: crate::Output, shape_and_slice: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RestoreSlice", |nd| { nd.add_input(file_pattern); nd.add_input(tensor_name); @@ -91254,36 +109017,70 @@ impl RestoreSlice { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dt { - nd.set_attr_type("dt", *value)?; - } - if let ::std::option::Option::Some(value) = &self.preferred_shard { - nd.set_attr_int("preferred_shard", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dt { + nd.set_attr_type("dt", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preferred_shard { + nd.set_attr_int("preferred_shard", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RestoreSlice` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, file_pattern: O0, tensor_name: O1, shape_and_slice: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(file_pattern.into(), tensor_name.into(), shape_and_slice.into(), scope) + } + fn build_instance_impl(&self, file_pattern: crate::Output, tensor_name: crate::Output, shape_and_slice: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RestoreSlice", |nd| { + nd.add_input(file_pattern); + nd.add_input(tensor_name); + nd.add_input(shape_and_slice); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dt { + nd.set_attr_type("dt", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preferred_shard { + nd.set_attr_int("preferred_shard", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RestoreSliceInst{op}) + } +} +impl RestoreSliceInst { + /// Returns the 'tensor' output of this 'RestoreSlice' operation. + pub fn tensor(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RestoreSliceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RestoreSlice::new().build(file_pattern, tensor_name, shape_and_slice, scope)`. -pub fn restore_slice< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - file_pattern: O0, - tensor_name: O1, - shape_and_slice: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn restore_slice, O1: ::std::convert::Into, O2: ::std::convert::Into>(file_pattern: O0, tensor_name: O1, shape_and_slice: O2, scope: &mut crate::Scope) -> crate::Result { RestoreSlice::new().build(file_pattern, tensor_name, shape_and_slice, scope) } + /// Builder for the `RestoreV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RestoreV2 { dtypes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RestoreV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RestoreV2Inst { + /// An instance of a fully built RestoreV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RestoreV2 { /// Creates a new `RestoreV2`. @@ -91292,10 +109089,7 @@ impl RestoreV2 { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } @@ -91307,32 +109101,10 @@ impl RestoreV2 { } /// Builds the `RestoreV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - prefix: O0, - tensor_names: O1, - shape_and_slices: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - prefix.into(), - tensor_names.into(), - shape_and_slices.into(), - scope, - ) - } - - fn build_impl( - &self, - prefix: crate::Output, - tensor_names: crate::Output, - shape_and_slices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, prefix: O0, tensor_names: O1, shape_and_slices: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(prefix.into(), tensor_names.into(), shape_and_slices.into(), scope) + } + fn build_impl(&self, prefix: crate::Output, tensor_names: crate::Output, shape_and_slices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RestoreV2", |nd| { nd.add_input(prefix); nd.add_input(tensor_names); @@ -91340,27 +109112,263 @@ impl RestoreV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RestoreV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, prefix: O0, tensor_names: O1, shape_and_slices: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(prefix.into(), tensor_names.into(), shape_and_slices.into(), scope) + } + fn build_instance_impl(&self, prefix: crate::Output, tensor_names: crate::Output, shape_and_slices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RestoreV2", |nd| { + nd.add_input(prefix); + nd.add_input(tensor_names); + nd.add_input(shape_and_slices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RestoreV2Inst{op}) + } +} +impl RestoreV2Inst { + /// Returns the 'tensors' output of this 'RestoreV2' operation. + pub fn tensors(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RestoreV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RestoreV2::new().build(prefix, tensor_names, shape_and_slices, scope)`. -pub fn restore_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - prefix: O0, - tensor_names: O1, - shape_and_slices: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn restore_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(prefix: O0, tensor_names: O1, shape_and_slices: O2, scope: &mut crate::Scope) -> crate::Result { RestoreV2::new().build(prefix, tensor_names, shape_and_slices, scope) } + +/// Builder for the `RetrieveAllTPUEmbeddingParameters` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct RetrieveAllTPUEmbeddingParameters { + NumTables: ::std::option::Option, + config: ::std::option::Option<::std::string::String>, + num_shards: ::std::option::Option, + shard_id: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'RetrieveAllTPUEmbeddingParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveAllTPUEmbeddingParametersInst { + /// An instance of a fully built RetrieveAllTPUEmbeddingParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl RetrieveAllTPUEmbeddingParameters { + /// Creates a new `RetrieveAllTPUEmbeddingParameters`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `NumTables` attribute. + pub fn NumTables>(mut self, value: ArgType) -> Self { + self.NumTables = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `config` attribute. + pub fn config>(mut self, value: ArgType) -> Self { + self.config = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `num_shards` attribute. + pub fn num_shards>(mut self, value: ArgType) -> Self { + self.num_shards = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `shard_id` attribute. + pub fn shard_id>(mut self, value: ArgType) -> Self { + self.shard_id = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `RetrieveAllTPUEmbeddingParameters` operation. + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(scope) + } + fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("RetrieveAllTPUEmbeddingParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.NumTables { + nd.set_attr_int("NumTables", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `RetrieveAllTPUEmbeddingParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveAllTPUEmbeddingParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.NumTables { + nd.set_attr_int("NumTables", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveAllTPUEmbeddingParametersInst{op}) + } +} +impl RetrieveAllTPUEmbeddingParametersInst { + /// Returns a Vector of Outputs for 'parameters' output of this RetrieveAllTPUEmbeddingParameters operation. + pub fn parameters(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("NumTables")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'auxiliary1' output of this RetrieveAllTPUEmbeddingParameters operation. + pub fn auxiliary1(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("NumTables")?+1) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("NumTables")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'auxiliary2' output of this RetrieveAllTPUEmbeddingParameters operation. + pub fn auxiliary2(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("NumTables")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("NumTables")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'auxiliary3' output of this RetrieveAllTPUEmbeddingParameters operation. + pub fn auxiliary3(&self) -> crate::Result>{ + let dynamic_offset = (3*self.op.get_attr_int("NumTables")?+3) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("NumTables")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'auxiliary4' output of this RetrieveAllTPUEmbeddingParameters operation. + pub fn auxiliary4(&self) -> crate::Result>{ + let dynamic_offset = (4*self.op.get_attr_int("NumTables")?+4) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("NumTables")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'auxiliary5' output of this RetrieveAllTPUEmbeddingParameters operation. + pub fn auxiliary5(&self) -> crate::Result>{ + let dynamic_offset = (5*self.op.get_attr_int("NumTables")?+5) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("NumTables")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'auxiliary6' output of this RetrieveAllTPUEmbeddingParameters operation. + pub fn auxiliary6(&self) -> crate::Result>{ + let dynamic_offset = (6*self.op.get_attr_int("NumTables")?+6) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("NumTables")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'auxiliary7' output of this RetrieveAllTPUEmbeddingParameters operation. + pub fn auxiliary7(&self) -> crate::Result>{ + let dynamic_offset = (7*self.op.get_attr_int("NumTables")?+7) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("NumTables")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for RetrieveAllTPUEmbeddingParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `RetrieveAllTPUEmbeddingParameters::new().build(scope)`. +pub fn retrieve_all_tpuembedding_parameters<>(scope: &mut crate::Scope) -> crate::Result { + RetrieveAllTPUEmbeddingParameters::new().build(scope) +} + /// Builder for the `RetrieveTPUEmbeddingADAMParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingADAMParameters { @@ -91371,6 +109379,12 @@ pub struct RetrieveTPUEmbeddingADAMParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingADAMParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingADAMParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingADAMParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingADAMParameters { /// Creates a new `RetrieveTPUEmbeddingADAMParameters`. @@ -91385,10 +109399,7 @@ impl RetrieveTPUEmbeddingADAMParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -91406,10 +109417,7 @@ impl RetrieveTPUEmbeddingADAMParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -91421,41 +109429,95 @@ impl RetrieveTPUEmbeddingADAMParameters { } /// Builds the `RetrieveTPUEmbeddingADAMParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingADAMParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingADAMParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingADAMParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingADAMParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingADAMParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingADAMParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'momenta' output of this 'RetrieveTPUEmbeddingADAMParameters' operation. + pub fn momenta(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'velocities' output of this 'RetrieveTPUEmbeddingADAMParameters' operation. + pub fn velocities(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for RetrieveTPUEmbeddingADAMParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingADAMParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_adamparameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_adamparameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingADAMParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingAdadeltaParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingAdadeltaParameters { @@ -91466,6 +109528,12 @@ pub struct RetrieveTPUEmbeddingAdadeltaParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingAdadeltaParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingAdadeltaParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingAdadeltaParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingAdadeltaParameters { /// Creates a new `RetrieveTPUEmbeddingAdadeltaParameters`. @@ -91480,10 +109548,7 @@ impl RetrieveTPUEmbeddingAdadeltaParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -91501,10 +109566,7 @@ impl RetrieveTPUEmbeddingAdadeltaParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -91516,41 +109578,95 @@ impl RetrieveTPUEmbeddingAdadeltaParameters { } /// Builds the `RetrieveTPUEmbeddingAdadeltaParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingAdadeltaParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingAdadeltaParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingAdadeltaParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingAdadeltaParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingAdadeltaParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingAdadeltaParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'accumulators' output of this 'RetrieveTPUEmbeddingAdadeltaParameters' operation. + pub fn accumulators(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'updates' output of this 'RetrieveTPUEmbeddingAdadeltaParameters' operation. + pub fn updates(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for RetrieveTPUEmbeddingAdadeltaParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingAdadeltaParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_adadelta_parameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_adadelta_parameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingAdadeltaParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingAdagradMomentumParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingAdagradMomentumParameters { @@ -91561,6 +109677,12 @@ pub struct RetrieveTPUEmbeddingAdagradMomentumParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingAdagradMomentumParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingAdagradMomentumParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingAdagradMomentumParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingAdagradMomentumParameters { /// Creates a new `RetrieveTPUEmbeddingAdagradMomentumParameters`. @@ -91575,10 +109697,7 @@ impl RetrieveTPUEmbeddingAdagradMomentumParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -91596,10 +109715,7 @@ impl RetrieveTPUEmbeddingAdagradMomentumParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -91611,41 +109727,95 @@ impl RetrieveTPUEmbeddingAdagradMomentumParameters { } /// Builds the `RetrieveTPUEmbeddingAdagradMomentumParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingAdagradMomentumParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingAdagradMomentumParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingAdagradMomentumParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingAdagradMomentumParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingAdagradMomentumParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingAdagradMomentumParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'accumulators' output of this 'RetrieveTPUEmbeddingAdagradMomentumParameters' operation. + pub fn accumulators(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'momenta' output of this 'RetrieveTPUEmbeddingAdagradMomentumParameters' operation. + pub fn momenta(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for RetrieveTPUEmbeddingAdagradMomentumParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingAdagradMomentumParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_adagrad_momentum_parameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_adagrad_momentum_parameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingAdagradMomentumParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingAdagradParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingAdagradParameters { @@ -91656,6 +109826,12 @@ pub struct RetrieveTPUEmbeddingAdagradParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingAdagradParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingAdagradParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingAdagradParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingAdagradParameters { /// Creates a new `RetrieveTPUEmbeddingAdagradParameters`. @@ -91670,10 +109846,7 @@ impl RetrieveTPUEmbeddingAdagradParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -91691,10 +109864,7 @@ impl RetrieveTPUEmbeddingAdagradParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -91706,41 +109876,88 @@ impl RetrieveTPUEmbeddingAdagradParameters { } /// Builds the `RetrieveTPUEmbeddingAdagradParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingAdagradParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingAdagradParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingAdagradParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingAdagradParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingAdagradParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingAdagradParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'accumulators' output of this 'RetrieveTPUEmbeddingAdagradParameters' operation. + pub fn accumulators(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for RetrieveTPUEmbeddingAdagradParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingAdagradParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_adagrad_parameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_adagrad_parameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingAdagradParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingCenteredRMSPropParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingCenteredRMSPropParameters { @@ -91751,6 +109968,12 @@ pub struct RetrieveTPUEmbeddingCenteredRMSPropParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingCenteredRMSPropParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingCenteredRMSPropParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingCenteredRMSPropParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingCenteredRMSPropParameters { /// Creates a new `RetrieveTPUEmbeddingCenteredRMSPropParameters`. @@ -91765,10 +109988,7 @@ impl RetrieveTPUEmbeddingCenteredRMSPropParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -91786,10 +110006,7 @@ impl RetrieveTPUEmbeddingCenteredRMSPropParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -91801,41 +110018,102 @@ impl RetrieveTPUEmbeddingCenteredRMSPropParameters { } /// Builds the `RetrieveTPUEmbeddingCenteredRMSPropParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingCenteredRMSPropParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingCenteredRMSPropParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingCenteredRMSPropParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingCenteredRMSPropParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingCenteredRMSPropParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingCenteredRMSPropParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'ms' output of this 'RetrieveTPUEmbeddingCenteredRMSPropParameters' operation. + pub fn ms(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'mom' output of this 'RetrieveTPUEmbeddingCenteredRMSPropParameters' operation. + pub fn mom(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'mg' output of this 'RetrieveTPUEmbeddingCenteredRMSPropParameters' operation. + pub fn mg(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for RetrieveTPUEmbeddingCenteredRMSPropParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingCenteredRMSPropParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_centered_rmsprop_parameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_centered_rmsprop_parameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingCenteredRMSPropParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingFTRLParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingFTRLParameters { @@ -91846,6 +110124,12 @@ pub struct RetrieveTPUEmbeddingFTRLParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingFTRLParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingFTRLParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingFTRLParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingFTRLParameters { /// Creates a new `RetrieveTPUEmbeddingFTRLParameters`. @@ -91860,10 +110144,7 @@ impl RetrieveTPUEmbeddingFTRLParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -91881,10 +110162,7 @@ impl RetrieveTPUEmbeddingFTRLParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -91896,41 +110174,95 @@ impl RetrieveTPUEmbeddingFTRLParameters { } /// Builds the `RetrieveTPUEmbeddingFTRLParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingFTRLParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingFTRLParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingFTRLParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingFTRLParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingFTRLParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingFTRLParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'accumulators' output of this 'RetrieveTPUEmbeddingFTRLParameters' operation. + pub fn accumulators(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'linears' output of this 'RetrieveTPUEmbeddingFTRLParameters' operation. + pub fn linears(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for RetrieveTPUEmbeddingFTRLParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingFTRLParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_ftrlparameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_ftrlparameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingFTRLParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingFrequencyEstimatorParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingFrequencyEstimatorParameters { @@ -91941,6 +110273,12 @@ pub struct RetrieveTPUEmbeddingFrequencyEstimatorParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingFrequencyEstimatorParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingFrequencyEstimatorParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingFrequencyEstimatorParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingFrequencyEstimatorParameters { /// Creates a new `RetrieveTPUEmbeddingFrequencyEstimatorParameters`. @@ -91955,10 +110293,7 @@ impl RetrieveTPUEmbeddingFrequencyEstimatorParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -91976,10 +110311,7 @@ impl RetrieveTPUEmbeddingFrequencyEstimatorParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -91991,41 +110323,88 @@ impl RetrieveTPUEmbeddingFrequencyEstimatorParameters { } /// Builds the `RetrieveTPUEmbeddingFrequencyEstimatorParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingFrequencyEstimatorParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingFrequencyEstimatorParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingFrequencyEstimatorParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingFrequencyEstimatorParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingFrequencyEstimatorParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingFrequencyEstimatorParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'last_hit_step' output of this 'RetrieveTPUEmbeddingFrequencyEstimatorParameters' operation. + pub fn last_hit_step(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for RetrieveTPUEmbeddingFrequencyEstimatorParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingFrequencyEstimatorParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_frequency_estimator_parameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_frequency_estimator_parameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingFrequencyEstimatorParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingMDLAdagradLightParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingMDLAdagradLightParameters { @@ -92036,6 +110415,12 @@ pub struct RetrieveTPUEmbeddingMDLAdagradLightParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingMDLAdagradLightParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingMDLAdagradLightParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingMDLAdagradLightParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingMDLAdagradLightParameters { /// Creates a new `RetrieveTPUEmbeddingMDLAdagradLightParameters`. @@ -92050,10 +110435,7 @@ impl RetrieveTPUEmbeddingMDLAdagradLightParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -92071,10 +110453,7 @@ impl RetrieveTPUEmbeddingMDLAdagradLightParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -92086,41 +110465,102 @@ impl RetrieveTPUEmbeddingMDLAdagradLightParameters { } /// Builds the `RetrieveTPUEmbeddingMDLAdagradLightParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingMDLAdagradLightParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingMDLAdagradLightParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingMDLAdagradLightParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingMDLAdagradLightParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingMDLAdagradLightParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingMDLAdagradLightParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'accumulators' output of this 'RetrieveTPUEmbeddingMDLAdagradLightParameters' operation. + pub fn accumulators(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'weights' output of this 'RetrieveTPUEmbeddingMDLAdagradLightParameters' operation. + pub fn weights(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'benefits' output of this 'RetrieveTPUEmbeddingMDLAdagradLightParameters' operation. + pub fn benefits(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for RetrieveTPUEmbeddingMDLAdagradLightParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingMDLAdagradLightParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_mdladagrad_light_parameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_mdladagrad_light_parameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingMDLAdagradLightParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingMomentumParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingMomentumParameters { @@ -92131,6 +110571,12 @@ pub struct RetrieveTPUEmbeddingMomentumParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingMomentumParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingMomentumParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingMomentumParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingMomentumParameters { /// Creates a new `RetrieveTPUEmbeddingMomentumParameters`. @@ -92145,10 +110591,7 @@ impl RetrieveTPUEmbeddingMomentumParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -92166,10 +110609,7 @@ impl RetrieveTPUEmbeddingMomentumParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -92181,41 +110621,88 @@ impl RetrieveTPUEmbeddingMomentumParameters { } /// Builds the `RetrieveTPUEmbeddingMomentumParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingMomentumParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingMomentumParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingMomentumParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingMomentumParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingMomentumParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingMomentumParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'momenta' output of this 'RetrieveTPUEmbeddingMomentumParameters' operation. + pub fn momenta(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for RetrieveTPUEmbeddingMomentumParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingMomentumParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_momentum_parameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_momentum_parameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingMomentumParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingProximalAdagradParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingProximalAdagradParameters { @@ -92226,6 +110713,12 @@ pub struct RetrieveTPUEmbeddingProximalAdagradParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingProximalAdagradParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingProximalAdagradParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingProximalAdagradParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingProximalAdagradParameters { /// Creates a new `RetrieveTPUEmbeddingProximalAdagradParameters`. @@ -92240,10 +110733,7 @@ impl RetrieveTPUEmbeddingProximalAdagradParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -92261,10 +110751,7 @@ impl RetrieveTPUEmbeddingProximalAdagradParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -92276,41 +110763,88 @@ impl RetrieveTPUEmbeddingProximalAdagradParameters { } /// Builds the `RetrieveTPUEmbeddingProximalAdagradParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingProximalAdagradParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingProximalAdagradParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingProximalAdagradParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingProximalAdagradParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingProximalAdagradParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingProximalAdagradParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'accumulators' output of this 'RetrieveTPUEmbeddingProximalAdagradParameters' operation. + pub fn accumulators(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for RetrieveTPUEmbeddingProximalAdagradParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingProximalAdagradParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_proximal_adagrad_parameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_proximal_adagrad_parameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingProximalAdagradParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingProximalYogiParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingProximalYogiParameters { @@ -92321,6 +110855,12 @@ pub struct RetrieveTPUEmbeddingProximalYogiParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingProximalYogiParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingProximalYogiParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingProximalYogiParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingProximalYogiParameters { /// Creates a new `RetrieveTPUEmbeddingProximalYogiParameters`. @@ -92335,10 +110875,7 @@ impl RetrieveTPUEmbeddingProximalYogiParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -92356,10 +110893,7 @@ impl RetrieveTPUEmbeddingProximalYogiParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -92371,41 +110905,95 @@ impl RetrieveTPUEmbeddingProximalYogiParameters { } /// Builds the `RetrieveTPUEmbeddingProximalYogiParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RetrieveTPUEmbeddingProximalYogiParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RetrieveTPUEmbeddingProximalYogiParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingProximalYogiParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingProximalYogiParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingProximalYogiParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingProximalYogiParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'v' output of this 'RetrieveTPUEmbeddingProximalYogiParameters' operation. + pub fn v(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'm' output of this 'RetrieveTPUEmbeddingProximalYogiParameters' operation. + pub fn m(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for RetrieveTPUEmbeddingProximalYogiParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RetrieveTPUEmbeddingProximalYogiParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_proximal_yogi_parameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_proximal_yogi_parameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingProximalYogiParameters::new().build(scope) } + /// Builder for the `RetrieveTPUEmbeddingRMSPropParameters` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RetrieveTPUEmbeddingRMSPropParameters { @@ -92416,6 +111004,12 @@ pub struct RetrieveTPUEmbeddingRMSPropParameters { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RetrieveTPUEmbeddingRMSPropParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingRMSPropParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingRMSPropParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RetrieveTPUEmbeddingRMSPropParameters { /// Creates a new `RetrieveTPUEmbeddingRMSPropParameters`. @@ -92430,10 +111024,156 @@ impl RetrieveTPUEmbeddingRMSPropParameters { } /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn table_name>(mut self, value: ArgType) -> Self { + self.table_name = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `num_shards` attribute. + pub fn num_shards>(mut self, value: ArgType) -> Self { + self.num_shards = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `shard_id` attribute. + pub fn shard_id>(mut self, value: ArgType) -> Self { + self.shard_id = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `config` attribute. + pub fn config>(mut self, value: ArgType) -> Self { + self.config = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `RetrieveTPUEmbeddingRMSPropParameters` operation. + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(scope) + } + fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("RetrieveTPUEmbeddingRMSPropParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `RetrieveTPUEmbeddingRMSPropParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingRMSPropParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingRMSPropParametersInst{op}) + } +} +impl RetrieveTPUEmbeddingRMSPropParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingRMSPropParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'ms' output of this 'RetrieveTPUEmbeddingRMSPropParameters' operation. + pub fn ms(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'mom' output of this 'RetrieveTPUEmbeddingRMSPropParameters' operation. + pub fn mom(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for RetrieveTPUEmbeddingRMSPropParametersInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `RetrieveTPUEmbeddingRMSPropParameters::new().build(scope)`. +pub fn retrieve_tpuembedding_rmsprop_parameters<>(scope: &mut crate::Scope) -> crate::Result { + RetrieveTPUEmbeddingRMSPropParameters::new().build(scope) +} + +/// Builder for the `RetrieveTPUEmbeddingStochasticGradientDescentParameters` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct RetrieveTPUEmbeddingStochasticGradientDescentParameters { + table_id: ::std::option::Option, + table_name: ::std::option::Option<::std::string::String>, + num_shards: ::std::option::Option, + shard_id: ::std::option::Option, + config: ::std::option::Option<::std::string::String>, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'RetrieveTPUEmbeddingStochasticGradientDescentParameters' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RetrieveTPUEmbeddingStochasticGradientDescentParametersInst { + /// An instance of a fully built RetrieveTPUEmbeddingStochasticGradientDescentParameters Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl RetrieveTPUEmbeddingStochasticGradientDescentParameters { + /// Creates a new `RetrieveTPUEmbeddingStochasticGradientDescentParameters`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `table_id` attribute. + pub fn table_id>(mut self, value: ArgType) -> Self { + self.table_id = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `table_name` attribute. + pub fn table_name>(mut self, value: ArgType) -> Self { self.table_name = ::std::option::Option::Some(value.into()); self } @@ -92451,10 +111191,7 @@ impl RetrieveTPUEmbeddingRMSPropParameters { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -92465,146 +111202,94 @@ impl RetrieveTPUEmbeddingRMSPropParameters { self } - /// Builds the `RetrieveTPUEmbeddingRMSPropParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + /// Builds the `RetrieveTPUEmbeddingStochasticGradientDescentParameters` operation. + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { - scope.new_operation("RetrieveTPUEmbeddingRMSPropParameters", |nd| { + scope.new_operation("RetrieveTPUEmbeddingStochasticGradientDescentParameters", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} -/// Shorthand for `RetrieveTPUEmbeddingRMSPropParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_rmsprop_parameters( - scope: &mut crate::Scope, -) -> crate::Result { - RetrieveTPUEmbeddingRMSPropParameters::new().build(scope) -} -/// Builder for the `RetrieveTPUEmbeddingStochasticGradientDescentParameters` operation. -#[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct RetrieveTPUEmbeddingStochasticGradientDescentParameters { - table_id: ::std::option::Option, - table_name: ::std::option::Option<::std::string::String>, - num_shards: ::std::option::Option, - shard_id: ::std::option::Option, - config: ::std::option::Option<::std::string::String>, - control_inputs: ::std::vec::Vec, -} - -impl RetrieveTPUEmbeddingStochasticGradientDescentParameters { - /// Creates a new `RetrieveTPUEmbeddingStochasticGradientDescentParameters`. - pub fn new() -> Self { - Self::default() + /// Builds the `RetrieveTPUEmbeddingStochasticGradientDescentParameters` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) } - - /// Sets the `table_id` attribute. - pub fn table_id>(mut self, value: ArgType) -> Self { - self.table_id = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `table_name` attribute. - pub fn table_name>( - mut self, - value: ArgType, - ) -> Self { - self.table_name = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `num_shards` attribute. - pub fn num_shards>(mut self, value: ArgType) -> Self { - self.num_shards = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `shard_id` attribute. - pub fn shard_id>(mut self, value: ArgType) -> Self { - self.shard_id = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { - self.config = ::std::option::Option::Some(value.into()); - self - } - - /// Adds a control input. - pub fn add_control_input(mut self, op: crate::Operation) -> Self { - self.control_inputs.push(op); - self + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RetrieveTPUEmbeddingStochasticGradientDescentParameters", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.table_name { + nd.set_attr_string("table_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.num_shards { + nd.set_attr_int("num_shards", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_id { + nd.set_attr_int("shard_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RetrieveTPUEmbeddingStochasticGradientDescentParametersInst{op}) } - - /// Builds the `RetrieveTPUEmbeddingStochasticGradientDescentParameters` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { - self.build_impl(scope) +} +impl RetrieveTPUEmbeddingStochasticGradientDescentParametersInst { + /// Returns the 'parameters' output of this 'RetrieveTPUEmbeddingStochasticGradientDescentParameters' operation. + pub fn parameters(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } } - - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { - scope.new_operation( - "RetrieveTPUEmbeddingStochasticGradientDescentParameters", - |nd| { - for op in &self.control_inputs { - nd.add_control_input(op); - } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.table_name { - nd.set_attr_string("table_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.num_shards { - nd.set_attr_int("num_shards", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_id { - nd.set_attr_int("shard_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } - ::std::result::Result::Ok(()) - }, - ) +} +impl Into for RetrieveTPUEmbeddingStochasticGradientDescentParametersInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `RetrieveTPUEmbeddingStochasticGradientDescentParameters::new().build(scope)`. -pub fn retrieve_tpuembedding_stochastic_gradient_descent_parameters( - scope: &mut crate::Scope, -) -> crate::Result { +pub fn retrieve_tpuembedding_stochastic_gradient_descent_parameters<>(scope: &mut crate::Scope) -> crate::Result { RetrieveTPUEmbeddingStochasticGradientDescentParameters::new().build(scope) } + /// Builder for the `Reverse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Reverse { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Reverse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReverseInst { + /// An instance of a fully built Reverse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Reverse { /// Creates a new `Reverse`. @@ -92625,46 +111310,61 @@ impl Reverse { } /// Builds the `Reverse` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tensor: O0, - dims: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tensor: O0, dims: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), dims.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - dims: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, dims: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Reverse", |nd| { nd.add_input(tensor); nd.add_input(dims); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Reverse` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tensor: O0, dims: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), dims.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, dims: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Reverse", |nd| { + nd.add_input(tensor); + nd.add_input(dims); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReverseInst{op}) + } +} +impl ReverseInst { + /// Returns the 'output' output of this 'Reverse' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReverseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Reverse::new().build(tensor, dims, scope)`. -pub fn reverse, O1: ::std::convert::Into>( - tensor: O0, - dims: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reverse, O1: ::std::convert::Into>(tensor: O0, dims: O1, scope: &mut crate::Scope) -> crate::Result { Reverse::new().build(tensor, dims, scope) } + /// Builder for the `ReverseSequence` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReverseSequence { @@ -92674,6 +111374,12 @@ pub struct ReverseSequence { Tlen: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ReverseSequence' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReverseSequenceInst { + /// An instance of a fully built ReverseSequence Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReverseSequence { /// Creates a new `ReverseSequence`. @@ -92712,58 +111418,79 @@ impl ReverseSequence { } /// Builds the `ReverseSequence` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - seq_lengths: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, seq_lengths: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), seq_lengths.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - seq_lengths: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, seq_lengths: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReverseSequence", |nd| { nd.add_input(input); nd.add_input(seq_lengths); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seq_dim { - nd.set_attr_int("seq_dim", *value)?; - } - if let ::std::option::Option::Some(value) = &self.batch_dim { - nd.set_attr_int("batch_dim", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tlen { - nd.set_attr_type("Tlen", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seq_dim { + nd.set_attr_int("seq_dim", *value)?; + } + if let ::std::option::Option::Some(value) = &self.batch_dim { + nd.set_attr_int("batch_dim", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tlen { + nd.set_attr_type("Tlen", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReverseSequence` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, seq_lengths: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), seq_lengths.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, seq_lengths: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReverseSequence", |nd| { + nd.add_input(input); + nd.add_input(seq_lengths); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seq_dim { + nd.set_attr_int("seq_dim", *value)?; + } + if let ::std::option::Option::Some(value) = &self.batch_dim { + nd.set_attr_int("batch_dim", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tlen { + nd.set_attr_type("Tlen", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReverseSequenceInst{op}) + } +} +impl ReverseSequenceInst { + /// Returns the 'output' output of this 'ReverseSequence' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReverseSequenceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReverseSequence::new().build(input, seq_lengths, scope)`. -pub fn reverse_sequence< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - seq_lengths: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reverse_sequence, O1: ::std::convert::Into>(input: O0, seq_lengths: O1, scope: &mut crate::Scope) -> crate::Result { ReverseSequence::new().build(input, seq_lengths, scope) } + /// Builder for the `ReverseV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ReverseV2 { @@ -92771,6 +111498,12 @@ pub struct ReverseV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ReverseV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ReverseV2Inst { + /// An instance of a fully built ReverseV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ReverseV2 { /// Creates a new `ReverseV2`. @@ -92797,58 +111530,79 @@ impl ReverseV2 { } /// Builds the `ReverseV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tensor: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tensor: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), axis.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ReverseV2", |nd| { nd.add_input(tensor); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ReverseV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tensor: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), axis.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ReverseV2", |nd| { + nd.add_input(tensor); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ReverseV2Inst{op}) + } +} +impl ReverseV2Inst { + /// Returns the 'output' output of this 'ReverseV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ReverseV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ReverseV2::new().build(tensor, axis, scope)`. -pub fn reverse_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tensor: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn reverse_v2, O1: ::std::convert::Into>(tensor: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { ReverseV2::new().build(tensor, axis, scope) } + /// Builder for the `RightShift` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RightShift { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RightShift' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RightShiftInst { + /// An instance of a fully built RightShift Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RightShift { /// Creates a new `RightShift`. @@ -92869,55 +111623,73 @@ impl RightShift { } /// Builds the `RightShift` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RightShift", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RightShift` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RightShift", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RightShiftInst{op}) + } +} +impl RightShiftInst { + /// Returns the 'z' output of this 'RightShift' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RightShiftInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RightShift::new().build(x, y, scope)`. -pub fn right_shift< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn right_shift, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RightShift::new().build(x, y, scope) } + /// Builder for the `Rint` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Rint { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Rint' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RintInst { + /// An instance of a fully built Rint Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Rint { /// Creates a new `Rint`. @@ -92938,45 +111710,71 @@ impl Rint { } /// Builds the `Rint` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Rint", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Rint` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Rint", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RintInst{op}) + } +} +impl RintInst { + /// Returns the 'y' output of this 'Rint' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RintInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Rint::new().build(x, scope)`. -pub fn rint>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rint>(x: O0, scope: &mut crate::Scope) -> crate::Result { Rint::new().build(x, scope) } + /// Builder for the `RiscAbs` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscAbs { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscAbs' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscAbsInst { + /// An instance of a fully built RiscAbs Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscAbs { /// Creates a new `RiscAbs`. @@ -92997,45 +111795,71 @@ impl RiscAbs { } /// Builds the `RiscAbs` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscAbs", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscAbs` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscAbs", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscAbsInst{op}) + } +} +impl RiscAbsInst { + /// Returns the 'y' output of this 'RiscAbs' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscAbsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscAbs::new().build(x, scope)`. -pub fn risc_abs>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_abs>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscAbs::new().build(x, scope) } + /// Builder for the `RiscAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscAdd { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscAddInst { + /// An instance of a fully built RiscAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscAdd { /// Creates a new `RiscAdd`. @@ -93056,49 +111880,61 @@ impl RiscAdd { } /// Builds the `RiscAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscAdd", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscAdd", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscAddInst{op}) + } +} +impl RiscAddInst { + /// Returns the 'z' output of this 'RiscAdd' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscAdd::new().build(x, y, scope)`. -pub fn risc_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_add, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscAdd::new().build(x, y, scope) } + /// Builder for the `RiscBinaryArithmetic` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscBinaryArithmetic { @@ -93106,6 +111942,12 @@ pub struct RiscBinaryArithmetic { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscBinaryArithmetic' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscBinaryArithmeticInst { + /// An instance of a fully built RiscBinaryArithmetic Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscBinaryArithmetic { /// Creates a new `RiscBinaryArithmetic`. @@ -93114,10 +111956,7 @@ impl RiscBinaryArithmetic { } /// Sets the `op_type` attribute. - pub fn op_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn op_type>(mut self, value: ArgType) -> Self { self.op_type = ::std::option::Option::Some(value.into()); self } @@ -93135,52 +111974,67 @@ impl RiscBinaryArithmetic { } /// Builds the `RiscBinaryArithmetic` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscBinaryArithmetic", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.op_type { - nd.set_attr_string("op_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.op_type { + nd.set_attr_string("op_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscBinaryArithmetic` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscBinaryArithmetic", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.op_type { + nd.set_attr_string("op_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscBinaryArithmeticInst{op}) + } +} +impl RiscBinaryArithmeticInst { + /// Returns the 'z' output of this 'RiscBinaryArithmetic' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscBinaryArithmeticInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscBinaryArithmetic::new().build(x, y, scope)`. -pub fn risc_binary_arithmetic< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_binary_arithmetic, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscBinaryArithmetic::new().build(x, y, scope) } + /// Builder for the `RiscBinaryComparison` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscBinaryComparison { @@ -93188,6 +112042,12 @@ pub struct RiscBinaryComparison { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscBinaryComparison' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscBinaryComparisonInst { + /// An instance of a fully built RiscBinaryComparison Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscBinaryComparison { /// Creates a new `RiscBinaryComparison`. @@ -93196,10 +112056,7 @@ impl RiscBinaryComparison { } /// Sets the `op_type` attribute. - pub fn op_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn op_type>(mut self, value: ArgType) -> Self { self.op_type = ::std::option::Option::Some(value.into()); self } @@ -93217,52 +112074,67 @@ impl RiscBinaryComparison { } /// Builds the `RiscBinaryComparison` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscBinaryComparison", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.op_type { - nd.set_attr_string("op_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.op_type { + nd.set_attr_string("op_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscBinaryComparison` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscBinaryComparison", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.op_type { + nd.set_attr_string("op_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscBinaryComparisonInst{op}) + } +} +impl RiscBinaryComparisonInst { + /// Returns the 'z' output of this 'RiscBinaryComparison' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscBinaryComparisonInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscBinaryComparison::new().build(x, y, scope)`. -pub fn risc_binary_comparison< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_binary_comparison, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscBinaryComparison::new().build(x, y, scope) } + /// Builder for the `RiscBitcast` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscBitcast { @@ -93270,6 +112142,12 @@ pub struct RiscBitcast { DstT: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscBitcast' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscBitcastInst { + /// An instance of a fully built RiscBitcast Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscBitcast { /// Creates a new `RiscBitcast`. @@ -93296,42 +112174,65 @@ impl RiscBitcast { } /// Builds the `RiscBitcast` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscBitcast", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.SrcT { - nd.set_attr_type("SrcT", *value)?; - } - if let ::std::option::Option::Some(value) = &self.DstT { - nd.set_attr_type("DstT", *value)?; - } + if let ::std::option::Option::Some(value) = &self.SrcT { + nd.set_attr_type("SrcT", *value)?; + } + if let ::std::option::Option::Some(value) = &self.DstT { + nd.set_attr_type("DstT", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscBitcast` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscBitcast", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.SrcT { + nd.set_attr_type("SrcT", *value)?; + } + if let ::std::option::Option::Some(value) = &self.DstT { + nd.set_attr_type("DstT", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscBitcastInst{op}) + } +} +impl RiscBitcastInst { + /// Returns the 'y' output of this 'RiscBitcast' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscBitcastInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscBitcast::new().build(x, scope)`. -pub fn risc_bitcast>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_bitcast>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscBitcast::new().build(x, scope) } + /// Builder for the `RiscBroadcast` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscBroadcast { @@ -93339,6 +112240,12 @@ pub struct RiscBroadcast { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscBroadcast' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscBroadcastInst { + /// An instance of a fully built RiscBroadcast Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscBroadcast { /// Creates a new `RiscBroadcast`. @@ -93365,52 +112272,67 @@ impl RiscBroadcast { } /// Builds the `RiscBroadcast` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - shape: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), shape.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscBroadcast", |nd| { nd.add_input(input); nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscBroadcast` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), shape.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscBroadcast", |nd| { + nd.add_input(input); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscBroadcastInst{op}) + } +} +impl RiscBroadcastInst { + /// Returns the 'output' output of this 'RiscBroadcast' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscBroadcastInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscBroadcast::new().build(input, shape, scope)`. -pub fn risc_broadcast< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - shape: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_broadcast, O1: ::std::convert::Into>(input: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { RiscBroadcast::new().build(input, shape, scope) } + /// Builder for the `RiscCast` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscCast { @@ -93418,6 +112340,12 @@ pub struct RiscCast { DstT: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscCast' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscCastInst { + /// An instance of a fully built RiscCast Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscCast { /// Creates a new `RiscCast`. @@ -93444,48 +112372,77 @@ impl RiscCast { } /// Builds the `RiscCast` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscCast", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.SrcT { - nd.set_attr_type("SrcT", *value)?; - } - if let ::std::option::Option::Some(value) = &self.DstT { - nd.set_attr_type("DstT", *value)?; - } + if let ::std::option::Option::Some(value) = &self.SrcT { + nd.set_attr_type("SrcT", *value)?; + } + if let ::std::option::Option::Some(value) = &self.DstT { + nd.set_attr_type("DstT", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscCast` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscCast", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.SrcT { + nd.set_attr_type("SrcT", *value)?; + } + if let ::std::option::Option::Some(value) = &self.DstT { + nd.set_attr_type("DstT", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscCastInst{op}) + } +} +impl RiscCastInst { + /// Returns the 'y' output of this 'RiscCast' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscCastInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscCast::new().build(x, scope)`. -pub fn risc_cast>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_cast>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscCast::new().build(x, scope) } + /// Builder for the `RiscCeil` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscCeil { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscCeil' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscCeilInst { + /// An instance of a fully built RiscCeil Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscCeil { /// Creates a new `RiscCeil`. @@ -93506,45 +112463,71 @@ impl RiscCeil { } /// Builds the `RiscCeil` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscCeil", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscCeil` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscCeil", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscCeilInst{op}) + } +} +impl RiscCeilInst { + /// Returns the 'y' output of this 'RiscCeil' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscCeilInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscCeil::new().build(x, scope)`. -pub fn risc_ceil>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_ceil>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscCeil::new().build(x, scope) } + /// Builder for the `RiscCholesky` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscCholesky { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscCholesky' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscCholeskyInst { + /// An instance of a fully built RiscCholesky Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscCholesky { /// Creates a new `RiscCholesky`. @@ -93565,39 +112548,59 @@ impl RiscCholesky { } /// Builds the `RiscCholesky` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscCholesky", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscCholesky` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscCholesky", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscCholeskyInst{op}) + } +} +impl RiscCholeskyInst { + /// Returns the 'output' output of this 'RiscCholesky' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscCholeskyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscCholesky::new().build(input, scope)`. -pub fn risc_cholesky>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_cholesky>(input: O0, scope: &mut crate::Scope) -> crate::Result { RiscCholesky::new().build(input, scope) } + /// Builder for the `RiscConcat` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscConcat { @@ -93606,6 +112609,12 @@ pub struct RiscConcat { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscConcat' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscConcatInst { + /// An instance of a fully built RiscConcat Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscConcat { /// Creates a new `RiscConcat`. @@ -93638,55 +112647,73 @@ impl RiscConcat { } /// Builds the `RiscConcat` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - values: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, values: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(values.into(), axis.into(), scope) } - - fn build_impl( - &self, - values: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, values: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscConcat", |nd| { nd.add_input(values); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscConcat` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, values: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(values.into(), axis.into(), scope) + } + fn build_instance_impl(&self, values: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscConcat", |nd| { + nd.add_input(values); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscConcatInst{op}) + } +} +impl RiscConcatInst { + /// Returns the 'output' output of this 'RiscConcat' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscConcatInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscConcat::new().build(values, axis, scope)`. -pub fn risc_concat< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - values: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_concat, O1: ::std::convert::Into>(values: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { RiscConcat::new().build(values, axis, scope) } + /// Builder for the `RiscCondition` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscCondition { @@ -93696,6 +112723,12 @@ pub struct RiscCondition { DstT: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscCondition' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscConditionInst { + /// An instance of a fully built RiscCondition Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscCondition { /// Creates a new `RiscCondition`. @@ -93704,19 +112737,13 @@ impl RiscCondition { } /// Sets the `func_true` attribute. - pub fn func_true>( - mut self, - value: ArgType, - ) -> Self { + pub fn func_true>(mut self, value: ArgType) -> Self { self.func_true = ::std::option::Option::Some(value.into()); self } /// Sets the `func_false` attribute. - pub fn func_false>( - mut self, - value: ArgType, - ) -> Self { + pub fn func_false>(mut self, value: ArgType) -> Self { self.func_false = ::std::option::Option::Some(value.into()); self } @@ -93740,27 +112767,10 @@ impl RiscCondition { } /// Builds the `RiscCondition` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - pred: O0, - input_true: O1, - input_false: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, pred: O0, input_true: O1, input_false: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(pred.into(), input_true.into(), input_false.into(), scope) } - - fn build_impl( - &self, - pred: crate::Output, - input_true: crate::Output, - input_false: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, pred: crate::Output, input_true: crate::Output, input_false: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscCondition", |nd| { nd.add_input(pred); nd.add_input(input_true); @@ -93768,36 +112778,70 @@ impl RiscCondition { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.func_true { - nd.set_attr_string("func_true", value)?; - } - if let ::std::option::Option::Some(value) = &self.func_false { - nd.set_attr_string("func_false", value)?; - } - if let ::std::option::Option::Some(value) = &self.SrcT { - nd.set_attr_type("SrcT", *value)?; - } - if let ::std::option::Option::Some(value) = &self.DstT { - nd.set_attr_type("DstT", *value)?; - } + if let ::std::option::Option::Some(value) = &self.func_true { + nd.set_attr_string("func_true", value)?; + } + if let ::std::option::Option::Some(value) = &self.func_false { + nd.set_attr_string("func_false", value)?; + } + if let ::std::option::Option::Some(value) = &self.SrcT { + nd.set_attr_type("SrcT", *value)?; + } + if let ::std::option::Option::Some(value) = &self.DstT { + nd.set_attr_type("DstT", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscCondition` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, pred: O0, input_true: O1, input_false: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(pred.into(), input_true.into(), input_false.into(), scope) + } + fn build_instance_impl(&self, pred: crate::Output, input_true: crate::Output, input_false: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscCondition", |nd| { + nd.add_input(pred); + nd.add_input(input_true); + nd.add_input(input_false); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.func_true { + nd.set_attr_string("func_true", value)?; + } + if let ::std::option::Option::Some(value) = &self.func_false { + nd.set_attr_string("func_false", value)?; + } + if let ::std::option::Option::Some(value) = &self.SrcT { + nd.set_attr_type("SrcT", *value)?; + } + if let ::std::option::Option::Some(value) = &self.DstT { + nd.set_attr_type("DstT", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscConditionInst{op}) + } +} +impl RiscConditionInst { + /// Returns the 'output' output of this 'RiscCondition' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscConditionInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscCondition::new().build(pred, input_true, input_false, scope)`. -pub fn risc_condition< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - pred: O0, - input_true: O1, - input_false: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_condition, O1: ::std::convert::Into, O2: ::std::convert::Into>(pred: O0, input_true: O1, input_false: O2, scope: &mut crate::Scope) -> crate::Result { RiscCondition::new().build(pred, input_true, input_false, scope) } + /// Builder for the `RiscConv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscConv { @@ -93807,6 +112851,12 @@ pub struct RiscConv { dilations: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscConv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscConvInst { + /// An instance of a fully built RiscConv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscConv { /// Creates a new `RiscConv`. @@ -93821,28 +112871,19 @@ impl RiscConv { } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } /// Sets the `dilations` attribute. - pub fn dilations>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dilations>>(mut self, value: ArgType) -> Self { self.dilations = ::std::option::Option::Some(value.into()); self } @@ -93854,64 +112895,91 @@ impl RiscConv { } /// Builds the `RiscConv` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - filter: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), filter.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - filter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscConv", |nd| { nd.add_input(input); nd.add_input(filter); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.dilations { - nd.set_attr_int_list("dilations", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscConv` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), filter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, filter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscConv", |nd| { + nd.add_input(input); + nd.add_input(filter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.dilations { + nd.set_attr_int_list("dilations", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscConvInst{op}) + } +} +impl RiscConvInst { + /// Returns the 'output' output of this 'RiscConv' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscConvInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscConv::new().build(input, filter, scope)`. -pub fn risc_conv< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - filter: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_conv, O1: ::std::convert::Into>(input: O0, filter: O1, scope: &mut crate::Scope) -> crate::Result { RiscConv::new().build(input, filter, scope) } + /// Builder for the `RiscCos` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscCos { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscCos' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscCosInst { + /// An instance of a fully built RiscCos Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscCos { /// Creates a new `RiscCos`. @@ -93932,45 +113000,71 @@ impl RiscCos { } /// Builds the `RiscCos` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscCos", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscCos` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscCos", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscCosInst{op}) + } +} +impl RiscCosInst { + /// Returns the 'y' output of this 'RiscCos' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscCosInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscCos::new().build(x, scope)`. -pub fn risc_cos>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_cos>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscCos::new().build(x, scope) } + /// Builder for the `RiscDiv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscDiv { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscDiv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscDivInst { + /// An instance of a fully built RiscDiv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscDiv { /// Creates a new `RiscDiv`. @@ -93991,49 +113085,61 @@ impl RiscDiv { } /// Builds the `RiscDiv` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscDiv", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscDiv` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscDiv", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscDivInst{op}) + } +} +impl RiscDivInst { + /// Returns the 'z' output of this 'RiscDiv' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscDivInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscDiv::new().build(x, y, scope)`. -pub fn risc_div< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_div, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscDiv::new().build(x, y, scope) } + /// Builder for the `RiscDot` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscDot { @@ -94042,6 +113148,12 @@ pub struct RiscDot { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscDot' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscDotInst { + /// An instance of a fully built RiscDot Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscDot { /// Creates a new `RiscDot`. @@ -94074,61 +113186,85 @@ impl RiscDot { } /// Builds the `RiscDot` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), b.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscDot", |nd| { nd.add_input(a); nd.add_input(b); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscDot` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscDot", |nd| { + nd.add_input(a); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscDotInst{op}) + } +} +impl RiscDotInst { + /// Returns the 'product' output of this 'RiscDot' operation. + pub fn product(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscDotInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscDot::new().build(a, b, scope)`. -pub fn risc_dot< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - a: O0, - b: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_dot, O1: ::std::convert::Into>(a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { RiscDot::new().build(a, b, scope) } + /// Builder for the `RiscExp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscExp { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscExp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscExpInst { + /// An instance of a fully built RiscExp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscExp { /// Creates a new `RiscExp`. @@ -94149,45 +113285,71 @@ impl RiscExp { } /// Builds the `RiscExp` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscExp", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscExp` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscExp", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscExpInst{op}) + } +} +impl RiscExpInst { + /// Returns the 'y' output of this 'RiscExp' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscExpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscExp::new().build(x, scope)`. -pub fn risc_exp>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_exp>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscExp::new().build(x, scope) } + /// Builder for the `RiscFft` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscFft { Tcomplex: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscFft' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscFftInst { + /// An instance of a fully built RiscFft Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscFft { /// Creates a new `RiscFft`. @@ -94196,10 +113358,7 @@ impl RiscFft { } /// Sets the `Tcomplex` attribute. - pub fn Tcomplex>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tcomplex>(mut self, value: ArgType) -> Self { self.Tcomplex = ::std::option::Option::Some(value.into()); self } @@ -94211,45 +113370,71 @@ impl RiscFft { } /// Builds the `RiscFft` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscFft", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcomplex { - nd.set_attr_type("Tcomplex", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscFft` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscFft", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcomplex { + nd.set_attr_type("Tcomplex", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscFftInst{op}) + } +} +impl RiscFftInst { + /// Returns the 'output' output of this 'RiscFft' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscFftInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscFft::new().build(input, scope)`. -pub fn risc_fft>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_fft>(input: O0, scope: &mut crate::Scope) -> crate::Result { RiscFft::new().build(input, scope) } + /// Builder for the `RiscFloor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscFloor { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscFloor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscFloorInst { + /// An instance of a fully built RiscFloor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscFloor { /// Creates a new `RiscFloor`. @@ -94270,39 +113455,59 @@ impl RiscFloor { } /// Builds the `RiscFloor` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscFloor", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscFloor` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscFloor", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscFloorInst{op}) + } +} +impl RiscFloorInst { + /// Returns the 'y' output of this 'RiscFloor' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscFloorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscFloor::new().build(x, scope)`. -pub fn risc_floor>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_floor>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscFloor::new().build(x, scope) } + /// Builder for the `RiscGather` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscGather { @@ -94312,6 +113517,12 @@ pub struct RiscGather { Taxis: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscGather' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscGatherInst { + /// An instance of a fully built RiscGather Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscGather { /// Creates a new `RiscGather`. @@ -94326,19 +113537,13 @@ impl RiscGather { } /// Sets the `Tparams` attribute. - pub fn Tparams>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tparams>(mut self, value: ArgType) -> Self { self.Tparams = ::std::option::Option::Some(value.into()); self } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -94356,27 +113561,10 @@ impl RiscGather { } /// Builds the `RiscGather` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - params: O0, - indices: O1, - axis: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, params: O0, indices: O1, axis: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(params.into(), indices.into(), axis.into(), scope) } - - fn build_impl( - &self, - params: crate::Output, - indices: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, params: crate::Output, indices: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscGather", |nd| { nd.add_input(params); nd.add_input(indices); @@ -94384,36 +113572,70 @@ impl RiscGather { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.batch_dims { - nd.set_attr_int("batch_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tparams { - nd.set_attr_type("Tparams", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Taxis { - nd.set_attr_type("Taxis", *value)?; - } + if let ::std::option::Option::Some(value) = &self.batch_dims { + nd.set_attr_int("batch_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tparams { + nd.set_attr_type("Tparams", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Taxis { + nd.set_attr_type("Taxis", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscGather` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, params: O0, indices: O1, axis: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(params.into(), indices.into(), axis.into(), scope) + } + fn build_instance_impl(&self, params: crate::Output, indices: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscGather", |nd| { + nd.add_input(params); + nd.add_input(indices); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.batch_dims { + nd.set_attr_int("batch_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tparams { + nd.set_attr_type("Tparams", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Taxis { + nd.set_attr_type("Taxis", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscGatherInst{op}) + } +} +impl RiscGatherInst { + /// Returns the 'output' output of this 'RiscGather' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscGatherInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscGather::new().build(params, indices, axis, scope)`. -pub fn risc_gather< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - params: O0, - indices: O1, - axis: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_gather, O1: ::std::convert::Into, O2: ::std::convert::Into>(params: O0, indices: O1, axis: O2, scope: &mut crate::Scope) -> crate::Result { RiscGather::new().build(params, indices, axis, scope) } + /// Builder for the `RiscImag` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscImag { @@ -94421,6 +113643,12 @@ pub struct RiscImag { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscImag' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscImagInst { + /// An instance of a fully built RiscImag Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscImag { /// Creates a new `RiscImag`. @@ -94447,48 +113675,77 @@ impl RiscImag { } /// Builds the `RiscImag` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscImag", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscImag` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscImag", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscImagInst{op}) + } +} +impl RiscImagInst { + /// Returns the 'output' output of this 'RiscImag' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscImagInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscImag::new().build(input, scope)`. -pub fn risc_imag>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_imag>(input: O0, scope: &mut crate::Scope) -> crate::Result { RiscImag::new().build(input, scope) } + /// Builder for the `RiscIsFinite` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscIsFinite { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscIsFinite' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscIsFiniteInst { + /// An instance of a fully built RiscIsFinite Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscIsFinite { /// Creates a new `RiscIsFinite`. @@ -94509,45 +113766,71 @@ impl RiscIsFinite { } /// Builds the `RiscIsFinite` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscIsFinite", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscIsFinite` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscIsFinite", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscIsFiniteInst{op}) + } +} +impl RiscIsFiniteInst { + /// Returns the 'y' output of this 'RiscIsFinite' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscIsFiniteInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscIsFinite::new().build(x, scope)`. -pub fn risc_is_finite>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_is_finite>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscIsFinite::new().build(x, scope) } + /// Builder for the `RiscLog` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscLog { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscLog' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscLogInst { + /// An instance of a fully built RiscLog Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscLog { /// Creates a new `RiscLog`. @@ -94568,44 +113851,70 @@ impl RiscLog { } /// Builds the `RiscLog` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscLog", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscLog` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscLog", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscLogInst{op}) + } +} +impl RiscLogInst { + /// Returns the 'y' output of this 'RiscLog' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscLogInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscLog::new().build(x, scope)`. -pub fn risc_log>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_log>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscLog::new().build(x, scope) } + /// Builder for the `RiscLogicalAnd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscLogicalAnd { control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscLogicalAnd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscLogicalAndInst { + /// An instance of a fully built RiscLogicalAnd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscLogicalAnd { /// Creates a new `RiscLogicalAnd`. @@ -94620,24 +113929,10 @@ impl RiscLogicalAnd { } /// Builds the `RiscLogicalAnd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscLogicalAnd", |nd| { nd.add_input(x); nd.add_input(y); @@ -94647,24 +113942,53 @@ impl RiscLogicalAnd { ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscLogicalAnd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscLogicalAnd", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscLogicalAndInst{op}) + } +} +impl RiscLogicalAndInst { + /// Returns the 'z' output of this 'RiscLogicalAnd' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscLogicalAndInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscLogicalAnd::new().build(x, y, scope)`. -pub fn risc_logical_and< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_logical_and, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscLogicalAnd::new().build(x, y, scope) } + /// Builder for the `RiscLogicalNot` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscLogicalNot { control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscLogicalNot' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscLogicalNotInst { + /// An instance of a fully built RiscLogicalNot Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscLogicalNot { /// Creates a new `RiscLogicalNot`. @@ -94679,19 +114003,10 @@ impl RiscLogicalNot { } /// Builds the `RiscLogicalNot` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscLogicalNot", |nd| { nd.add_input(x); for op in &self.control_inputs { @@ -94700,20 +114015,52 @@ impl RiscLogicalNot { ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscLogicalNot` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscLogicalNot", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscLogicalNotInst{op}) + } +} +impl RiscLogicalNotInst { + /// Returns the 'z' output of this 'RiscLogicalNot' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscLogicalNotInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscLogicalNot::new().build(x, scope)`. -pub fn risc_logical_not>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_logical_not>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscLogicalNot::new().build(x, scope) } + /// Builder for the `RiscLogicalOr` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscLogicalOr { control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscLogicalOr' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscLogicalOrInst { + /// An instance of a fully built RiscLogicalOr Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscLogicalOr { /// Creates a new `RiscLogicalOr`. @@ -94728,24 +114075,10 @@ impl RiscLogicalOr { } /// Builds the `RiscLogicalOr` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscLogicalOr", |nd| { nd.add_input(x); nd.add_input(y); @@ -94755,25 +114088,54 @@ impl RiscLogicalOr { ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscLogicalOr` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscLogicalOr", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscLogicalOrInst{op}) + } +} +impl RiscLogicalOrInst { + /// Returns the 'z' output of this 'RiscLogicalOr' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscLogicalOrInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscLogicalOr::new().build(x, y, scope)`. -pub fn risc_logical_or< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_logical_or, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscLogicalOr::new().build(x, y, scope) } + /// Builder for the `RiscMax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscMax { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscMaxInst { + /// An instance of a fully built RiscMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscMax { /// Creates a new `RiscMax`. @@ -94794,55 +114156,73 @@ impl RiscMax { } /// Builds the `RiscMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscMax", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscMax", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscMaxInst{op}) + } +} +impl RiscMaxInst { + /// Returns the 'max' output of this 'RiscMax' operation. + pub fn max(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscMaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscMax::new().build(x, y, scope)`. -pub fn risc_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_max, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscMax::new().build(x, y, scope) } + /// Builder for the `RiscMin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscMin { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscMin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscMinInst { + /// An instance of a fully built RiscMin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscMin { /// Creates a new `RiscMin`. @@ -94863,55 +114243,73 @@ impl RiscMin { } /// Builds the `RiscMin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscMin", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscMin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscMin", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscMinInst{op}) + } +} +impl RiscMinInst { + /// Returns the 'z' output of this 'RiscMin' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscMinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscMin::new().build(x, y, scope)`. -pub fn risc_min< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_min, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscMin::new().build(x, y, scope) } + /// Builder for the `RiscMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscMul { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscMulInst { + /// An instance of a fully built RiscMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscMul { /// Creates a new `RiscMul`. @@ -94932,55 +114330,73 @@ impl RiscMul { } /// Builds the `RiscMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscMul", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscMul", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscMulInst{op}) + } +} +impl RiscMulInst { + /// Returns the 'z' output of this 'RiscMul' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscMul::new().build(x, y, scope)`. -pub fn risc_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_mul, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscMul::new().build(x, y, scope) } + /// Builder for the `RiscNeg` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscNeg { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscNeg' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscNegInst { + /// An instance of a fully built RiscNeg Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscNeg { /// Creates a new `RiscNeg`. @@ -95001,39 +114417,59 @@ impl RiscNeg { } /// Builds the `RiscNeg` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscNeg", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscNeg` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscNeg", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscNegInst{op}) + } +} +impl RiscNegInst { + /// Returns the 'y' output of this 'RiscNeg' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscNegInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscNeg::new().build(x, scope)`. -pub fn risc_neg>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_neg>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscNeg::new().build(x, scope) } + /// Builder for the `RiscPad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscPad { @@ -95041,6 +114477,12 @@ pub struct RiscPad { Tpaddings: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscPad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscPadInst { + /// An instance of a fully built RiscPad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscPad { /// Creates a new `RiscPad`. @@ -95055,10 +114497,7 @@ impl RiscPad { } /// Sets the `Tpaddings` attribute. - pub fn Tpaddings>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tpaddings>(mut self, value: ArgType) -> Self { self.Tpaddings = ::std::option::Option::Some(value.into()); self } @@ -95070,27 +114509,10 @@ impl RiscPad { } /// Builds the `RiscPad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - paddings: O1, - constant_values: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, paddings: O1, constant_values: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), paddings.into(), constant_values.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - paddings: crate::Output, - constant_values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, paddings: crate::Output, constant_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscPad", |nd| { nd.add_input(input); nd.add_input(paddings); @@ -95098,30 +114520,58 @@ impl RiscPad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tpaddings { - nd.set_attr_type("Tpaddings", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscPad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, paddings: O1, constant_values: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), paddings.into(), constant_values.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, paddings: crate::Output, constant_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscPad", |nd| { + nd.add_input(input); + nd.add_input(paddings); + nd.add_input(constant_values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscPadInst{op}) + } +} +impl RiscPadInst { + /// Returns the 'output' output of this 'RiscPad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscPadInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscPad::new().build(input, paddings, constant_values, scope)`. -pub fn risc_pad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - paddings: O1, - constant_values: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_pad, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, paddings: O1, constant_values: O2, scope: &mut crate::Scope) -> crate::Result { RiscPad::new().build(input, paddings, constant_values, scope) } + /// Builder for the `RiscPool` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscPool { @@ -95132,6 +114582,12 @@ pub struct RiscPool { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscPool' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscPoolInst { + /// An instance of a fully built RiscPool Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscPool { /// Creates a new `RiscPool`. @@ -95140,37 +114596,25 @@ impl RiscPool { } /// Sets the `ksize` attribute. - pub fn ksize>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ksize>>(mut self, value: ArgType) -> Self { self.ksize = ::std::option::Option::Some(value.into()); self } /// Sets the `strides` attribute. - pub fn strides>>( - mut self, - value: ArgType, - ) -> Self { + pub fn strides>>(mut self, value: ArgType) -> Self { self.strides = ::std::option::Option::Some(value.into()); self } /// Sets the `pooling_type` attribute. - pub fn pooling_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn pooling_type>(mut self, value: ArgType) -> Self { self.pooling_type = ::std::option::Option::Some(value.into()); self } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -95188,57 +114632,95 @@ impl RiscPool { } /// Builds the `RiscPool` operation. - pub fn build>( - &self, - value: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscPool", |nd| { nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.ksize { - nd.set_attr_int_list("ksize", value)?; - } - if let ::std::option::Option::Some(value) = &self.strides { - nd.set_attr_int_list("strides", value)?; - } - if let ::std::option::Option::Some(value) = &self.pooling_type { - nd.set_attr_string("pooling_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.pooling_type { + nd.set_attr_string("pooling_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscPool` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), scope) + } + fn build_instance_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscPool", |nd| { + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.ksize { + nd.set_attr_int_list("ksize", value)?; + } + if let ::std::option::Option::Some(value) = &self.strides { + nd.set_attr_int_list("strides", value)?; + } + if let ::std::option::Option::Some(value) = &self.pooling_type { + nd.set_attr_string("pooling_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscPoolInst{op}) + } +} +impl RiscPoolInst { + /// Returns the 'output' output of this 'RiscPool' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscPoolInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscPool::new().build(value, scope)`. -pub fn risc_pool>( - value: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_pool>(value: O0, scope: &mut crate::Scope) -> crate::Result { RiscPool::new().build(value, scope) } + /// Builder for the `RiscPow` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscPow { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscPow' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscPowInst { + /// An instance of a fully built RiscPow Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscPow { /// Creates a new `RiscPow`. @@ -95259,49 +114741,61 @@ impl RiscPow { } /// Builds the `RiscPow` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscPow", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscPow` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscPow", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscPowInst{op}) + } +} +impl RiscPowInst { + /// Returns the 'z' output of this 'RiscPow' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscPowInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscPow::new().build(x, y, scope)`. -pub fn risc_pow< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_pow, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscPow::new().build(x, y, scope) } + /// Builder for the `RiscRandomUniform` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscRandomUniform { @@ -95309,6 +114803,12 @@ pub struct RiscRandomUniform { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscRandomUniform' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscRandomUniformInst { + /// An instance of a fully built RiscRandomUniform Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscRandomUniform { /// Creates a new `RiscRandomUniform`. @@ -95335,42 +114835,65 @@ impl RiscRandomUniform { } /// Builds the `RiscRandomUniform` operation. - pub fn build>( - &self, - shape: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscRandomUniform", |nd| { nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscRandomUniform` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscRandomUniform", |nd| { + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscRandomUniformInst{op}) + } +} +impl RiscRandomUniformInst { + /// Returns the 'output' output of this 'RiscRandomUniform' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscRandomUniformInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscRandomUniform::new().build(shape, scope)`. -pub fn risc_random_uniform>( - shape: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_random_uniform>(shape: O0, scope: &mut crate::Scope) -> crate::Result { RiscRandomUniform::new().build(shape, scope) } + /// Builder for the `RiscReal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscReal { @@ -95378,6 +114901,12 @@ pub struct RiscReal { Tout: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscReal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscRealInst { + /// An instance of a fully built RiscReal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscReal { /// Creates a new `RiscReal`. @@ -95404,42 +114933,65 @@ impl RiscReal { } /// Builds the `RiscReal` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscReal", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type("Tout", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscReal` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscReal", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type("Tout", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscRealInst{op}) + } +} +impl RiscRealInst { + /// Returns the 'output' output of this 'RiscReal' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscRealInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscReal::new().build(input, scope)`. -pub fn risc_real>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_real>(input: O0, scope: &mut crate::Scope) -> crate::Result { RiscReal::new().build(input, scope) } + /// Builder for the `RiscReduce` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscReduce { @@ -95448,6 +115000,12 @@ pub struct RiscReduce { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscReduce' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscReduceInst { + /// An instance of a fully built RiscReduce Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscReduce { /// Creates a new `RiscReduce`. @@ -95456,10 +115014,7 @@ impl RiscReduce { } /// Sets the `reduce_type` attribute. - pub fn reduce_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduce_type>(mut self, value: ArgType) -> Self { self.reduce_type = ::std::option::Option::Some(value.into()); self } @@ -95483,61 +115038,85 @@ impl RiscReduce { } /// Builds the `RiscReduce` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tensor: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tensor: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), axis.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscReduce", |nd| { nd.add_input(tensor); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.reduce_type { - nd.set_attr_string("reduce_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.Index { - nd.set_attr_type("Index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.reduce_type { + nd.set_attr_string("reduce_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscReduce` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tensor: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), axis.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscReduce", |nd| { + nd.add_input(tensor); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.reduce_type { + nd.set_attr_string("reduce_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscReduceInst{op}) + } +} +impl RiscReduceInst { + /// Returns the 'output' output of this 'RiscReduce' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscReduceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscReduce::new().build(tensor, axis, scope)`. -pub fn risc_reduce< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tensor: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_reduce, O1: ::std::convert::Into>(tensor: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { RiscReduce::new().build(tensor, axis, scope) } + /// Builder for the `RiscRem` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscRem { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscRem' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscRemInst { + /// An instance of a fully built RiscRem Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscRem { /// Creates a new `RiscRem`. @@ -95558,49 +115137,61 @@ impl RiscRem { } /// Builds the `RiscRem` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscRem", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscRem` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscRem", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscRemInst{op}) + } +} +impl RiscRemInst { + /// Returns the 'z' output of this 'RiscRem' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscRemInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscRem::new().build(x, y, scope)`. -pub fn risc_rem< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_rem, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscRem::new().build(x, y, scope) } + /// Builder for the `RiscReshape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscReshape { @@ -95608,6 +115199,12 @@ pub struct RiscReshape { Tshape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscReshape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscReshapeInst { + /// An instance of a fully built RiscReshape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscReshape { /// Creates a new `RiscReshape`. @@ -95622,10 +115219,7 @@ impl RiscReshape { } /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshape>(mut self, value: ArgType) -> Self { self.Tshape = ::std::option::Option::Some(value.into()); self } @@ -95637,52 +115231,67 @@ impl RiscReshape { } /// Builds the `RiscReshape` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tensor: O0, - shape: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tensor: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), shape.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscReshape", |nd| { nd.add_input(tensor); nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscReshape` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tensor: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), shape.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscReshape", |nd| { + nd.add_input(tensor); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscReshapeInst{op}) + } +} +impl RiscReshapeInst { + /// Returns the 'output' output of this 'RiscReshape' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscReshapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscReshape::new().build(tensor, shape, scope)`. -pub fn risc_reshape< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tensor: O0, - shape: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_reshape, O1: ::std::convert::Into>(tensor: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { RiscReshape::new().build(tensor, shape, scope) } + /// Builder for the `RiscReverse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscReverse { @@ -95690,6 +115299,12 @@ pub struct RiscReverse { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscReverse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscReverseInst { + /// An instance of a fully built RiscReverse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscReverse { /// Creates a new `RiscReverse`. @@ -95716,52 +115331,67 @@ impl RiscReverse { } /// Builds the `RiscReverse` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tensor: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tensor: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), axis.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscReverse", |nd| { nd.add_input(tensor); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscReverse` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tensor: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), axis.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscReverse", |nd| { + nd.add_input(tensor); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscReverseInst{op}) + } +} +impl RiscReverseInst { + /// Returns the 'output' output of this 'RiscReverse' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscReverseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscReverse::new().build(tensor, axis, scope)`. -pub fn risc_reverse< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tensor: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_reverse, O1: ::std::convert::Into>(tensor: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { RiscReverse::new().build(tensor, axis, scope) } + /// Builder for the `RiscScatter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscScatter { @@ -95769,6 +115399,12 @@ pub struct RiscScatter { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscScatter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscScatterInst { + /// An instance of a fully built RiscScatter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscScatter { /// Creates a new `RiscScatter`. @@ -95783,10 +115419,7 @@ impl RiscScatter { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -95798,27 +115431,10 @@ impl RiscScatter { } /// Builds the `RiscScatter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - indices: O0, - updates: O1, - shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, indices: O0, updates: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(indices.into(), updates.into(), shape.into(), scope) } - - fn build_impl( - &self, - indices: crate::Output, - updates: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, indices: crate::Output, updates: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscScatter", |nd| { nd.add_input(indices); nd.add_input(updates); @@ -95826,30 +115442,58 @@ impl RiscScatter { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscScatter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, indices: O0, updates: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), updates.into(), shape.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, updates: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscScatter", |nd| { + nd.add_input(indices); + nd.add_input(updates); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscScatterInst{op}) + } +} +impl RiscScatterInst { + /// Returns the 'output' output of this 'RiscScatter' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscScatterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscScatter::new().build(indices, updates, shape, scope)`. -pub fn risc_scatter< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - indices: O0, - updates: O1, - shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_scatter, O1: ::std::convert::Into, O2: ::std::convert::Into>(indices: O0, updates: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { RiscScatter::new().build(indices, updates, shape, scope) } + /// Builder for the `RiscShape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscShape { @@ -95857,6 +115501,12 @@ pub struct RiscShape { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscShape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscShapeInst { + /// An instance of a fully built RiscShape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscShape { /// Creates a new `RiscShape`. @@ -95871,10 +115521,7 @@ impl RiscShape { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -95886,48 +115533,77 @@ impl RiscShape { } /// Builds the `RiscShape` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscShape", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscShape` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscShape", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscShapeInst{op}) + } +} +impl RiscShapeInst { + /// Returns the 'output' output of this 'RiscShape' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscShapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscShape::new().build(input, scope)`. -pub fn risc_shape>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_shape>(input: O0, scope: &mut crate::Scope) -> crate::Result { RiscShape::new().build(input, scope) } + /// Builder for the `RiscSign` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscSign { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscSign' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscSignInst { + /// An instance of a fully built RiscSign Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscSign { /// Creates a new `RiscSign`. @@ -95948,39 +115624,59 @@ impl RiscSign { } /// Builds the `RiscSign` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscSign", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscSign` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscSign", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscSignInst{op}) + } +} +impl RiscSignInst { + /// Returns the 'y' output of this 'RiscSign' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscSignInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscSign::new().build(x, scope)`. -pub fn risc_sign>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_sign>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscSign::new().build(x, scope) } + /// Builder for the `RiscSlice` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscSlice { @@ -95988,6 +115684,12 @@ pub struct RiscSlice { Index: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscSlice' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscSliceInst { + /// An instance of a fully built RiscSlice Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscSlice { /// Creates a new `RiscSlice`. @@ -96014,27 +115716,10 @@ impl RiscSlice { } /// Builds the `RiscSlice` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - begin: O1, - size: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, begin: O1, size: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), begin.into(), size.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - begin: crate::Output, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, begin: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscSlice", |nd| { nd.add_input(input); nd.add_input(begin); @@ -96042,30 +115727,58 @@ impl RiscSlice { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Index { - nd.set_attr_type("Index", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscSlice` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, begin: O1, size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), begin.into(), size.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, begin: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscSlice", |nd| { + nd.add_input(input); + nd.add_input(begin); + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscSliceInst{op}) + } +} +impl RiscSliceInst { + /// Returns the 'output' output of this 'RiscSlice' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscSliceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscSlice::new().build(input, begin, size, scope)`. -pub fn risc_slice< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - begin: O1, - size: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_slice, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, begin: O1, size: O2, scope: &mut crate::Scope) -> crate::Result { RiscSlice::new().build(input, begin, size, scope) } + /// Builder for the `RiscSort` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscSort { @@ -96074,6 +115787,12 @@ pub struct RiscSort { direction: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscSort' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscSortInst { + /// An instance of a fully built RiscSort Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscSort { /// Creates a new `RiscSort`. @@ -96094,10 +115813,7 @@ impl RiscSort { } /// Sets the `direction` attribute. - pub fn direction>( - mut self, - value: ArgType, - ) -> Self { + pub fn direction>(mut self, value: ArgType) -> Self { self.direction = ::std::option::Option::Some(value.into()); self } @@ -96109,55 +115825,73 @@ impl RiscSort { } /// Builds the `RiscSort` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), axis.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscSort", |nd| { nd.add_input(input); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Index { - nd.set_attr_type("Index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.direction { - nd.set_attr_string("direction", value)?; - } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscSort` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), axis.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscSort", |nd| { + nd.add_input(input); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.direction { + nd.set_attr_string("direction", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscSortInst{op}) + } +} +impl RiscSortInst { + /// Returns the 'output' output of this 'RiscSort' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscSortInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscSort::new().build(input, axis, scope)`. -pub fn risc_sort< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_sort, O1: ::std::convert::Into>(input: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { RiscSort::new().build(input, axis, scope) } + /// Builder for the `RiscSqueeze` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscSqueeze { @@ -96165,6 +115899,12 @@ pub struct RiscSqueeze { squeeze_dims: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscSqueeze' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscSqueezeInst { + /// An instance of a fully built RiscSqueeze Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscSqueeze { /// Creates a new `RiscSqueeze`. @@ -96179,10 +115919,7 @@ impl RiscSqueeze { } /// Sets the `squeeze_dims` attribute. - pub fn squeeze_dims>>( - mut self, - value: ArgType, - ) -> Self { + pub fn squeeze_dims>>(mut self, value: ArgType) -> Self { self.squeeze_dims = ::std::option::Option::Some(value.into()); self } @@ -96194,48 +115931,77 @@ impl RiscSqueeze { } /// Builds the `RiscSqueeze` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscSqueeze", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.squeeze_dims { - nd.set_attr_int_list("squeeze_dims", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.squeeze_dims { + nd.set_attr_int_list("squeeze_dims", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscSqueeze` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscSqueeze", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.squeeze_dims { + nd.set_attr_int_list("squeeze_dims", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscSqueezeInst{op}) + } +} +impl RiscSqueezeInst { + /// Returns the 'output' output of this 'RiscSqueeze' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscSqueezeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscSqueeze::new().build(input, scope)`. -pub fn risc_squeeze>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_squeeze>(input: O0, scope: &mut crate::Scope) -> crate::Result { RiscSqueeze::new().build(input, scope) } + /// Builder for the `RiscSub` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscSub { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscSub' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscSubInst { + /// An instance of a fully built RiscSub Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscSub { /// Creates a new `RiscSub`. @@ -96256,49 +116022,61 @@ impl RiscSub { } /// Builds the `RiscSub` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscSub", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscSub` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscSub", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscSubInst{op}) + } +} +impl RiscSubInst { + /// Returns the 'z' output of this 'RiscSub' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscSubInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscSub::new().build(x, y, scope)`. -pub fn risc_sub< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_sub, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { RiscSub::new().build(x, y, scope) } + /// Builder for the `RiscTranspose` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscTranspose { @@ -96306,6 +116084,12 @@ pub struct RiscTranspose { Tperm: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscTranspose' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscTransposeInst { + /// An instance of a fully built RiscTranspose Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscTranspose { /// Creates a new `RiscTranspose`. @@ -96332,52 +116116,67 @@ impl RiscTranspose { } /// Builds the `RiscTranspose` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - perm: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, perm: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), perm.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - perm: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, perm: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscTranspose", |nd| { nd.add_input(x); nd.add_input(perm); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tperm { - nd.set_attr_type("Tperm", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tperm { + nd.set_attr_type("Tperm", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscTranspose` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, perm: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), perm.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, perm: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscTranspose", |nd| { + nd.add_input(x); + nd.add_input(perm); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tperm { + nd.set_attr_type("Tperm", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscTransposeInst{op}) + } +} +impl RiscTransposeInst { + /// Returns the 'y' output of this 'RiscTranspose' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscTransposeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscTranspose::new().build(x, perm, scope)`. -pub fn risc_transpose< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - perm: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_transpose, O1: ::std::convert::Into>(x: O0, perm: O1, scope: &mut crate::Scope) -> crate::Result { RiscTranspose::new().build(x, perm, scope) } + /// Builder for the `RiscTriangularSolve` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscTriangularSolve { @@ -96386,6 +116185,12 @@ pub struct RiscTriangularSolve { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscTriangularSolve' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscTriangularSolveInst { + /// An instance of a fully built RiscTriangularSolve Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscTriangularSolve { /// Creates a new `RiscTriangularSolve`. @@ -96418,55 +116223,73 @@ impl RiscTriangularSolve { } /// Builds the `RiscTriangularSolve` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(matrix.into(), rhs.into(), scope) } - - fn build_impl( - &self, - matrix: crate::Output, - rhs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscTriangularSolve", |nd| { nd.add_input(matrix); nd.add_input(rhs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.lower { - nd.set_attr_bool("lower", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adjoint { - nd.set_attr_bool("adjoint", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.lower { + nd.set_attr_bool("lower", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscTriangularSolve` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(matrix.into(), rhs.into(), scope) + } + fn build_instance_impl(&self, matrix: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscTriangularSolve", |nd| { + nd.add_input(matrix); + nd.add_input(rhs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.lower { + nd.set_attr_bool("lower", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint { + nd.set_attr_bool("adjoint", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscTriangularSolveInst{op}) + } +} +impl RiscTriangularSolveInst { + /// Returns the 'output' output of this 'RiscTriangularSolve' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscTriangularSolveInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscTriangularSolve::new().build(matrix, rhs, scope)`. -pub fn risc_triangular_solve< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - matrix: O0, - rhs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_triangular_solve, O1: ::std::convert::Into>(matrix: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { RiscTriangularSolve::new().build(matrix, rhs, scope) } + /// Builder for the `RiscUnary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscUnary { @@ -96474,6 +116297,12 @@ pub struct RiscUnary { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscUnary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscUnaryInst { + /// An instance of a fully built RiscUnary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscUnary { /// Creates a new `RiscUnary`. @@ -96482,10 +116311,7 @@ impl RiscUnary { } /// Sets the `op_type` attribute. - pub fn op_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn op_type>(mut self, value: ArgType) -> Self { self.op_type = ::std::option::Option::Some(value.into()); self } @@ -96503,42 +116329,65 @@ impl RiscUnary { } /// Builds the `RiscUnary` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscUnary", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.op_type { - nd.set_attr_string("op_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.op_type { + nd.set_attr_string("op_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscUnary` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscUnary", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.op_type { + nd.set_attr_string("op_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscUnaryInst{op}) + } +} +impl RiscUnaryInst { + /// Returns the 'y' output of this 'RiscUnary' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscUnaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscUnary::new().build(x, scope)`. -pub fn risc_unary>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_unary>(x: O0, scope: &mut crate::Scope) -> crate::Result { RiscUnary::new().build(x, scope) } + /// Builder for the `RiscWhile` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RiscWhile { @@ -96549,6 +116398,12 @@ pub struct RiscWhile { parallel_iterations: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RiscWhile' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RiscWhileInst { + /// An instance of a fully built RiscWhile Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RiscWhile { /// Creates a new `RiscWhile`. @@ -96557,46 +116412,31 @@ impl RiscWhile { } /// Sets the `T` attribute. - pub fn T>>( - mut self, - value: ArgType, - ) -> Self { + pub fn T>>(mut self, value: ArgType) -> Self { self.T = ::std::option::Option::Some(value.into()); self } /// Sets the `cond` attribute. - pub fn cond>( - mut self, - value: ArgType, - ) -> Self { + pub fn cond>(mut self, value: ArgType) -> Self { self.cond = ::std::option::Option::Some(value.into()); self } /// Sets the `body` attribute. - pub fn body>( - mut self, - value: ArgType, - ) -> Self { + pub fn body>(mut self, value: ArgType) -> Self { self.body = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `parallel_iterations` attribute. - pub fn parallel_iterations>( - mut self, - value: ArgType, - ) -> Self { + pub fn parallel_iterations>(mut self, value: ArgType) -> Self { self.parallel_iterations = ::std::option::Option::Some(value.into()); self } @@ -96608,56 +116448,94 @@ impl RiscWhile { } /// Builds the `RiscWhile` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RiscWhile", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type_list("T", value)?; - } - if let ::std::option::Option::Some(value) = &self.cond { - nd.set_attr_string("cond", value)?; - } - if let ::std::option::Option::Some(value) = &self.body { - nd.set_attr_string("body", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.parallel_iterations { - nd.set_attr_int("parallel_iterations", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.cond { + nd.set_attr_string("cond", value)?; + } + if let ::std::option::Option::Some(value) = &self.body { + nd.set_attr_string("body", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.parallel_iterations { + nd.set_attr_int("parallel_iterations", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RiscWhile` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RiscWhile", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.cond { + nd.set_attr_string("cond", value)?; + } + if let ::std::option::Option::Some(value) = &self.body { + nd.set_attr_string("body", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.parallel_iterations { + nd.set_attr_int("parallel_iterations", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RiscWhileInst{op}) + } +} +impl RiscWhileInst { + /// Returns the 'output' output of this 'RiscWhile' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RiscWhileInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RiscWhile::new().build(input, scope)`. -pub fn risc_while>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn risc_while>(input: O0, scope: &mut crate::Scope) -> crate::Result { RiscWhile::new().build(input, scope) } + /// Builder for the `RngReadAndSkip` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RngReadAndSkip { control_inputs: ::std::vec::Vec, } +/// An instance of 'RngReadAndSkip' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RngReadAndSkipInst { + /// An instance of a fully built RngReadAndSkip Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RngReadAndSkip { /// Creates a new `RngReadAndSkip`. @@ -96672,27 +116550,10 @@ impl RngReadAndSkip { } /// Builds the `RngReadAndSkip` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - alg: O1, - delta: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, alg: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), alg.into(), delta.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - alg: crate::Output, - delta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, alg: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RngReadAndSkip", |nd| { nd.add_input(resource); nd.add_input(alg); @@ -96703,26 +116564,54 @@ impl RngReadAndSkip { ::std::result::Result::Ok(()) }) } -} + /// Builds the `RngReadAndSkip` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, alg: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), alg.into(), delta.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, alg: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RngReadAndSkip", |nd| { + nd.add_input(resource); + nd.add_input(alg); + nd.add_input(delta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(RngReadAndSkipInst{op}) + } +} +impl RngReadAndSkipInst { + /// Returns the 'value' output of this 'RngReadAndSkip' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RngReadAndSkipInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RngReadAndSkip::new().build(resource, alg, delta, scope)`. -pub fn rng_read_and_skip< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - alg: O1, - delta: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rng_read_and_skip, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, alg: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { RngReadAndSkip::new().build(resource, alg, delta, scope) } + /// Builder for the `RngSkip` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RngSkip { control_inputs: ::std::vec::Vec, } +/// An instance of 'RngSkip' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RngSkipInst { + /// An instance of a fully built RngSkip Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RngSkip { /// Creates a new `RngSkip`. @@ -96737,27 +116626,10 @@ impl RngSkip { } /// Builds the `RngSkip` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - algorithm: O1, - delta: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, algorithm: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), algorithm.into(), delta.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - algorithm: crate::Output, - delta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, algorithm: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RngSkip", |nd| { nd.add_input(resource); nd.add_input(algorithm); @@ -96768,21 +116640,36 @@ impl RngSkip { ::std::result::Result::Ok(()) }) } -} + /// Builds the `RngSkip` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, algorithm: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), algorithm.into(), delta.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, algorithm: crate::Output, delta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RngSkip", |nd| { + nd.add_input(resource); + nd.add_input(algorithm); + nd.add_input(delta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(RngSkipInst{op}) + } +} +impl RngSkipInst { +} +impl Into for RngSkipInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RngSkip::new().build(resource, algorithm, delta, scope)`. -pub fn rng_skip< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - algorithm: O1, - delta: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rng_skip, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, algorithm: O1, delta: O2, scope: &mut crate::Scope) -> crate::Result { RngSkip::new().build(resource, algorithm, delta, scope) } + /// Builder for the `Roll` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Roll { @@ -96791,6 +116678,12 @@ pub struct Roll { Taxis: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Roll' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RollInst { + /// An instance of a fully built Roll Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Roll { /// Creates a new `Roll`. @@ -96805,10 +116698,7 @@ impl Roll { } /// Sets the `Tshift` attribute. - pub fn Tshift>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshift>(mut self, value: ArgType) -> Self { self.Tshift = ::std::option::Option::Some(value.into()); self } @@ -96826,27 +116716,10 @@ impl Roll { } /// Builds the `Roll` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - shift: O1, - axis: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, shift: O1, axis: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), shift.into(), axis.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - shift: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, shift: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Roll", |nd| { nd.add_input(input); nd.add_input(shift); @@ -96854,39 +116727,76 @@ impl Roll { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshift { - nd.set_attr_type("Tshift", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Taxis { - nd.set_attr_type("Taxis", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshift { + nd.set_attr_type("Tshift", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Taxis { + nd.set_attr_type("Taxis", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Roll` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, shift: O1, axis: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), shift.into(), axis.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, shift: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Roll", |nd| { + nd.add_input(input); + nd.add_input(shift); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshift { + nd.set_attr_type("Tshift", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Taxis { + nd.set_attr_type("Taxis", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RollInst{op}) + } +} +impl RollInst { + /// Returns the 'output' output of this 'Roll' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RollInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Roll::new().build(input, shift, axis, scope)`. -pub fn roll< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - shift: O1, - axis: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn roll, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, shift: O1, axis: O2, scope: &mut crate::Scope) -> crate::Result { Roll::new().build(input, shift, axis, scope) } + /// Builder for the `Round` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Round { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Round' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RoundInst { + /// An instance of a fully built Round Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Round { /// Creates a new `Round`. @@ -96907,45 +116817,71 @@ impl Round { } /// Builds the `Round` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Round", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Round` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Round", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RoundInst{op}) + } +} +impl RoundInst { + /// Returns the 'y' output of this 'Round' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RoundInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Round::new().build(x, scope)`. -pub fn round>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn round>(x: O0, scope: &mut crate::Scope) -> crate::Result { Round::new().build(x, scope) } + /// Builder for the `Rsqrt` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Rsqrt { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Rsqrt' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RsqrtInst { + /// An instance of a fully built Rsqrt Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Rsqrt { /// Creates a new `Rsqrt`. @@ -96966,45 +116902,71 @@ impl Rsqrt { } /// Builds the `Rsqrt` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Rsqrt", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Rsqrt` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Rsqrt", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RsqrtInst{op}) + } +} +impl RsqrtInst { + /// Returns the 'y' output of this 'Rsqrt' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RsqrtInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Rsqrt::new().build(x, scope)`. -pub fn rsqrt>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rsqrt>(x: O0, scope: &mut crate::Scope) -> crate::Result { Rsqrt::new().build(x, scope) } + /// Builder for the `RsqrtGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct RsqrtGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'RsqrtGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct RsqrtGradInst { + /// An instance of a fully built RsqrtGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl RsqrtGrad { /// Creates a new `RsqrtGrad`. @@ -97025,49 +116987,61 @@ impl RsqrtGrad { } /// Builds the `RsqrtGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - y: O0, - dy: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(y.into(), dy.into(), scope) } - - fn build_impl( - &self, - y: crate::Output, - dy: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("RsqrtGrad", |nd| { nd.add_input(y); nd.add_input(dy); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `RsqrtGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(y.into(), dy.into(), scope) + } + fn build_instance_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("RsqrtGrad", |nd| { + nd.add_input(y); + nd.add_input(dy); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(RsqrtGradInst{op}) + } +} +impl RsqrtGradInst { + /// Returns the 'z' output of this 'RsqrtGrad' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for RsqrtGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `RsqrtGrad::new().build(y, dy, scope)`. -pub fn rsqrt_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - y: O0, - dy: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn rsqrt_grad, O1: ::std::convert::Into>(y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { RsqrtGrad::new().build(y, dy, scope) } + /// Builder for the `SampleDistortedBoundingBox` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SampleDistortedBoundingBox { @@ -97081,6 +117055,12 @@ pub struct SampleDistortedBoundingBox { use_image_if_no_bounding_boxes: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SampleDistortedBoundingBox' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SampleDistortedBoundingBoxInst { + /// An instance of a fully built SampleDistortedBoundingBox Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SampleDistortedBoundingBox { /// Creates a new `SampleDistortedBoundingBox`. @@ -97107,28 +117087,19 @@ impl SampleDistortedBoundingBox { } /// Sets the `min_object_covered` attribute. - pub fn min_object_covered>( - mut self, - value: ArgType, - ) -> Self { + pub fn min_object_covered>(mut self, value: ArgType) -> Self { self.min_object_covered = ::std::option::Option::Some(value.into()); self } /// Sets the `aspect_ratio_range` attribute. - pub fn aspect_ratio_range>>( - mut self, - value: ArgType, - ) -> Self { + pub fn aspect_ratio_range>>(mut self, value: ArgType) -> Self { self.aspect_ratio_range = ::std::option::Option::Some(value.into()); self } /// Sets the `area_range` attribute. - pub fn area_range>>( - mut self, - value: ArgType, - ) -> Self { + pub fn area_range>>(mut self, value: ArgType) -> Self { self.area_range = ::std::option::Option::Some(value.into()); self } @@ -97140,10 +117111,7 @@ impl SampleDistortedBoundingBox { } /// Sets the `use_image_if_no_bounding_boxes` attribute. - pub fn use_image_if_no_bounding_boxes>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_image_if_no_bounding_boxes>(mut self, value: ArgType) -> Self { self.use_image_if_no_bounding_boxes = ::std::option::Option::Some(value.into()); self } @@ -97155,70 +117123,117 @@ impl SampleDistortedBoundingBox { } /// Builds the `SampleDistortedBoundingBox` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - image_size: O0, - bounding_boxes: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, image_size: O0, bounding_boxes: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(image_size.into(), bounding_boxes.into(), scope) } - - fn build_impl( - &self, - image_size: crate::Output, - bounding_boxes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, image_size: crate::Output, bounding_boxes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SampleDistortedBoundingBox", |nd| { nd.add_input(image_size); nd.add_input(bounding_boxes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.min_object_covered { - nd.set_attr_float("min_object_covered", *value)?; - } - if let ::std::option::Option::Some(value) = &self.aspect_ratio_range { - nd.set_attr_float_list("aspect_ratio_range", value)?; - } - if let ::std::option::Option::Some(value) = &self.area_range { - nd.set_attr_float_list("area_range", value)?; - } - if let ::std::option::Option::Some(value) = &self.max_attempts { - nd.set_attr_int("max_attempts", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_image_if_no_bounding_boxes { - nd.set_attr_bool("use_image_if_no_bounding_boxes", *value)?; + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.min_object_covered { + nd.set_attr_float("min_object_covered", *value)?; + } + if let ::std::option::Option::Some(value) = &self.aspect_ratio_range { + nd.set_attr_float_list("aspect_ratio_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.area_range { + nd.set_attr_float_list("area_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_attempts { + nd.set_attr_int("max_attempts", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_image_if_no_bounding_boxes { + nd.set_attr_bool("use_image_if_no_bounding_boxes", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `SampleDistortedBoundingBox` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, image_size: O0, bounding_boxes: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(image_size.into(), bounding_boxes.into(), scope) + } + fn build_instance_impl(&self, image_size: crate::Output, bounding_boxes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SampleDistortedBoundingBox", |nd| { + nd.add_input(image_size); + nd.add_input(bounding_boxes); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.min_object_covered { + nd.set_attr_float("min_object_covered", *value)?; + } + if let ::std::option::Option::Some(value) = &self.aspect_ratio_range { + nd.set_attr_float_list("aspect_ratio_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.area_range { + nd.set_attr_float_list("area_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_attempts { + nd.set_attr_int("max_attempts", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_image_if_no_bounding_boxes { + nd.set_attr_bool("use_image_if_no_bounding_boxes", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SampleDistortedBoundingBoxInst{op}) + } +} +impl SampleDistortedBoundingBoxInst { + /// Returns the 'begin' output of this 'SampleDistortedBoundingBox' operation. + pub fn begin(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'size' output of this 'SampleDistortedBoundingBox' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'bboxes' output of this 'SampleDistortedBoundingBox' operation. + pub fn bboxes(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SampleDistortedBoundingBoxInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `SampleDistortedBoundingBox::new().build(image_size, bounding_boxes, scope)`. -pub fn sample_distorted_bounding_box< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - image_size: O0, - bounding_boxes: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sample_distorted_bounding_box, O1: ::std::convert::Into>(image_size: O0, bounding_boxes: O1, scope: &mut crate::Scope) -> crate::Result { SampleDistortedBoundingBox::new().build(image_size, bounding_boxes, scope) } + /// Builder for the `SampleDistortedBoundingBoxV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SampleDistortedBoundingBoxV2 { @@ -97231,6 +117246,12 @@ pub struct SampleDistortedBoundingBoxV2 { use_image_if_no_bounding_boxes: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SampleDistortedBoundingBoxV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SampleDistortedBoundingBoxV2Inst { + /// An instance of a fully built SampleDistortedBoundingBoxV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SampleDistortedBoundingBoxV2 { /// Creates a new `SampleDistortedBoundingBoxV2`. @@ -97257,19 +117278,13 @@ impl SampleDistortedBoundingBoxV2 { } /// Sets the `aspect_ratio_range` attribute. - pub fn aspect_ratio_range>>( - mut self, - value: ArgType, - ) -> Self { + pub fn aspect_ratio_range>>(mut self, value: ArgType) -> Self { self.aspect_ratio_range = ::std::option::Option::Some(value.into()); self } /// Sets the `area_range` attribute. - pub fn area_range>>( - mut self, - value: ArgType, - ) -> Self { + pub fn area_range>>(mut self, value: ArgType) -> Self { self.area_range = ::std::option::Option::Some(value.into()); self } @@ -97281,10 +117296,7 @@ impl SampleDistortedBoundingBoxV2 { } /// Sets the `use_image_if_no_bounding_boxes` attribute. - pub fn use_image_if_no_bounding_boxes>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_image_if_no_bounding_boxes>(mut self, value: ArgType) -> Self { self.use_image_if_no_bounding_boxes = ::std::option::Option::Some(value.into()); self } @@ -97296,32 +117308,10 @@ impl SampleDistortedBoundingBoxV2 { } /// Builds the `SampleDistortedBoundingBoxV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - image_size: O0, - bounding_boxes: O1, - min_object_covered: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - image_size.into(), - bounding_boxes.into(), - min_object_covered.into(), - scope, - ) - } - - fn build_impl( - &self, - image_size: crate::Output, - bounding_boxes: crate::Output, - min_object_covered: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, image_size: O0, bounding_boxes: O1, min_object_covered: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(image_size.into(), bounding_boxes.into(), min_object_covered.into(), scope) + } + fn build_impl(&self, image_size: crate::Output, bounding_boxes: crate::Output, min_object_covered: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SampleDistortedBoundingBoxV2", |nd| { nd.add_input(image_size); nd.add_input(bounding_boxes); @@ -97329,45 +117319,102 @@ impl SampleDistortedBoundingBoxV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.aspect_ratio_range { - nd.set_attr_float_list("aspect_ratio_range", value)?; - } - if let ::std::option::Option::Some(value) = &self.area_range { - nd.set_attr_float_list("area_range", value)?; - } - if let ::std::option::Option::Some(value) = &self.max_attempts { - nd.set_attr_int("max_attempts", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_image_if_no_bounding_boxes { - nd.set_attr_bool("use_image_if_no_bounding_boxes", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.aspect_ratio_range { + nd.set_attr_float_list("aspect_ratio_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.area_range { + nd.set_attr_float_list("area_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_attempts { + nd.set_attr_int("max_attempts", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_image_if_no_bounding_boxes { + nd.set_attr_bool("use_image_if_no_bounding_boxes", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SampleDistortedBoundingBoxV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, image_size: O0, bounding_boxes: O1, min_object_covered: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(image_size.into(), bounding_boxes.into(), min_object_covered.into(), scope) + } + fn build_instance_impl(&self, image_size: crate::Output, bounding_boxes: crate::Output, min_object_covered: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SampleDistortedBoundingBoxV2", |nd| { + nd.add_input(image_size); + nd.add_input(bounding_boxes); + nd.add_input(min_object_covered); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.aspect_ratio_range { + nd.set_attr_float_list("aspect_ratio_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.area_range { + nd.set_attr_float_list("area_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_attempts { + nd.set_attr_int("max_attempts", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_image_if_no_bounding_boxes { + nd.set_attr_bool("use_image_if_no_bounding_boxes", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SampleDistortedBoundingBoxV2Inst{op}) + } +} +impl SampleDistortedBoundingBoxV2Inst { + /// Returns the 'begin' output of this 'SampleDistortedBoundingBoxV2' operation. + pub fn begin(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'size' output of this 'SampleDistortedBoundingBoxV2' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'bboxes' output of this 'SampleDistortedBoundingBoxV2' operation. + pub fn bboxes(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SampleDistortedBoundingBoxV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SampleDistortedBoundingBoxV2::new().build(image_size, bounding_boxes, min_object_covered, scope)`. -pub fn sample_distorted_bounding_box_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - image_size: O0, - bounding_boxes: O1, - min_object_covered: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sample_distorted_bounding_box_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(image_size: O0, bounding_boxes: O1, min_object_covered: O2, scope: &mut crate::Scope) -> crate::Result { SampleDistortedBoundingBoxV2::new().build(image_size, bounding_boxes, min_object_covered, scope) } + /// Builder for the `SamplingDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SamplingDataset { @@ -97375,6 +117422,12 @@ pub struct SamplingDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SamplingDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SamplingDatasetInst { + /// An instance of a fully built SamplingDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SamplingDataset { /// Creates a new `SamplingDataset`. @@ -97383,19 +117436,13 @@ impl SamplingDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -97407,36 +117454,10 @@ impl SamplingDataset { } /// Builds the `SamplingDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - rate: O1, - seed: O2, - seed2: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - rate.into(), - seed.into(), - seed2.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - rate: crate::Output, - seed: crate::Output, - seed2: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, rate: O1, seed: O2, seed2: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), rate.into(), seed.into(), seed2.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, rate: crate::Output, seed: crate::Output, seed2: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SamplingDataset", |nd| { nd.add_input(input_dataset); nd.add_input(rate); @@ -97445,38 +117466,71 @@ impl SamplingDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SamplingDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, rate: O1, seed: O2, seed2: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), rate.into(), seed.into(), seed2.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, rate: crate::Output, seed: crate::Output, seed2: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SamplingDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(rate); + nd.add_input(seed); + nd.add_input(seed2); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SamplingDatasetInst{op}) + } +} +impl SamplingDatasetInst { + /// Returns the 'handle' output of this 'SamplingDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SamplingDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SamplingDataset::new().build(input_dataset, rate, seed, seed2, scope)`. -pub fn sampling_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - rate: O1, - seed: O2, - seed2: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sampling_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, rate: O1, seed: O2, seed2: O3, scope: &mut crate::Scope) -> crate::Result { SamplingDataset::new().build(input_dataset, rate, seed, seed2, scope) } + /// Builder for the `Save` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Save { T: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Save' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SaveInst { + /// An instance of a fully built Save Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Save { /// Creates a new `Save`. @@ -97485,10 +117539,7 @@ impl Save { } /// Sets the `T` attribute. - pub fn T>>( - mut self, - value: ArgType, - ) -> Self { + pub fn T>>(mut self, value: ArgType) -> Self { self.T = ::std::option::Option::Some(value.into()); self } @@ -97500,27 +117551,10 @@ impl Save { } /// Builds the `Save` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - filename: O0, - tensor_names: O1, - data: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, filename: O0, tensor_names: O1, data: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(filename.into(), tensor_names.into(), data.into(), scope) } - - fn build_impl( - &self, - filename: crate::Output, - tensor_names: crate::Output, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, filename: crate::Output, tensor_names: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Save", |nd| { nd.add_input(filename); nd.add_input(tensor_names); @@ -97528,27 +117562,45 @@ impl Save { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type_list("T", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Save` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, filename: O0, tensor_names: O1, data: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filename.into(), tensor_names.into(), data.into(), scope) + } + fn build_instance_impl(&self, filename: crate::Output, tensor_names: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Save", |nd| { + nd.add_input(filename); + nd.add_input(tensor_names); + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SaveInst{op}) + } +} +impl SaveInst { +} +impl Into for SaveInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Save::new().build(filename, tensor_names, data, scope)`. -pub fn save< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - filename: O0, - tensor_names: O1, - data: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn save, O1: ::std::convert::Into, O2: ::std::convert::Into>(filename: O0, tensor_names: O1, data: O2, scope: &mut crate::Scope) -> crate::Result { Save::new().build(filename, tensor_names, data, scope) } + /// Builder for the `SaveDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SaveDataset { @@ -97558,6 +117610,12 @@ pub struct SaveDataset { Tshard_func_args: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SaveDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SaveDatasetInst { + /// An instance of a fully built SaveDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SaveDataset { /// Creates a new `SaveDataset`. @@ -97566,19 +117624,13 @@ impl SaveDataset { } /// Sets the `compression` attribute. - pub fn compression>( - mut self, - value: ArgType, - ) -> Self { + pub fn compression>(mut self, value: ArgType) -> Self { self.compression = ::std::option::Option::Some(value.into()); self } /// Sets the `shard_func` attribute. - pub fn shard_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn shard_func>(mut self, value: ArgType) -> Self { self.shard_func = ::std::option::Option::Some(value.into()); self } @@ -97590,10 +117642,7 @@ impl SaveDataset { } /// Sets the `Tshard_func_args` attribute. - pub fn Tshard_func_args>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshard_func_args>>(mut self, value: ArgType) -> Self { self.Tshard_func_args = ::std::option::Option::Some(value.into()); self } @@ -97605,32 +117654,10 @@ impl SaveDataset { } /// Builds the `SaveDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - path: O1, - shard_func_other_args: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - path.into(), - shard_func_other_args.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - path: crate::Output, - shard_func_other_args: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, path: O1, shard_func_other_args: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), path.into(), shard_func_other_args.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, path: crate::Output, shard_func_other_args: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SaveDataset", |nd| { nd.add_input(input_dataset); nd.add_input(path); @@ -97638,36 +117665,63 @@ impl SaveDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.compression { - nd.set_attr_string("compression", value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_func { - nd.set_attr_string("shard_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_shard_func { - nd.set_attr_bool("use_shard_func", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshard_func_args { - nd.set_attr_type_list("Tshard_func_args", value)?; - } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_func { + nd.set_attr_string("shard_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_shard_func { + nd.set_attr_bool("use_shard_func", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshard_func_args { + nd.set_attr_type_list("Tshard_func_args", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SaveDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, path: O1, shard_func_other_args: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), path.into(), shard_func_other_args.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, path: crate::Output, shard_func_other_args: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SaveDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(path); + nd.add_input(shard_func_other_args); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_func { + nd.set_attr_string("shard_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_shard_func { + nd.set_attr_bool("use_shard_func", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshard_func_args { + nd.set_attr_type_list("Tshard_func_args", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SaveDatasetInst{op}) + } +} +impl SaveDatasetInst { +} +impl Into for SaveDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SaveDataset::new().build(input_dataset, path, shard_func_other_args, scope)`. -pub fn save_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - path: O1, - shard_func_other_args: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn save_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, path: O1, shard_func_other_args: O2, scope: &mut crate::Scope) -> crate::Result { SaveDataset::new().build(input_dataset, path, shard_func_other_args, scope) } + /// Builder for the `SaveDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SaveDatasetV2 { @@ -97679,6 +117733,12 @@ pub struct SaveDatasetV2 { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SaveDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SaveDatasetV2Inst { + /// An instance of a fully built SaveDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SaveDatasetV2 { /// Creates a new `SaveDatasetV2`. @@ -97687,19 +117747,13 @@ impl SaveDatasetV2 { } /// Sets the `compression` attribute. - pub fn compression>( - mut self, - value: ArgType, - ) -> Self { + pub fn compression>(mut self, value: ArgType) -> Self { self.compression = ::std::option::Option::Some(value.into()); self } /// Sets the `shard_func` attribute. - pub fn shard_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn shard_func>(mut self, value: ArgType) -> Self { self.shard_func = ::std::option::Option::Some(value.into()); self } @@ -97711,28 +117765,19 @@ impl SaveDatasetV2 { } /// Sets the `Tshard_func_args` attribute. - pub fn Tshard_func_args>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshard_func_args>>(mut self, value: ArgType) -> Self { self.Tshard_func_args = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -97744,32 +117789,10 @@ impl SaveDatasetV2 { } /// Builds the `SaveDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - path: O1, - shard_func_other_args: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - path.into(), - shard_func_other_args.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - path: crate::Output, - shard_func_other_args: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, path: O1, shard_func_other_args: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), path.into(), shard_func_other_args.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, path: crate::Output, shard_func_other_args: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SaveDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(path); @@ -97777,48 +117800,94 @@ impl SaveDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.compression { - nd.set_attr_string("compression", value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_func { - nd.set_attr_string("shard_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_shard_func { - nd.set_attr_bool("use_shard_func", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshard_func_args { - nd.set_attr_type_list("Tshard_func_args", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_func { + nd.set_attr_string("shard_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_shard_func { + nd.set_attr_bool("use_shard_func", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshard_func_args { + nd.set_attr_type_list("Tshard_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SaveDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, path: O1, shard_func_other_args: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), path.into(), shard_func_other_args.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, path: crate::Output, shard_func_other_args: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SaveDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(path); + nd.add_input(shard_func_other_args); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_func { + nd.set_attr_string("shard_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_shard_func { + nd.set_attr_bool("use_shard_func", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshard_func_args { + nd.set_attr_type_list("Tshard_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SaveDatasetV2Inst{op}) + } +} +impl SaveDatasetV2Inst { + /// Returns the 'handle' output of this 'SaveDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SaveDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SaveDatasetV2::new().build(input_dataset, path, shard_func_other_args, scope)`. -pub fn save_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - path: O1, - shard_func_other_args: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn save_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, path: O1, shard_func_other_args: O2, scope: &mut crate::Scope) -> crate::Result { SaveDatasetV2::new().build(input_dataset, path, shard_func_other_args, scope) } + /// Builder for the `SaveSlices` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SaveSlices { T: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SaveSlices' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SaveSlicesInst { + /// An instance of a fully built SaveSlices Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SaveSlices { /// Creates a new `SaveSlices`. @@ -97827,10 +117896,7 @@ impl SaveSlices { } /// Sets the `T` attribute. - pub fn T>>( - mut self, - value: ArgType, - ) -> Self { + pub fn T>>(mut self, value: ArgType) -> Self { self.T = ::std::option::Option::Some(value.into()); self } @@ -97842,36 +117908,10 @@ impl SaveSlices { } /// Builds the `SaveSlices` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - filename: O0, - tensor_names: O1, - shapes_and_slices: O2, - data: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - filename.into(), - tensor_names.into(), - shapes_and_slices.into(), - data.into(), - scope, - ) - } - - fn build_impl( - &self, - filename: crate::Output, - tensor_names: crate::Output, - shapes_and_slices: crate::Output, - data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, filename: O0, tensor_names: O1, shapes_and_slices: O2, data: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(filename.into(), tensor_names.into(), shapes_and_slices.into(), data.into(), scope) + } + fn build_impl(&self, filename: crate::Output, tensor_names: crate::Output, shapes_and_slices: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SaveSlices", |nd| { nd.add_input(filename); nd.add_input(tensor_names); @@ -97880,35 +117920,58 @@ impl SaveSlices { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type_list("T", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SaveSlices` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, filename: O0, tensor_names: O1, shapes_and_slices: O2, data: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filename.into(), tensor_names.into(), shapes_and_slices.into(), data.into(), scope) + } + fn build_instance_impl(&self, filename: crate::Output, tensor_names: crate::Output, shapes_and_slices: crate::Output, data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SaveSlices", |nd| { + nd.add_input(filename); + nd.add_input(tensor_names); + nd.add_input(shapes_and_slices); + nd.add_input(data); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SaveSlicesInst{op}) + } +} +impl SaveSlicesInst { +} +impl Into for SaveSlicesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SaveSlices::new().build(filename, tensor_names, shapes_and_slices, data, scope)`. -pub fn save_slices< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - filename: O0, - tensor_names: O1, - shapes_and_slices: O2, - data: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn save_slices, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(filename: O0, tensor_names: O1, shapes_and_slices: O2, data: O3, scope: &mut crate::Scope) -> crate::Result { SaveSlices::new().build(filename, tensor_names, shapes_and_slices, data, scope) } + /// Builder for the `SaveV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SaveV2 { dtypes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SaveV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SaveV2Inst { + /// An instance of a fully built SaveV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SaveV2 { /// Creates a new `SaveV2`. @@ -97917,10 +117980,7 @@ impl SaveV2 { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } @@ -97932,36 +117992,10 @@ impl SaveV2 { } /// Builds the `SaveV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - prefix: O0, - tensor_names: O1, - shape_and_slices: O2, - tensors: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - prefix.into(), - tensor_names.into(), - shape_and_slices.into(), - tensors.into(), - scope, - ) - } - - fn build_impl( - &self, - prefix: crate::Output, - tensor_names: crate::Output, - shape_and_slices: crate::Output, - tensors: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, prefix: O0, tensor_names: O1, shape_and_slices: O2, tensors: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(prefix.into(), tensor_names.into(), shape_and_slices.into(), tensors.into(), scope) + } + fn build_impl(&self, prefix: crate::Output, tensor_names: crate::Output, shape_and_slices: crate::Output, tensors: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SaveV2", |nd| { nd.add_input(prefix); nd.add_input(tensor_names); @@ -97970,35 +118004,58 @@ impl SaveV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SaveV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, prefix: O0, tensor_names: O1, shape_and_slices: O2, tensors: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(prefix.into(), tensor_names.into(), shape_and_slices.into(), tensors.into(), scope) + } + fn build_instance_impl(&self, prefix: crate::Output, tensor_names: crate::Output, shape_and_slices: crate::Output, tensors: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SaveV2", |nd| { + nd.add_input(prefix); + nd.add_input(tensor_names); + nd.add_input(shape_and_slices); + nd.add_input(tensors); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SaveV2Inst{op}) + } +} +impl SaveV2Inst { +} +impl Into for SaveV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SaveV2::new().build(prefix, tensor_names, shape_and_slices, tensors, scope)`. -pub fn save_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - prefix: O0, - tensor_names: O1, - shape_and_slices: O2, - tensors: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn save_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(prefix: O0, tensor_names: O1, shape_and_slices: O2, tensors: O3, scope: &mut crate::Scope) -> crate::Result { SaveV2::new().build(prefix, tensor_names, shape_and_slices, tensors, scope) } + /// Builder for the `ScalarSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScalarSummary { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScalarSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScalarSummaryInst { + /// An instance of a fully built ScalarSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScalarSummary { /// Creates a new `ScalarSummary`. @@ -98019,49 +118076,61 @@ impl ScalarSummary { } /// Builds the `ScalarSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tags: O0, - values: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tags: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tags.into(), values.into(), scope) } - - fn build_impl( - &self, - tags: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tags: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScalarSummary", |nd| { nd.add_input(tags); nd.add_input(values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScalarSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tags: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tags.into(), values.into(), scope) + } + fn build_instance_impl(&self, tags: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScalarSummary", |nd| { + nd.add_input(tags); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScalarSummaryInst{op}) + } +} +impl ScalarSummaryInst { + /// Returns the 'summary' output of this 'ScalarSummary' operation. + pub fn summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScalarSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScalarSummary::new().build(tags, values, scope)`. -pub fn scalar_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tags: O0, - values: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scalar_summary, O1: ::std::convert::Into>(tags: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { ScalarSummary::new().build(tags, values, scope) } + /// Builder for the `ScaleAndTranslate` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScaleAndTranslate { @@ -98070,6 +118139,12 @@ pub struct ScaleAndTranslate { antialias: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScaleAndTranslate' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScaleAndTranslateInst { + /// An instance of a fully built ScaleAndTranslate Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScaleAndTranslate { /// Creates a new `ScaleAndTranslate`. @@ -98084,10 +118159,7 @@ impl ScaleAndTranslate { } /// Sets the `kernel_type` attribute. - pub fn kernel_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn kernel_type>(mut self, value: ArgType) -> Self { self.kernel_type = ::std::option::Option::Some(value.into()); self } @@ -98105,36 +118177,10 @@ impl ScaleAndTranslate { } /// Builds the `ScaleAndTranslate` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - images: O0, - size: O1, - scale: O2, - translation: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - images.into(), - size.into(), - scale.into(), - translation.into(), - scope, - ) - } - - fn build_impl( - &self, - images: crate::Output, - size: crate::Output, - scale: crate::Output, - translation: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, images: O0, size: O1, scale: O2, translation: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(images.into(), size.into(), scale.into(), translation.into(), scope) + } + fn build_impl(&self, images: crate::Output, size: crate::Output, scale: crate::Output, translation: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScaleAndTranslate", |nd| { nd.add_input(images); nd.add_input(size); @@ -98143,35 +118189,65 @@ impl ScaleAndTranslate { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.kernel_type { - nd.set_attr_string("kernel_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.antialias { - nd.set_attr_bool("antialias", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.kernel_type { + nd.set_attr_string("kernel_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.antialias { + nd.set_attr_bool("antialias", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScaleAndTranslate` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, images: O0, size: O1, scale: O2, translation: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(images.into(), size.into(), scale.into(), translation.into(), scope) + } + fn build_instance_impl(&self, images: crate::Output, size: crate::Output, scale: crate::Output, translation: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScaleAndTranslate", |nd| { + nd.add_input(images); + nd.add_input(size); + nd.add_input(scale); + nd.add_input(translation); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.kernel_type { + nd.set_attr_string("kernel_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.antialias { + nd.set_attr_bool("antialias", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScaleAndTranslateInst{op}) + } +} +impl ScaleAndTranslateInst { + /// Returns the 'resized_images' output of this 'ScaleAndTranslate' operation. + pub fn resized_images(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScaleAndTranslateInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScaleAndTranslate::new().build(images, size, scale, translation, scope)`. -pub fn scale_and_translate< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - images: O0, - size: O1, - scale: O2, - translation: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scale_and_translate, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(images: O0, size: O1, scale: O2, translation: O3, scope: &mut crate::Scope) -> crate::Result { ScaleAndTranslate::new().build(images, size, scale, translation, scope) } + /// Builder for the `ScaleAndTranslateGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScaleAndTranslateGrad { @@ -98180,6 +118256,12 @@ pub struct ScaleAndTranslateGrad { antialias: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScaleAndTranslateGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScaleAndTranslateGradInst { + /// An instance of a fully built ScaleAndTranslateGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScaleAndTranslateGrad { /// Creates a new `ScaleAndTranslateGrad`. @@ -98194,10 +118276,7 @@ impl ScaleAndTranslateGrad { } /// Sets the `kernel_type` attribute. - pub fn kernel_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn kernel_type>(mut self, value: ArgType) -> Self { self.kernel_type = ::std::option::Option::Some(value.into()); self } @@ -98215,36 +118294,10 @@ impl ScaleAndTranslateGrad { } /// Builds the `ScaleAndTranslateGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - grads: O0, - original_image: O1, - scale: O2, - translation: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - grads.into(), - original_image.into(), - scale.into(), - translation.into(), - scope, - ) - } - - fn build_impl( - &self, - grads: crate::Output, - original_image: crate::Output, - scale: crate::Output, - translation: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grads: O0, original_image: O1, scale: O2, translation: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(grads.into(), original_image.into(), scale.into(), translation.into(), scope) + } + fn build_impl(&self, grads: crate::Output, original_image: crate::Output, scale: crate::Output, translation: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScaleAndTranslateGrad", |nd| { nd.add_input(grads); nd.add_input(original_image); @@ -98253,35 +118306,65 @@ impl ScaleAndTranslateGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.kernel_type { - nd.set_attr_string("kernel_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.antialias { - nd.set_attr_bool("antialias", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.kernel_type { + nd.set_attr_string("kernel_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.antialias { + nd.set_attr_bool("antialias", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScaleAndTranslateGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grads: O0, original_image: O1, scale: O2, translation: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(grads.into(), original_image.into(), scale.into(), translation.into(), scope) + } + fn build_instance_impl(&self, grads: crate::Output, original_image: crate::Output, scale: crate::Output, translation: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScaleAndTranslateGrad", |nd| { + nd.add_input(grads); + nd.add_input(original_image); + nd.add_input(scale); + nd.add_input(translation); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.kernel_type { + nd.set_attr_string("kernel_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.antialias { + nd.set_attr_bool("antialias", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScaleAndTranslateGradInst{op}) + } +} +impl ScaleAndTranslateGradInst { + /// Returns the 'output' output of this 'ScaleAndTranslateGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScaleAndTranslateGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScaleAndTranslateGrad::new().build(grads, original_image, scale, translation, scope)`. -pub fn scale_and_translate_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - grads: O0, - original_image: O1, - scale: O2, - translation: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scale_and_translate_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(grads: O0, original_image: O1, scale: O2, translation: O3, scope: &mut crate::Scope) -> crate::Result { ScaleAndTranslateGrad::new().build(grads, original_image, scale, translation, scope) } + /// Builder for the `ScanDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScanDataset { @@ -98295,6 +118378,12 @@ pub struct ScanDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScanDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScanDatasetInst { + /// An instance of a fully built ScanDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScanDataset { /// Creates a new `ScanDataset`. @@ -98303,73 +118392,49 @@ impl ScanDataset { } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `Tstate` attribute. - pub fn Tstate>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tstate>>(mut self, value: ArgType) -> Self { self.Tstate = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `preserve_cardinality` attribute. - pub fn preserve_cardinality>( - mut self, - value: ArgType, - ) -> Self { + pub fn preserve_cardinality>(mut self, value: ArgType) -> Self { self.preserve_cardinality = ::std::option::Option::Some(value.into()); self } /// Sets the `use_default_device` attribute. - pub fn use_default_device>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_default_device>(mut self, value: ArgType) -> Self { self.use_default_device = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -98381,32 +118446,10 @@ impl ScanDataset { } /// Builds the `ScanDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - initial_state: O1, - other_arguments: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - initial_state.into(), - other_arguments.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - initial_state: crate::Output, - other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, initial_state: O1, other_arguments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), initial_state.into(), other_arguments.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, initial_state: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScanDataset", |nd| { nd.add_input(input_dataset); nd.add_input(initial_state); @@ -98414,48 +118457,94 @@ impl ScanDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tstate { - nd.set_attr_type_list("Tstate", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.preserve_cardinality { - nd.set_attr_bool("preserve_cardinality", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_default_device { - nd.set_attr_bool("use_default_device", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tstate { + nd.set_attr_type_list("Tstate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_default_device { + nd.set_attr_bool("use_default_device", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ScanDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, initial_state: O1, other_arguments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), initial_state.into(), other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, initial_state: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScanDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(initial_state); + nd.add_input(other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tstate { + nd.set_attr_type_list("Tstate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_cardinality { + nd.set_attr_bool("preserve_cardinality", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_default_device { + nd.set_attr_bool("use_default_device", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScanDatasetInst{op}) + } +} +impl ScanDatasetInst { + /// Returns the 'handle' output of this 'ScanDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScanDatasetInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ScanDataset::new().build(input_dataset, initial_state, other_arguments, scope)`. -pub fn scan_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - initial_state: O1, - other_arguments: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scan_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, initial_state: O1, other_arguments: O2, scope: &mut crate::Scope) -> crate::Result { ScanDataset::new().build(input_dataset, initial_state, other_arguments, scope) } + /// Builder for the `ScatterAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterAdd { @@ -98464,6 +118553,12 @@ pub struct ScatterAdd { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterAddInst { + /// An instance of a fully built ScatterAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterAdd { /// Creates a new `ScatterAdd`. @@ -98478,10 +118573,7 @@ impl ScatterAdd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -98499,27 +118591,10 @@ impl ScatterAdd { } /// Builds the `ScatterAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterAdd", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -98527,33 +118602,64 @@ impl ScatterAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterAdd", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterAddInst{op}) + } +} +impl ScatterAddInst { + /// Returns the 'output_ref' output of this 'ScatterAdd' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterAdd::new().build(ref_, indices, updates, scope)`. -pub fn scatter_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_add, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterAdd::new().build(ref_, indices, updates, scope) } + /// Builder for the `ScatterDiv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterDiv { @@ -98562,6 +118668,12 @@ pub struct ScatterDiv { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterDiv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterDivInst { + /// An instance of a fully built ScatterDiv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterDiv { /// Creates a new `ScatterDiv`. @@ -98576,10 +118688,7 @@ impl ScatterDiv { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -98597,27 +118706,10 @@ impl ScatterDiv { } /// Builds the `ScatterDiv` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterDiv", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -98625,33 +118717,64 @@ impl ScatterDiv { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterDiv` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterDiv", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterDivInst{op}) + } +} +impl ScatterDivInst { + /// Returns the 'output_ref' output of this 'ScatterDiv' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterDivInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterDiv::new().build(ref_, indices, updates, scope)`. -pub fn scatter_div< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_div, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterDiv::new().build(ref_, indices, updates, scope) } + /// Builder for the `ScatterMax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterMax { @@ -98660,6 +118783,12 @@ pub struct ScatterMax { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterMaxInst { + /// An instance of a fully built ScatterMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterMax { /// Creates a new `ScatterMax`. @@ -98674,10 +118803,7 @@ impl ScatterMax { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -98695,27 +118821,10 @@ impl ScatterMax { } /// Builds the `ScatterMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterMax", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -98723,33 +118832,64 @@ impl ScatterMax { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterMax", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterMaxInst{op}) + } +} +impl ScatterMaxInst { + /// Returns the 'output_ref' output of this 'ScatterMax' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterMaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterMax::new().build(ref_, indices, updates, scope)`. -pub fn scatter_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_max, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterMax::new().build(ref_, indices, updates, scope) } + /// Builder for the `ScatterMin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterMin { @@ -98758,6 +118898,12 @@ pub struct ScatterMin { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterMin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterMinInst { + /// An instance of a fully built ScatterMin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterMin { /// Creates a new `ScatterMin`. @@ -98772,10 +118918,7 @@ impl ScatterMin { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -98793,27 +118936,10 @@ impl ScatterMin { } /// Builds the `ScatterMin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterMin", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -98821,33 +118947,64 @@ impl ScatterMin { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterMin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterMin", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterMinInst{op}) + } +} +impl ScatterMinInst { + /// Returns the 'output_ref' output of this 'ScatterMin' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterMinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterMin::new().build(ref_, indices, updates, scope)`. -pub fn scatter_min< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_min, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterMin::new().build(ref_, indices, updates, scope) } + /// Builder for the `ScatterMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterMul { @@ -98856,6 +119013,12 @@ pub struct ScatterMul { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterMulInst { + /// An instance of a fully built ScatterMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterMul { /// Creates a new `ScatterMul`. @@ -98870,10 +119033,7 @@ impl ScatterMul { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -98891,27 +119051,10 @@ impl ScatterMul { } /// Builds the `ScatterMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterMul", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -98919,33 +119062,64 @@ impl ScatterMul { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterMul", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterMulInst{op}) + } +} +impl ScatterMulInst { + /// Returns the 'output_ref' output of this 'ScatterMul' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterMul::new().build(ref_, indices, updates, scope)`. -pub fn scatter_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_mul, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterMul::new().build(ref_, indices, updates, scope) } + /// Builder for the `ScatterNd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterNd { @@ -98953,6 +119127,12 @@ pub struct ScatterNd { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterNd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterNdInst { + /// An instance of a fully built ScatterNd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterNd { /// Creates a new `ScatterNd`. @@ -98967,10 +119147,7 @@ impl ScatterNd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -98982,27 +119159,10 @@ impl ScatterNd { } /// Builds the `ScatterNd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - indices: O0, - updates: O1, - shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, indices: O0, updates: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(indices.into(), updates.into(), shape.into(), scope) } - - fn build_impl( - &self, - indices: crate::Output, - updates: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, indices: crate::Output, updates: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterNd", |nd| { nd.add_input(indices); nd.add_input(updates); @@ -99010,30 +119170,58 @@ impl ScatterNd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterNd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, indices: O0, updates: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), updates.into(), shape.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, updates: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterNd", |nd| { + nd.add_input(indices); + nd.add_input(updates); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterNdInst{op}) + } +} +impl ScatterNdInst { + /// Returns the 'output' output of this 'ScatterNd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterNdInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterNd::new().build(indices, updates, shape, scope)`. -pub fn scatter_nd< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - indices: O0, - updates: O1, - shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_nd, O1: ::std::convert::Into, O2: ::std::convert::Into>(indices: O0, updates: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { ScatterNd::new().build(indices, updates, shape, scope) } + /// Builder for the `ScatterNdAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterNdAdd { @@ -99042,6 +119230,12 @@ pub struct ScatterNdAdd { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterNdAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterNdAddInst { + /// An instance of a fully built ScatterNdAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterNdAdd { /// Creates a new `ScatterNdAdd`. @@ -99056,10 +119250,122 @@ impl ScatterNdAdd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { + self.Tindices = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `use_locking` attribute. + pub fn use_locking>(mut self, value: ArgType) -> Self { + self.use_locking = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `ScatterNdAdd` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("ScatterNdAdd", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `ScatterNdAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterNdAdd", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterNdAddInst{op}) + } +} +impl ScatterNdAddInst { + /// Returns the 'output_ref' output of this 'ScatterNdAdd' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterNdAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `ScatterNdAdd::new().build(ref_, indices, updates, scope)`. +pub fn scatter_nd_add, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + ScatterNdAdd::new().build(ref_, indices, updates, scope) +} + +/// Builder for the `ScatterNdMax` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct ScatterNdMax { + T: ::std::option::Option, + Tindices: ::std::option::Option, + use_locking: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'ScatterNdMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterNdMaxInst { + /// An instance of a fully built ScatterNdMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl ScatterNdMax { + /// Creates a new `ScatterNdMax`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `T` attribute. + pub fn T>(mut self, value: ArgType) -> Self { + self.T = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `Tindices` attribute. + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -99076,160 +119382,76 @@ impl ScatterNdAdd { self } - /// Builds the `ScatterNdAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + /// Builds the `ScatterNdMax` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("ScatterNdAdd", |nd| { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("ScatterNdMax", |nd| { nd.add_input(ref_); nd.add_input(indices); nd.add_input(updates); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} -/// Shorthand for `ScatterNdAdd::new().build(ref_, indices, updates, scope)`. -pub fn scatter_nd_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { - ScatterNdAdd::new().build(ref_, indices, updates, scope) -} -/// Builder for the `ScatterNdMax` operation. -#[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct ScatterNdMax { - T: ::std::option::Option, - Tindices: ::std::option::Option, - use_locking: ::std::option::Option, - control_inputs: ::std::vec::Vec, -} - -impl ScatterNdMax { - /// Creates a new `ScatterNdMax`. - pub fn new() -> Self { - Self::default() + /// Builds the `ScatterNdMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) } - - /// Sets the `T` attribute. - pub fn T>(mut self, value: ArgType) -> Self { - self.T = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { - self.Tindices = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `use_locking` attribute. - pub fn use_locking>(mut self, value: ArgType) -> Self { - self.use_locking = ::std::option::Option::Some(value.into()); - self - } - - /// Adds a control input. - pub fn add_control_input(mut self, op: crate::Operation) -> Self { - self.control_inputs.push(op); - self - } - - /// Builds the `ScatterNdMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl(ref_.into(), indices.into(), updates.into(), scope) - } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("ScatterNdMax", |nd| { + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterNdMax", |nd| { nd.add_input(ref_); nd.add_input(indices); nd.add_input(updates); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) - }) + })?; + Ok(ScatterNdMaxInst{op}) + } +} +impl ScatterNdMaxInst { + /// Returns the 'output_ref' output of this 'ScatterNdMax' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterNdMaxInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `ScatterNdMax::new().build(ref_, indices, updates, scope)`. -pub fn scatter_nd_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_nd_max, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterNdMax::new().build(ref_, indices, updates, scope) } + /// Builder for the `ScatterNdMin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterNdMin { @@ -99238,6 +119460,12 @@ pub struct ScatterNdMin { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterNdMin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterNdMinInst { + /// An instance of a fully built ScatterNdMin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterNdMin { /// Creates a new `ScatterNdMin`. @@ -99252,10 +119480,7 @@ impl ScatterNdMin { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -99273,27 +119498,10 @@ impl ScatterNdMin { } /// Builds the `ScatterNdMin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterNdMin", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -99301,33 +119509,64 @@ impl ScatterNdMin { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterNdMin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterNdMin", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterNdMinInst{op}) + } +} +impl ScatterNdMinInst { + /// Returns the 'output_ref' output of this 'ScatterNdMin' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterNdMinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterNdMin::new().build(ref_, indices, updates, scope)`. -pub fn scatter_nd_min< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_nd_min, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterNdMin::new().build(ref_, indices, updates, scope) } + /// Builder for the `ScatterNdNonAliasingAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterNdNonAliasingAdd { @@ -99335,6 +119574,12 @@ pub struct ScatterNdNonAliasingAdd { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterNdNonAliasingAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterNdNonAliasingAddInst { + /// An instance of a fully built ScatterNdNonAliasingAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterNdNonAliasingAdd { /// Creates a new `ScatterNdNonAliasingAdd`. @@ -99349,10 +119594,7 @@ impl ScatterNdNonAliasingAdd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -99364,27 +119606,10 @@ impl ScatterNdNonAliasingAdd { } /// Builds the `ScatterNdNonAliasingAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterNdNonAliasingAdd", |nd| { nd.add_input(input); nd.add_input(indices); @@ -99392,30 +119617,58 @@ impl ScatterNdNonAliasingAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterNdNonAliasingAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterNdNonAliasingAdd", |nd| { + nd.add_input(input); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterNdNonAliasingAddInst{op}) + } +} +impl ScatterNdNonAliasingAddInst { + /// Returns the 'output' output of this 'ScatterNdNonAliasingAdd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterNdNonAliasingAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterNdNonAliasingAdd::new().build(input, indices, updates, scope)`. -pub fn scatter_nd_non_aliasing_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_nd_non_aliasing_add, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterNdNonAliasingAdd::new().build(input, indices, updates, scope) } + /// Builder for the `ScatterNdSub` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterNdSub { @@ -99424,6 +119677,12 @@ pub struct ScatterNdSub { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterNdSub' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterNdSubInst { + /// An instance of a fully built ScatterNdSub Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterNdSub { /// Creates a new `ScatterNdSub`. @@ -99438,10 +119697,7 @@ impl ScatterNdSub { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -99459,27 +119715,10 @@ impl ScatterNdSub { } /// Builds the `ScatterNdSub` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterNdSub", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -99487,33 +119726,64 @@ impl ScatterNdSub { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterNdSub` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterNdSub", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterNdSubInst{op}) + } +} +impl ScatterNdSubInst { + /// Returns the 'output_ref' output of this 'ScatterNdSub' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterNdSubInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterNdSub::new().build(ref_, indices, updates, scope)`. -pub fn scatter_nd_sub< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_nd_sub, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterNdSub::new().build(ref_, indices, updates, scope) } + /// Builder for the `ScatterNdUpdate` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterNdUpdate { @@ -99522,6 +119792,12 @@ pub struct ScatterNdUpdate { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterNdUpdate' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterNdUpdateInst { + /// An instance of a fully built ScatterNdUpdate Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterNdUpdate { /// Creates a new `ScatterNdUpdate`. @@ -99536,10 +119812,7 @@ impl ScatterNdUpdate { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -99557,27 +119830,10 @@ impl ScatterNdUpdate { } /// Builds the `ScatterNdUpdate` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterNdUpdate", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -99585,33 +119841,64 @@ impl ScatterNdUpdate { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterNdUpdate` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterNdUpdate", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterNdUpdateInst{op}) + } +} +impl ScatterNdUpdateInst { + /// Returns the 'output_ref' output of this 'ScatterNdUpdate' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterNdUpdateInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterNdUpdate::new().build(ref_, indices, updates, scope)`. -pub fn scatter_nd_update< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_nd_update, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterNdUpdate::new().build(ref_, indices, updates, scope) } + /// Builder for the `ScatterSub` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterSub { @@ -99620,6 +119907,12 @@ pub struct ScatterSub { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterSub' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterSubInst { + /// An instance of a fully built ScatterSub Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterSub { /// Creates a new `ScatterSub`. @@ -99634,10 +119927,7 @@ impl ScatterSub { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -99655,27 +119945,10 @@ impl ScatterSub { } /// Builds the `ScatterSub` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterSub", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -99683,33 +119956,64 @@ impl ScatterSub { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterSub` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterSub", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterSubInst{op}) + } +} +impl ScatterSubInst { + /// Returns the 'output_ref' output of this 'ScatterSub' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterSubInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterSub::new().build(ref_, indices, updates, scope)`. -pub fn scatter_sub< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_sub, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterSub::new().build(ref_, indices, updates, scope) } + /// Builder for the `ScatterUpdate` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ScatterUpdate { @@ -99718,6 +120022,12 @@ pub struct ScatterUpdate { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ScatterUpdate' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ScatterUpdateInst { + /// An instance of a fully built ScatterUpdate Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ScatterUpdate { /// Creates a new `ScatterUpdate`. @@ -99732,10 +120042,7 @@ impl ScatterUpdate { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -99753,27 +120060,10 @@ impl ScatterUpdate { } /// Builds the `ScatterUpdate` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(ref_.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - ref_: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ScatterUpdate", |nd| { nd.add_input(ref_); nd.add_input(indices); @@ -99781,38 +120071,75 @@ impl ScatterUpdate { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ScatterUpdate` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ScatterUpdate", |nd| { + nd.add_input(ref_); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ScatterUpdateInst{op}) + } +} +impl ScatterUpdateInst { + /// Returns the 'output_ref' output of this 'ScatterUpdate' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ScatterUpdateInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ScatterUpdate::new().build(ref_, indices, updates, scope)`. -pub fn scatter_update< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - ref_: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn scatter_update, O1: ::std::convert::Into, O2: ::std::convert::Into>(ref_: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { ScatterUpdate::new().build(ref_, indices, updates, scope) } + /// Builder for the `SdcaFprint` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SdcaFprint { control_inputs: ::std::vec::Vec, } +/// An instance of 'SdcaFprint' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SdcaFprintInst { + /// An instance of a fully built SdcaFprint Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SdcaFprint { /// Creates a new `SdcaFprint`. @@ -99827,19 +120154,10 @@ impl SdcaFprint { } /// Builds the `SdcaFprint` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SdcaFprint", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -99848,15 +120166,41 @@ impl SdcaFprint { ::std::result::Result::Ok(()) }) } -} + /// Builds the `SdcaFprint` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SdcaFprint", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(SdcaFprintInst{op}) + } +} +impl SdcaFprintInst { + /// Returns the 'output' output of this 'SdcaFprint' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SdcaFprintInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SdcaFprint::new().build(input, scope)`. -pub fn sdca_fprint>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sdca_fprint>(input: O0, scope: &mut crate::Scope) -> crate::Result { SdcaFprint::new().build(input, scope) } + /// Builder for the `SdcaOptimizer` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SdcaOptimizer { @@ -99871,6 +120215,12 @@ pub struct SdcaOptimizer { num_inner_iterations: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SdcaOptimizer' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SdcaOptimizerInst { + /// An instance of a fully built SdcaOptimizer Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SdcaOptimizer { /// Creates a new `SdcaOptimizer`. @@ -99879,10 +120229,7 @@ impl SdcaOptimizer { } /// Sets the `loss_type` attribute. - pub fn loss_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn loss_type>(mut self, value: ArgType) -> Self { self.loss_type = ::std::option::Option::Some(value.into()); self } @@ -99894,28 +120241,19 @@ impl SdcaOptimizer { } /// Sets the `num_sparse_features` attribute. - pub fn num_sparse_features>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_sparse_features>(mut self, value: ArgType) -> Self { self.num_sparse_features = ::std::option::Option::Some(value.into()); self } /// Sets the `num_sparse_features_with_values` attribute. - pub fn num_sparse_features_with_values>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_sparse_features_with_values>(mut self, value: ArgType) -> Self { self.num_sparse_features_with_values = ::std::option::Option::Some(value.into()); self } /// Sets the `num_dense_features` attribute. - pub fn num_dense_features>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_dense_features>(mut self, value: ArgType) -> Self { self.num_dense_features = ::std::option::Option::Some(value.into()); self } @@ -99933,19 +120271,13 @@ impl SdcaOptimizer { } /// Sets the `num_loss_partitions` attribute. - pub fn num_loss_partitions>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_loss_partitions>(mut self, value: ArgType) -> Self { self.num_loss_partitions = ::std::option::Option::Some(value.into()); self } /// Sets the `num_inner_iterations` attribute. - pub fn num_inner_iterations>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_inner_iterations>(mut self, value: ArgType) -> Self { self.num_inner_iterations = ::std::option::Option::Some(value.into()); self } @@ -99957,60 +120289,10 @@ impl SdcaOptimizer { } /// Builds the `SdcaOptimizer` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - sparse_example_indices: O0, - sparse_feature_indices: O1, - sparse_feature_values: O2, - dense_features: O3, - example_weights: O4, - example_labels: O5, - sparse_indices: O6, - sparse_weights: O7, - dense_weights: O8, - example_state_data: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sparse_example_indices.into(), - sparse_feature_indices.into(), - sparse_feature_values.into(), - dense_features.into(), - example_weights.into(), - example_labels.into(), - sparse_indices.into(), - sparse_weights.into(), - dense_weights.into(), - example_state_data.into(), - scope, - ) - } - - fn build_impl( - &self, - sparse_example_indices: crate::Output, - sparse_feature_indices: crate::Output, - sparse_feature_values: crate::Output, - dense_features: crate::Output, - example_weights: crate::Output, - example_labels: crate::Output, - sparse_indices: crate::Output, - sparse_weights: crate::Output, - dense_weights: crate::Output, - example_state_data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, sparse_example_indices: O0, sparse_feature_indices: O1, sparse_feature_values: O2, dense_features: O3, example_weights: O4, example_labels: O5, sparse_indices: O6, sparse_weights: O7, dense_weights: O8, example_state_data: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sparse_example_indices.into(), sparse_feature_indices.into(), sparse_feature_values.into(), dense_features.into(), example_weights.into(), example_labels.into(), sparse_indices.into(), sparse_weights.into(), dense_weights.into(), example_state_data.into(), scope) + } + fn build_impl(&self, sparse_example_indices: crate::Output, sparse_feature_indices: crate::Output, sparse_feature_values: crate::Output, dense_features: crate::Output, example_weights: crate::Output, example_labels: crate::Output, sparse_indices: crate::Output, sparse_weights: crate::Output, dense_weights: crate::Output, example_state_data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SdcaOptimizer", |nd| { nd.add_input(sparse_example_indices); nd.add_input(sparse_feature_indices); @@ -100025,77 +120307,131 @@ impl SdcaOptimizer { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.loss_type { - nd.set_attr_string("loss_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.adaptative { - nd.set_attr_bool("adaptative", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sparse_features { - nd.set_attr_int("num_sparse_features", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sparse_features_with_values { - nd.set_attr_int("num_sparse_features_with_values", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_dense_features { - nd.set_attr_int("num_dense_features", *value)?; - } - if let ::std::option::Option::Some(value) = &self.l1 { - nd.set_attr_float("l1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.l2 { - nd.set_attr_float("l2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_loss_partitions { - nd.set_attr_int("num_loss_partitions", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_inner_iterations { - nd.set_attr_int("num_inner_iterations", *value)?; + if let ::std::option::Option::Some(value) = &self.loss_type { + nd.set_attr_string("loss_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.adaptative { + nd.set_attr_bool("adaptative", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sparse_features { + nd.set_attr_int("num_sparse_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sparse_features_with_values { + nd.set_attr_int("num_sparse_features_with_values", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_dense_features { + nd.set_attr_int("num_dense_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l1 { + nd.set_attr_float("l1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l2 { + nd.set_attr_float("l2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_loss_partitions { + nd.set_attr_int("num_loss_partitions", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_inner_iterations { + nd.set_attr_int("num_inner_iterations", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `SdcaOptimizer` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, sparse_example_indices: O0, sparse_feature_indices: O1, sparse_feature_values: O2, dense_features: O3, example_weights: O4, example_labels: O5, sparse_indices: O6, sparse_weights: O7, dense_weights: O8, example_state_data: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_example_indices.into(), sparse_feature_indices.into(), sparse_feature_values.into(), dense_features.into(), example_weights.into(), example_labels.into(), sparse_indices.into(), sparse_weights.into(), dense_weights.into(), example_state_data.into(), scope) + } + fn build_instance_impl(&self, sparse_example_indices: crate::Output, sparse_feature_indices: crate::Output, sparse_feature_values: crate::Output, dense_features: crate::Output, example_weights: crate::Output, example_labels: crate::Output, sparse_indices: crate::Output, sparse_weights: crate::Output, dense_weights: crate::Output, example_state_data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SdcaOptimizer", |nd| { + nd.add_input(sparse_example_indices); + nd.add_input(sparse_feature_indices); + nd.add_input(sparse_feature_values); + nd.add_input(dense_features); + nd.add_input(example_weights); + nd.add_input(example_labels); + nd.add_input(sparse_indices); + nd.add_input(sparse_weights); + nd.add_input(dense_weights); + nd.add_input(example_state_data); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.loss_type { + nd.set_attr_string("loss_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.adaptative { + nd.set_attr_bool("adaptative", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sparse_features { + nd.set_attr_int("num_sparse_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sparse_features_with_values { + nd.set_attr_int("num_sparse_features_with_values", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_dense_features { + nd.set_attr_int("num_dense_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l1 { + nd.set_attr_float("l1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l2 { + nd.set_attr_float("l2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_loss_partitions { + nd.set_attr_int("num_loss_partitions", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_inner_iterations { + nd.set_attr_int("num_inner_iterations", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SdcaOptimizerInst{op}) + } +} +impl SdcaOptimizerInst { + /// Returns the 'out_example_state_data' output of this 'SdcaOptimizer' operation. + pub fn out_example_state_data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns a Vector of Outputs for 'out_delta_sparse_weights' output of this SdcaOptimizer operation. + pub fn out_delta_sparse_weights(&self) -> crate::Result>{ + let dynamic_offset = (1) as i32; + let mut Outputs = vec![]; + for i in 1..self.op.get_attr_int("num_sparse_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'out_delta_dense_weights' output of this SdcaOptimizer operation. + pub fn out_delta_dense_weights(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("num_sparse_features")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_dense_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for SdcaOptimizerInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `SdcaOptimizer::new().build(sparse_example_indices, sparse_feature_indices, sparse_feature_values, dense_features, example_weights, example_labels, sparse_indices, sparse_weights, dense_weights, example_state_data, scope)`. -pub fn sdca_optimizer< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - sparse_example_indices: O0, - sparse_feature_indices: O1, - sparse_feature_values: O2, - dense_features: O3, - example_weights: O4, - example_labels: O5, - sparse_indices: O6, - sparse_weights: O7, - dense_weights: O8, - example_state_data: O9, - scope: &mut crate::Scope, -) -> crate::Result { - SdcaOptimizer::new().build( - sparse_example_indices, - sparse_feature_indices, - sparse_feature_values, - dense_features, - example_weights, - example_labels, - sparse_indices, - sparse_weights, - dense_weights, - example_state_data, - scope, - ) +pub fn sdca_optimizer, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(sparse_example_indices: O0, sparse_feature_indices: O1, sparse_feature_values: O2, dense_features: O3, example_weights: O4, example_labels: O5, sparse_indices: O6, sparse_weights: O7, dense_weights: O8, example_state_data: O9, scope: &mut crate::Scope) -> crate::Result { + SdcaOptimizer::new().build(sparse_example_indices, sparse_feature_indices, sparse_feature_values, dense_features, example_weights, example_labels, sparse_indices, sparse_weights, dense_weights, example_state_data, scope) } + /// Builder for the `SdcaOptimizerV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SdcaOptimizerV2 { @@ -100110,6 +120446,12 @@ pub struct SdcaOptimizerV2 { num_inner_iterations: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SdcaOptimizerV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SdcaOptimizerV2Inst { + /// An instance of a fully built SdcaOptimizerV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SdcaOptimizerV2 { /// Creates a new `SdcaOptimizerV2`. @@ -100118,10 +120460,7 @@ impl SdcaOptimizerV2 { } /// Sets the `loss_type` attribute. - pub fn loss_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn loss_type>(mut self, value: ArgType) -> Self { self.loss_type = ::std::option::Option::Some(value.into()); self } @@ -100133,28 +120472,19 @@ impl SdcaOptimizerV2 { } /// Sets the `num_sparse_features` attribute. - pub fn num_sparse_features>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_sparse_features>(mut self, value: ArgType) -> Self { self.num_sparse_features = ::std::option::Option::Some(value.into()); self } /// Sets the `num_sparse_features_with_values` attribute. - pub fn num_sparse_features_with_values>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_sparse_features_with_values>(mut self, value: ArgType) -> Self { self.num_sparse_features_with_values = ::std::option::Option::Some(value.into()); self } /// Sets the `num_dense_features` attribute. - pub fn num_dense_features>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_dense_features>(mut self, value: ArgType) -> Self { self.num_dense_features = ::std::option::Option::Some(value.into()); self } @@ -100172,19 +120502,13 @@ impl SdcaOptimizerV2 { } /// Sets the `num_loss_partitions` attribute. - pub fn num_loss_partitions>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_loss_partitions>(mut self, value: ArgType) -> Self { self.num_loss_partitions = ::std::option::Option::Some(value.into()); self } /// Sets the `num_inner_iterations` attribute. - pub fn num_inner_iterations>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_inner_iterations>(mut self, value: ArgType) -> Self { self.num_inner_iterations = ::std::option::Option::Some(value.into()); self } @@ -100196,60 +120520,10 @@ impl SdcaOptimizerV2 { } /// Builds the `SdcaOptimizerV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - sparse_example_indices: O0, - sparse_feature_indices: O1, - sparse_feature_values: O2, - dense_features: O3, - example_weights: O4, - example_labels: O5, - sparse_indices: O6, - sparse_weights: O7, - dense_weights: O8, - example_state_data: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sparse_example_indices.into(), - sparse_feature_indices.into(), - sparse_feature_values.into(), - dense_features.into(), - example_weights.into(), - example_labels.into(), - sparse_indices.into(), - sparse_weights.into(), - dense_weights.into(), - example_state_data.into(), - scope, - ) - } - - fn build_impl( - &self, - sparse_example_indices: crate::Output, - sparse_feature_indices: crate::Output, - sparse_feature_values: crate::Output, - dense_features: crate::Output, - example_weights: crate::Output, - example_labels: crate::Output, - sparse_indices: crate::Output, - sparse_weights: crate::Output, - dense_weights: crate::Output, - example_state_data: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, sparse_example_indices: O0, sparse_feature_indices: O1, sparse_feature_values: O2, dense_features: O3, example_weights: O4, example_labels: O5, sparse_indices: O6, sparse_weights: O7, dense_weights: O8, example_state_data: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sparse_example_indices.into(), sparse_feature_indices.into(), sparse_feature_values.into(), dense_features.into(), example_weights.into(), example_labels.into(), sparse_indices.into(), sparse_weights.into(), dense_weights.into(), example_state_data.into(), scope) + } + fn build_impl(&self, sparse_example_indices: crate::Output, sparse_feature_indices: crate::Output, sparse_feature_values: crate::Output, dense_features: crate::Output, example_weights: crate::Output, example_labels: crate::Output, sparse_indices: crate::Output, sparse_weights: crate::Output, dense_weights: crate::Output, example_state_data: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SdcaOptimizerV2", |nd| { nd.add_input(sparse_example_indices); nd.add_input(sparse_feature_indices); @@ -100264,77 +120538,131 @@ impl SdcaOptimizerV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.loss_type { - nd.set_attr_string("loss_type", value)?; - } - if let ::std::option::Option::Some(value) = &self.adaptive { - nd.set_attr_bool("adaptive", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sparse_features { - nd.set_attr_int("num_sparse_features", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sparse_features_with_values { - nd.set_attr_int("num_sparse_features_with_values", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_dense_features { - nd.set_attr_int("num_dense_features", *value)?; - } - if let ::std::option::Option::Some(value) = &self.l1 { - nd.set_attr_float("l1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.l2 { - nd.set_attr_float("l2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_loss_partitions { - nd.set_attr_int("num_loss_partitions", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_inner_iterations { - nd.set_attr_int("num_inner_iterations", *value)?; + if let ::std::option::Option::Some(value) = &self.loss_type { + nd.set_attr_string("loss_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.adaptive { + nd.set_attr_bool("adaptive", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sparse_features { + nd.set_attr_int("num_sparse_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sparse_features_with_values { + nd.set_attr_int("num_sparse_features_with_values", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_dense_features { + nd.set_attr_int("num_dense_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l1 { + nd.set_attr_float("l1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l2 { + nd.set_attr_float("l2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_loss_partitions { + nd.set_attr_int("num_loss_partitions", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_inner_iterations { + nd.set_attr_int("num_inner_iterations", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `SdcaOptimizerV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, sparse_example_indices: O0, sparse_feature_indices: O1, sparse_feature_values: O2, dense_features: O3, example_weights: O4, example_labels: O5, sparse_indices: O6, sparse_weights: O7, dense_weights: O8, example_state_data: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_example_indices.into(), sparse_feature_indices.into(), sparse_feature_values.into(), dense_features.into(), example_weights.into(), example_labels.into(), sparse_indices.into(), sparse_weights.into(), dense_weights.into(), example_state_data.into(), scope) + } + fn build_instance_impl(&self, sparse_example_indices: crate::Output, sparse_feature_indices: crate::Output, sparse_feature_values: crate::Output, dense_features: crate::Output, example_weights: crate::Output, example_labels: crate::Output, sparse_indices: crate::Output, sparse_weights: crate::Output, dense_weights: crate::Output, example_state_data: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SdcaOptimizerV2", |nd| { + nd.add_input(sparse_example_indices); + nd.add_input(sparse_feature_indices); + nd.add_input(sparse_feature_values); + nd.add_input(dense_features); + nd.add_input(example_weights); + nd.add_input(example_labels); + nd.add_input(sparse_indices); + nd.add_input(sparse_weights); + nd.add_input(dense_weights); + nd.add_input(example_state_data); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.loss_type { + nd.set_attr_string("loss_type", value)?; + } + if let ::std::option::Option::Some(value) = &self.adaptive { + nd.set_attr_bool("adaptive", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sparse_features { + nd.set_attr_int("num_sparse_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sparse_features_with_values { + nd.set_attr_int("num_sparse_features_with_values", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_dense_features { + nd.set_attr_int("num_dense_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l1 { + nd.set_attr_float("l1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l2 { + nd.set_attr_float("l2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_loss_partitions { + nd.set_attr_int("num_loss_partitions", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_inner_iterations { + nd.set_attr_int("num_inner_iterations", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SdcaOptimizerV2Inst{op}) + } +} +impl SdcaOptimizerV2Inst { + /// Returns the 'out_example_state_data' output of this 'SdcaOptimizerV2' operation. + pub fn out_example_state_data(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns a Vector of Outputs for 'out_delta_sparse_weights' output of this SdcaOptimizerV2 operation. + pub fn out_delta_sparse_weights(&self) -> crate::Result>{ + let dynamic_offset = (1) as i32; + let mut Outputs = vec![]; + for i in 1..self.op.get_attr_int("num_sparse_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'out_delta_dense_weights' output of this SdcaOptimizerV2 operation. + pub fn out_delta_dense_weights(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("num_sparse_features")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_dense_features")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for SdcaOptimizerV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `SdcaOptimizerV2::new().build(sparse_example_indices, sparse_feature_indices, sparse_feature_values, dense_features, example_weights, example_labels, sparse_indices, sparse_weights, dense_weights, example_state_data, scope)`. -pub fn sdca_optimizer_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - sparse_example_indices: O0, - sparse_feature_indices: O1, - sparse_feature_values: O2, - dense_features: O3, - example_weights: O4, - example_labels: O5, - sparse_indices: O6, - sparse_weights: O7, - dense_weights: O8, - example_state_data: O9, - scope: &mut crate::Scope, -) -> crate::Result { - SdcaOptimizerV2::new().build( - sparse_example_indices, - sparse_feature_indices, - sparse_feature_values, - dense_features, - example_weights, - example_labels, - sparse_indices, - sparse_weights, - dense_weights, - example_state_data, - scope, - ) +pub fn sdca_optimizer_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(sparse_example_indices: O0, sparse_feature_indices: O1, sparse_feature_values: O2, dense_features: O3, example_weights: O4, example_labels: O5, sparse_indices: O6, sparse_weights: O7, dense_weights: O8, example_state_data: O9, scope: &mut crate::Scope) -> crate::Result { + SdcaOptimizerV2::new().build(sparse_example_indices, sparse_feature_indices, sparse_feature_values, dense_features, example_weights, example_labels, sparse_indices, sparse_weights, dense_weights, example_state_data, scope) } + /// Builder for the `SdcaShrinkL1` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SdcaShrinkL1 { @@ -100343,6 +120671,12 @@ pub struct SdcaShrinkL1 { l2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SdcaShrinkL1' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SdcaShrinkL1Inst { + /// An instance of a fully built SdcaShrinkL1 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SdcaShrinkL1 { /// Creates a new `SdcaShrinkL1`. @@ -100375,45 +120709,64 @@ impl SdcaShrinkL1 { } /// Builds the `SdcaShrinkL1` operation. - pub fn build>( - &self, - weights: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, weights: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(weights.into(), scope) } - - fn build_impl( - &self, - weights: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SdcaShrinkL1", |nd| { nd.add_input(weights); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_features { - nd.set_attr_int("num_features", *value)?; - } - if let ::std::option::Option::Some(value) = &self.l1 { - nd.set_attr_float("l1", *value)?; - } - if let ::std::option::Option::Some(value) = &self.l2 { - nd.set_attr_float("l2", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l1 { + nd.set_attr_float("l1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l2 { + nd.set_attr_float("l2", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SdcaShrinkL1` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, weights: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(weights.into(), scope) + } + fn build_instance_impl(&self, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SdcaShrinkL1", |nd| { + nd.add_input(weights); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_features { + nd.set_attr_int("num_features", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l1 { + nd.set_attr_float("l1", *value)?; + } + if let ::std::option::Option::Some(value) = &self.l2 { + nd.set_attr_float("l2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SdcaShrinkL1Inst{op}) + } +} +impl SdcaShrinkL1Inst { +} +impl Into for SdcaShrinkL1Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SdcaShrinkL1::new().build(weights, scope)`. -pub fn sdca_shrink_l1>( - weights: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sdca_shrink_l1>(weights: O0, scope: &mut crate::Scope) -> crate::Result { SdcaShrinkL1::new().build(weights, scope) } + /// Builder for the `SegmentMax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SegmentMax { @@ -100421,6 +120774,12 @@ pub struct SegmentMax { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SegmentMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SegmentMaxInst { + /// An instance of a fully built SegmentMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SegmentMax { /// Creates a new `SegmentMax`. @@ -100435,10 +120794,7 @@ impl SegmentMax { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -100450,52 +120806,67 @@ impl SegmentMax { } /// Builds the `SegmentMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - data: O0, - segment_ids: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), segment_ids.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - segment_ids: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SegmentMax", |nd| { nd.add_input(data); nd.add_input(segment_ids); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SegmentMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), segment_ids.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SegmentMax", |nd| { + nd.add_input(data); + nd.add_input(segment_ids); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SegmentMaxInst{op}) + } +} +impl SegmentMaxInst { + /// Returns the 'output' output of this 'SegmentMax' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SegmentMaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SegmentMax::new().build(data, segment_ids, scope)`. -pub fn segment_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - data: O0, - segment_ids: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn segment_max, O1: ::std::convert::Into>(data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { SegmentMax::new().build(data, segment_ids, scope) } + /// Builder for the `SegmentMean` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SegmentMean { @@ -100503,6 +120874,12 @@ pub struct SegmentMean { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SegmentMean' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SegmentMeanInst { + /// An instance of a fully built SegmentMean Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SegmentMean { /// Creates a new `SegmentMean`. @@ -100517,10 +120894,7 @@ impl SegmentMean { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -100532,52 +120906,67 @@ impl SegmentMean { } /// Builds the `SegmentMean` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - data: O0, - segment_ids: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), segment_ids.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - segment_ids: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SegmentMean", |nd| { nd.add_input(data); nd.add_input(segment_ids); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SegmentMean` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), segment_ids.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SegmentMean", |nd| { + nd.add_input(data); + nd.add_input(segment_ids); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SegmentMeanInst{op}) + } +} +impl SegmentMeanInst { + /// Returns the 'output' output of this 'SegmentMean' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SegmentMeanInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SegmentMean::new().build(data, segment_ids, scope)`. -pub fn segment_mean< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - data: O0, - segment_ids: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn segment_mean, O1: ::std::convert::Into>(data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { SegmentMean::new().build(data, segment_ids, scope) } + /// Builder for the `SegmentMin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SegmentMin { @@ -100585,6 +120974,12 @@ pub struct SegmentMin { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SegmentMin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SegmentMinInst { + /// An instance of a fully built SegmentMin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SegmentMin { /// Creates a new `SegmentMin`. @@ -100599,10 +120994,7 @@ impl SegmentMin { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -100614,52 +121006,67 @@ impl SegmentMin { } /// Builds the `SegmentMin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - data: O0, - segment_ids: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), segment_ids.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - segment_ids: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SegmentMin", |nd| { nd.add_input(data); nd.add_input(segment_ids); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SegmentMin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), segment_ids.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SegmentMin", |nd| { + nd.add_input(data); + nd.add_input(segment_ids); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SegmentMinInst{op}) + } +} +impl SegmentMinInst { + /// Returns the 'output' output of this 'SegmentMin' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SegmentMinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SegmentMin::new().build(data, segment_ids, scope)`. -pub fn segment_min< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - data: O0, - segment_ids: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn segment_min, O1: ::std::convert::Into>(data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { SegmentMin::new().build(data, segment_ids, scope) } + /// Builder for the `SegmentProd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SegmentProd { @@ -100667,6 +121074,12 @@ pub struct SegmentProd { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SegmentProd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SegmentProdInst { + /// An instance of a fully built SegmentProd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SegmentProd { /// Creates a new `SegmentProd`. @@ -100681,10 +121094,7 @@ impl SegmentProd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -100696,52 +121106,67 @@ impl SegmentProd { } /// Builds the `SegmentProd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - data: O0, - segment_ids: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), segment_ids.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - segment_ids: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SegmentProd", |nd| { nd.add_input(data); nd.add_input(segment_ids); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SegmentProd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), segment_ids.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SegmentProd", |nd| { + nd.add_input(data); + nd.add_input(segment_ids); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SegmentProdInst{op}) + } +} +impl SegmentProdInst { + /// Returns the 'output' output of this 'SegmentProd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SegmentProdInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SegmentProd::new().build(data, segment_ids, scope)`. -pub fn segment_prod< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - data: O0, - segment_ids: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn segment_prod, O1: ::std::convert::Into>(data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { SegmentProd::new().build(data, segment_ids, scope) } + /// Builder for the `SegmentSum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SegmentSum { @@ -100749,6 +121174,12 @@ pub struct SegmentSum { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SegmentSum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SegmentSumInst { + /// An instance of a fully built SegmentSum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SegmentSum { /// Creates a new `SegmentSum`. @@ -100763,10 +121194,7 @@ impl SegmentSum { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -100778,58 +121206,79 @@ impl SegmentSum { } /// Builds the `SegmentSum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - data: O0, - segment_ids: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), segment_ids.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - segment_ids: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SegmentSum", |nd| { nd.add_input(data); nd.add_input(segment_ids); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SegmentSum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), segment_ids.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SegmentSum", |nd| { + nd.add_input(data); + nd.add_input(segment_ids); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SegmentSumInst{op}) + } +} +impl SegmentSumInst { + /// Returns the 'output' output of this 'SegmentSum' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SegmentSumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SegmentSum::new().build(data, segment_ids, scope)`. -pub fn segment_sum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - data: O0, - segment_ids: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn segment_sum, O1: ::std::convert::Into>(data: O0, segment_ids: O1, scope: &mut crate::Scope) -> crate::Result { SegmentSum::new().build(data, segment_ids, scope) } + /// Builder for the `Select` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Select { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Select' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SelectInst { + /// An instance of a fully built Select Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Select { /// Creates a new `Select`. @@ -100850,27 +121299,10 @@ impl Select { } /// Builds the `Select` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - condition: O0, - t: O1, - e: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, condition: O0, t: O1, e: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(condition.into(), t.into(), e.into(), scope) } - - fn build_impl( - &self, - condition: crate::Output, - t: crate::Output, - e: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, condition: crate::Output, t: crate::Output, e: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Select", |nd| { nd.add_input(condition); nd.add_input(t); @@ -100878,33 +121310,64 @@ impl Select { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Select` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, condition: O0, t: O1, e: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(condition.into(), t.into(), e.into(), scope) + } + fn build_instance_impl(&self, condition: crate::Output, t: crate::Output, e: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Select", |nd| { + nd.add_input(condition); + nd.add_input(t); + nd.add_input(e); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SelectInst{op}) + } +} +impl SelectInst { + /// Returns the 'output' output of this 'Select' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SelectInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Select::new().build(condition, t, e, scope)`. -pub fn select< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - condition: O0, - t: O1, - e: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn select, O1: ::std::convert::Into, O2: ::std::convert::Into>(condition: O0, t: O1, e: O2, scope: &mut crate::Scope) -> crate::Result { Select::new().build(condition, t, e, scope) } + /// Builder for the `SelectV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SelectV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SelectV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SelectV2Inst { + /// An instance of a fully built SelectV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SelectV2 { /// Creates a new `SelectV2`. @@ -100925,27 +121388,10 @@ impl SelectV2 { } /// Builds the `SelectV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - condition: O0, - t: O1, - e: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, condition: O0, t: O1, e: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(condition.into(), t.into(), e.into(), scope) } - - fn build_impl( - &self, - condition: crate::Output, - t: crate::Output, - e: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, condition: crate::Output, t: crate::Output, e: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SelectV2", |nd| { nd.add_input(condition); nd.add_input(t); @@ -100953,33 +121399,64 @@ impl SelectV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SelectV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, condition: O0, t: O1, e: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(condition.into(), t.into(), e.into(), scope) + } + fn build_instance_impl(&self, condition: crate::Output, t: crate::Output, e: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SelectV2", |nd| { + nd.add_input(condition); + nd.add_input(t); + nd.add_input(e); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SelectV2Inst{op}) + } +} +impl SelectV2Inst { + /// Returns the 'output' output of this 'SelectV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SelectV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SelectV2::new().build(condition, t, e, scope)`. -pub fn select_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - condition: O0, - t: O1, - e: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn select_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(condition: O0, t: O1, e: O2, scope: &mut crate::Scope) -> crate::Result { SelectV2::new().build(condition, t, e, scope) } + /// Builder for the `SelfAdjointEig` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SelfAdjointEig { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SelfAdjointEig' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SelfAdjointEigInst { + /// An instance of a fully built SelfAdjointEig Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SelfAdjointEig { /// Creates a new `SelfAdjointEig`. @@ -101000,39 +121477,59 @@ impl SelfAdjointEig { } /// Builds the `SelfAdjointEig` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SelfAdjointEig", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SelfAdjointEig` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SelfAdjointEig", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SelfAdjointEigInst{op}) + } +} +impl SelfAdjointEigInst { + /// Returns the 'output' output of this 'SelfAdjointEig' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SelfAdjointEigInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SelfAdjointEig::new().build(input, scope)`. -pub fn self_adjoint_eig>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn self_adjoint_eig>(input: O0, scope: &mut crate::Scope) -> crate::Result { SelfAdjointEig::new().build(input, scope) } + /// Builder for the `SelfAdjointEigV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SelfAdjointEigV2 { @@ -101040,6 +121537,12 @@ pub struct SelfAdjointEigV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SelfAdjointEigV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SelfAdjointEigV2Inst { + /// An instance of a fully built SelfAdjointEigV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SelfAdjointEigV2 { /// Creates a new `SelfAdjointEigV2`. @@ -101066,48 +121569,84 @@ impl SelfAdjointEigV2 { } /// Builds the `SelfAdjointEigV2` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SelfAdjointEigV2", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.compute_v { - nd.set_attr_bool("compute_v", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.compute_v { + nd.set_attr_bool("compute_v", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SelfAdjointEigV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SelfAdjointEigV2", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.compute_v { + nd.set_attr_bool("compute_v", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SelfAdjointEigV2Inst{op}) + } +} +impl SelfAdjointEigV2Inst { + /// Returns the 'e' output of this 'SelfAdjointEigV2' operation. + pub fn e(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'v' output of this 'SelfAdjointEigV2' operation. + pub fn v(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for SelfAdjointEigV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SelfAdjointEigV2::new().build(input, scope)`. -pub fn self_adjoint_eig_v2>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn self_adjoint_eig_v2>(input: O0, scope: &mut crate::Scope) -> crate::Result { SelfAdjointEigV2::new().build(input, scope) } + /// Builder for the `Selu` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Selu { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Selu' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SeluInst { + /// An instance of a fully built Selu Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Selu { /// Creates a new `Selu`. @@ -101128,45 +121667,71 @@ impl Selu { } /// Builds the `Selu` operation. - pub fn build>( - &self, - features: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(features.into(), scope) } - - fn build_impl( - &self, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Selu", |nd| { nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Selu` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Selu", |nd| { + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SeluInst{op}) + } +} +impl SeluInst { + /// Returns the 'activations' output of this 'Selu' operation. + pub fn activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SeluInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Selu::new().build(features, scope)`. -pub fn selu>( - features: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn selu>(features: O0, scope: &mut crate::Scope) -> crate::Result { Selu::new().build(features, scope) } + /// Builder for the `SeluGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SeluGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SeluGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SeluGradInst { + /// An instance of a fully built SeluGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SeluGrad { /// Creates a new `SeluGrad`. @@ -101187,49 +121752,61 @@ impl SeluGrad { } /// Builds the `SeluGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - gradients: O0, - outputs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, gradients: O0, outputs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(gradients.into(), outputs.into(), scope) } - - fn build_impl( - &self, - gradients: crate::Output, - outputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, gradients: crate::Output, outputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SeluGrad", |nd| { nd.add_input(gradients); nd.add_input(outputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SeluGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, gradients: O0, outputs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), outputs.into(), scope) + } + fn build_instance_impl(&self, gradients: crate::Output, outputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SeluGrad", |nd| { + nd.add_input(gradients); + nd.add_input(outputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SeluGradInst{op}) + } +} +impl SeluGradInst { + /// Returns the 'backprops' output of this 'SeluGrad' operation. + pub fn backprops(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SeluGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SeluGrad::new().build(gradients, outputs, scope)`. -pub fn selu_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - gradients: O0, - outputs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn selu_grad, O1: ::std::convert::Into>(gradients: O0, outputs: O1, scope: &mut crate::Scope) -> crate::Result { SeluGrad::new().build(gradients, outputs, scope) } + /// Builder for the `Send` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Send { @@ -101241,6 +121818,12 @@ pub struct Send { client_terminated: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Send' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SendInst { + /// An instance of a fully built Send Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Send { /// Creates a new `Send`. @@ -101255,46 +121838,31 @@ impl Send { } /// Sets the `tensor_name` attribute. - pub fn tensor_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_name>(mut self, value: ArgType) -> Self { self.tensor_name = ::std::option::Option::Some(value.into()); self } /// Sets the `send_device` attribute. - pub fn send_device>( - mut self, - value: ArgType, - ) -> Self { + pub fn send_device>(mut self, value: ArgType) -> Self { self.send_device = ::std::option::Option::Some(value.into()); self } /// Sets the `send_device_incarnation` attribute. - pub fn send_device_incarnation>( - mut self, - value: ArgType, - ) -> Self { + pub fn send_device_incarnation>(mut self, value: ArgType) -> Self { self.send_device_incarnation = ::std::option::Option::Some(value.into()); self } /// Sets the `recv_device` attribute. - pub fn recv_device>( - mut self, - value: ArgType, - ) -> Self { + pub fn recv_device>(mut self, value: ArgType) -> Self { self.recv_device = ::std::option::Option::Some(value.into()); self } /// Sets the `client_terminated` attribute. - pub fn client_terminated>( - mut self, - value: ArgType, - ) -> Self { + pub fn client_terminated>(mut self, value: ArgType) -> Self { self.client_terminated = ::std::option::Option::Some(value.into()); self } @@ -101306,54 +121874,82 @@ impl Send { } /// Builds the `Send` operation. - pub fn build>( - &self, - tensor: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, tensor: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Send", |nd| { nd.add_input(tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_name { - nd.set_attr_string("tensor_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.send_device { - nd.set_attr_string("send_device", value)?; - } - if let ::std::option::Option::Some(value) = &self.send_device_incarnation { - nd.set_attr_int("send_device_incarnation", *value)?; - } - if let ::std::option::Option::Some(value) = &self.recv_device { - nd.set_attr_string("recv_device", value)?; - } - if let ::std::option::Option::Some(value) = &self.client_terminated { - nd.set_attr_bool("client_terminated", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.send_device { + nd.set_attr_string("send_device", value)?; + } + if let ::std::option::Option::Some(value) = &self.send_device_incarnation { + nd.set_attr_int("send_device_incarnation", *value)?; + } + if let ::std::option::Option::Some(value) = &self.recv_device { + nd.set_attr_string("recv_device", value)?; + } + if let ::std::option::Option::Some(value) = &self.client_terminated { + nd.set_attr_bool("client_terminated", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Send` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, tensor: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Send", |nd| { + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_name { + nd.set_attr_string("tensor_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.send_device { + nd.set_attr_string("send_device", value)?; + } + if let ::std::option::Option::Some(value) = &self.send_device_incarnation { + nd.set_attr_int("send_device_incarnation", *value)?; + } + if let ::std::option::Option::Some(value) = &self.recv_device { + nd.set_attr_string("recv_device", value)?; + } + if let ::std::option::Option::Some(value) = &self.client_terminated { + nd.set_attr_bool("client_terminated", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SendInst{op}) + } +} +impl SendInst { +} +impl Into for SendInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Send::new().build(tensor, scope)`. -pub fn send>( - tensor: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn send>(tensor: O0, scope: &mut crate::Scope) -> crate::Result { Send::new().build(tensor, scope) } + /// Builder for the `SendTPUEmbeddingGradients` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SendTPUEmbeddingGradients { @@ -101362,6 +121958,12 @@ pub struct SendTPUEmbeddingGradients { config: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SendTPUEmbeddingGradients' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SendTPUEmbeddingGradientsInst { + /// An instance of a fully built SendTPUEmbeddingGradients Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SendTPUEmbeddingGradients { /// Creates a new `SendTPUEmbeddingGradients`. @@ -101382,10 +121984,7 @@ impl SendTPUEmbeddingGradients { } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } @@ -101397,61 +121996,78 @@ impl SendTPUEmbeddingGradients { } /// Builds the `SendTPUEmbeddingGradients` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - inputs: O0, - learning_rates: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, inputs: O0, learning_rates: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), learning_rates.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - learning_rates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, learning_rates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SendTPUEmbeddingGradients", |nd| { nd.add_input(inputs); nd.add_input(learning_rates); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.NN { - nd.set_attr_int("NN", *value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.NN { + nd.set_attr_int("NN", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SendTPUEmbeddingGradients` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, inputs: O0, learning_rates: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), learning_rates.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, learning_rates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SendTPUEmbeddingGradients", |nd| { + nd.add_input(inputs); + nd.add_input(learning_rates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.NN { + nd.set_attr_int("NN", *value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SendTPUEmbeddingGradientsInst{op}) + } +} +impl SendTPUEmbeddingGradientsInst { +} +impl Into for SendTPUEmbeddingGradientsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SendTPUEmbeddingGradients::new().build(inputs, learning_rates, scope)`. -pub fn send_tpuembedding_gradients< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - inputs: O0, - learning_rates: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn send_tpuembedding_gradients, O1: ::std::convert::Into>(inputs: O0, learning_rates: O1, scope: &mut crate::Scope) -> crate::Result { SendTPUEmbeddingGradients::new().build(inputs, learning_rates, scope) } + /// Builder for the `SerializeIterator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SerializeIterator { external_state_policy: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SerializeIterator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SerializeIteratorInst { + /// An instance of a fully built SerializeIterator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SerializeIterator { /// Creates a new `SerializeIterator`. @@ -101460,10 +122076,7 @@ impl SerializeIterator { } /// Sets the `external_state_policy` attribute. - pub fn external_state_policy>( - mut self, - value: ArgType, - ) -> Self { + pub fn external_state_policy>(mut self, value: ArgType) -> Self { self.external_state_policy = ::std::option::Option::Some(value.into()); self } @@ -101475,39 +122088,59 @@ impl SerializeIterator { } /// Builds the `SerializeIterator` operation. - pub fn build>( - &self, - resource_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource_handle.into(), scope) } - - fn build_impl( - &self, - resource_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SerializeIterator", |nd| { nd.add_input(resource_handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.external_state_policy { - nd.set_attr_int("external_state_policy", *value)?; - } + if let ::std::option::Option::Some(value) = &self.external_state_policy { + nd.set_attr_int("external_state_policy", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SerializeIterator` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource_handle.into(), scope) + } + fn build_instance_impl(&self, resource_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SerializeIterator", |nd| { + nd.add_input(resource_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.external_state_policy { + nd.set_attr_int("external_state_policy", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SerializeIteratorInst{op}) + } +} +impl SerializeIteratorInst { + /// Returns the 'serialized' output of this 'SerializeIterator' operation. + pub fn serialized(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SerializeIteratorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SerializeIterator::new().build(resource_handle, scope)`. -pub fn serialize_iterator>( - resource_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn serialize_iterator>(resource_handle: O0, scope: &mut crate::Scope) -> crate::Result { SerializeIterator::new().build(resource_handle, scope) } + /// Builder for the `SerializeManySparse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SerializeManySparse { @@ -101515,6 +122148,12 @@ pub struct SerializeManySparse { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SerializeManySparse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SerializeManySparseInst { + /// An instance of a fully built SerializeManySparse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SerializeManySparse { /// Creates a new `SerializeManySparse`. @@ -101529,10 +122168,7 @@ impl SerializeManySparse { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -101544,32 +122180,10 @@ impl SerializeManySparse { } /// Builds the `SerializeManySparse` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - sparse_indices: O0, - sparse_values: O1, - sparse_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sparse_indices.into(), - sparse_values.into(), - sparse_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - sparse_indices: crate::Output, - sparse_values: crate::Output, - sparse_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sparse_indices.into(), sparse_values.into(), sparse_shape.into(), scope) + } + fn build_impl(&self, sparse_indices: crate::Output, sparse_values: crate::Output, sparse_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SerializeManySparse", |nd| { nd.add_input(sparse_indices); nd.add_input(sparse_values); @@ -101577,30 +122191,58 @@ impl SerializeManySparse { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SerializeManySparse` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_indices.into(), sparse_values.into(), sparse_shape.into(), scope) + } + fn build_instance_impl(&self, sparse_indices: crate::Output, sparse_values: crate::Output, sparse_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SerializeManySparse", |nd| { + nd.add_input(sparse_indices); + nd.add_input(sparse_values); + nd.add_input(sparse_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SerializeManySparseInst{op}) + } +} +impl SerializeManySparseInst { + /// Returns the 'serialized_sparse' output of this 'SerializeManySparse' operation. + pub fn serialized_sparse(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SerializeManySparseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SerializeManySparse::new().build(sparse_indices, sparse_values, sparse_shape, scope)`. -pub fn serialize_many_sparse< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - sparse_indices: O0, - sparse_values: O1, - sparse_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn serialize_many_sparse, O1: ::std::convert::Into, O2: ::std::convert::Into>(sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { SerializeManySparse::new().build(sparse_indices, sparse_values, sparse_shape, scope) } + /// Builder for the `SerializeSparse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SerializeSparse { @@ -101608,6 +122250,12 @@ pub struct SerializeSparse { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SerializeSparse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SerializeSparseInst { + /// An instance of a fully built SerializeSparse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SerializeSparse { /// Creates a new `SerializeSparse`. @@ -101622,10 +122270,7 @@ impl SerializeSparse { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -101637,32 +122282,10 @@ impl SerializeSparse { } /// Builds the `SerializeSparse` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - sparse_indices: O0, - sparse_values: O1, - sparse_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sparse_indices.into(), - sparse_values.into(), - sparse_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - sparse_indices: crate::Output, - sparse_values: crate::Output, - sparse_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sparse_indices.into(), sparse_values.into(), sparse_shape.into(), scope) + } + fn build_impl(&self, sparse_indices: crate::Output, sparse_values: crate::Output, sparse_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SerializeSparse", |nd| { nd.add_input(sparse_indices); nd.add_input(sparse_values); @@ -101670,36 +122293,70 @@ impl SerializeSparse { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SerializeSparse` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_indices.into(), sparse_values.into(), sparse_shape.into(), scope) + } + fn build_instance_impl(&self, sparse_indices: crate::Output, sparse_values: crate::Output, sparse_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SerializeSparse", |nd| { + nd.add_input(sparse_indices); + nd.add_input(sparse_values); + nd.add_input(sparse_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SerializeSparseInst{op}) + } +} +impl SerializeSparseInst { + /// Returns the 'serialized_sparse' output of this 'SerializeSparse' operation. + pub fn serialized_sparse(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SerializeSparseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SerializeSparse::new().build(sparse_indices, sparse_values, sparse_shape, scope)`. -pub fn serialize_sparse< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - sparse_indices: O0, - sparse_values: O1, - sparse_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn serialize_sparse, O1: ::std::convert::Into, O2: ::std::convert::Into>(sparse_indices: O0, sparse_values: O1, sparse_shape: O2, scope: &mut crate::Scope) -> crate::Result { SerializeSparse::new().build(sparse_indices, sparse_values, sparse_shape, scope) } + /// Builder for the `SerializeTensor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SerializeTensor { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SerializeTensor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SerializeTensorInst { + /// An instance of a fully built SerializeTensor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SerializeTensor { /// Creates a new `SerializeTensor`. @@ -101720,39 +122377,59 @@ impl SerializeTensor { } /// Builds the `SerializeTensor` operation. - pub fn build>( - &self, - tensor: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, tensor: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SerializeTensor", |nd| { nd.add_input(tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SerializeTensor` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, tensor: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SerializeTensor", |nd| { + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SerializeTensorInst{op}) + } +} +impl SerializeTensorInst { + /// Returns the 'serialized' output of this 'SerializeTensor' operation. + pub fn serialized(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SerializeTensorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SerializeTensor::new().build(tensor, scope)`. -pub fn serialize_tensor>( - tensor: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn serialize_tensor>(tensor: O0, scope: &mut crate::Scope) -> crate::Result { SerializeTensor::new().build(tensor, scope) } + /// Builder for the `SetSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SetSize { @@ -101760,6 +122437,12 @@ pub struct SetSize { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SetSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SetSizeInst { + /// An instance of a fully built SetSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SetSize { /// Creates a new `SetSize`. @@ -101786,32 +122469,10 @@ impl SetSize { } /// Builds the `SetSize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - set_indices: O0, - set_values: O1, - set_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - set_indices.into(), - set_values.into(), - set_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - set_indices: crate::Output, - set_values: crate::Output, - set_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, set_indices: O0, set_values: O1, set_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(set_indices.into(), set_values.into(), set_shape.into(), scope) + } + fn build_impl(&self, set_indices: crate::Output, set_values: crate::Output, set_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SetSize", |nd| { nd.add_input(set_indices); nd.add_input(set_values); @@ -101819,30 +122480,58 @@ impl SetSize { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.validate_indices { - nd.set_attr_bool("validate_indices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SetSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, set_indices: O0, set_values: O1, set_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(set_indices.into(), set_values.into(), set_shape.into(), scope) + } + fn build_instance_impl(&self, set_indices: crate::Output, set_values: crate::Output, set_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SetSize", |nd| { + nd.add_input(set_indices); + nd.add_input(set_values); + nd.add_input(set_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SetSizeInst{op}) + } +} +impl SetSizeInst { + /// Returns the 'size' output of this 'SetSize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SetSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SetSize::new().build(set_indices, set_values, set_shape, scope)`. -pub fn set_size< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - set_indices: O0, - set_values: O1, - set_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn set_size, O1: ::std::convert::Into, O2: ::std::convert::Into>(set_indices: O0, set_values: O1, set_shape: O2, scope: &mut crate::Scope) -> crate::Result { SetSize::new().build(set_indices, set_values, set_shape, scope) } + /// Builder for the `SetStatsAggregatorDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SetStatsAggregatorDataset { @@ -101850,6 +122539,12 @@ pub struct SetStatsAggregatorDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SetStatsAggregatorDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SetStatsAggregatorDatasetInst { + /// An instance of a fully built SetStatsAggregatorDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SetStatsAggregatorDataset { /// Creates a new `SetStatsAggregatorDataset`. @@ -101858,19 +122553,13 @@ impl SetStatsAggregatorDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -101882,36 +122571,10 @@ impl SetStatsAggregatorDataset { } /// Builds the `SetStatsAggregatorDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - stats_aggregator: O1, - tag: O2, - counter_prefix: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - stats_aggregator.into(), - tag.into(), - counter_prefix.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - stats_aggregator: crate::Output, - tag: crate::Output, - counter_prefix: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, stats_aggregator: O1, tag: O2, counter_prefix: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), stats_aggregator.into(), tag.into(), counter_prefix.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, stats_aggregator: crate::Output, tag: crate::Output, counter_prefix: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SetStatsAggregatorDataset", |nd| { nd.add_input(input_dataset); nd.add_input(stats_aggregator); @@ -101920,38 +122583,59 @@ impl SetStatsAggregatorDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SetStatsAggregatorDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, stats_aggregator: O1, tag: O2, counter_prefix: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), stats_aggregator.into(), tag.into(), counter_prefix.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, stats_aggregator: crate::Output, tag: crate::Output, counter_prefix: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SetStatsAggregatorDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(stats_aggregator); + nd.add_input(tag); + nd.add_input(counter_prefix); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SetStatsAggregatorDatasetInst{op}) + } +} +impl SetStatsAggregatorDatasetInst { + /// Returns the 'handle' output of this 'SetStatsAggregatorDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SetStatsAggregatorDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SetStatsAggregatorDataset::new().build(input_dataset, stats_aggregator, tag, counter_prefix, scope)`. -pub fn set_stats_aggregator_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - stats_aggregator: O1, - tag: O2, - counter_prefix: O3, - scope: &mut crate::Scope, -) -> crate::Result { - SetStatsAggregatorDataset::new().build( - input_dataset, - stats_aggregator, - tag, - counter_prefix, - scope, - ) +pub fn set_stats_aggregator_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, stats_aggregator: O1, tag: O2, counter_prefix: O3, scope: &mut crate::Scope) -> crate::Result { + SetStatsAggregatorDataset::new().build(input_dataset, stats_aggregator, tag, counter_prefix, scope) } + /// Builder for the `Shape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Shape { @@ -101959,6 +122643,12 @@ pub struct Shape { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Shape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShapeInst { + /// An instance of a fully built Shape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Shape { /// Creates a new `Shape`. @@ -101973,10 +122663,7 @@ impl Shape { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -101988,42 +122675,65 @@ impl Shape { } /// Builds the `Shape` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Shape", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Shape` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Shape", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ShapeInst{op}) + } +} +impl ShapeInst { + /// Returns the 'output' output of this 'Shape' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ShapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Shape::new().build(input, scope)`. -pub fn shape>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn shape>(input: O0, scope: &mut crate::Scope) -> crate::Result { Shape::new().build(input, scope) } + /// Builder for the `ShapeN` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ShapeN { @@ -102032,6 +122742,12 @@ pub struct ShapeN { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ShapeN' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShapeNInst { + /// An instance of a fully built ShapeN Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ShapeN { /// Creates a new `ShapeN`. @@ -102052,10 +122768,7 @@ impl ShapeN { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -102067,45 +122780,76 @@ impl ShapeN { } /// Builds the `ShapeN` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ShapeN", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ShapeN` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ShapeN", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ShapeNInst{op}) + } +} +impl ShapeNInst { + /// Returns a Vector of Outputs for 'output' output of this ShapeN operation. + pub fn output(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("N")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for ShapeNInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ShapeN::new().build(input, scope)`. -pub fn shape_n>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn shape_n>(input: O0, scope: &mut crate::Scope) -> crate::Result { ShapeN::new().build(input, scope) } + /// Builder for the `ShardDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ShardDataset { @@ -102115,6 +122859,12 @@ pub struct ShardDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ShardDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShardDatasetInst { + /// An instance of a fully built ShardDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ShardDataset { /// Creates a new `ShardDataset`. @@ -102123,37 +122873,25 @@ impl ShardDataset { } /// Sets the `require_non_empty` attribute. - pub fn require_non_empty>( - mut self, - value: ArgType, - ) -> Self { + pub fn require_non_empty>(mut self, value: ArgType) -> Self { self.require_non_empty = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -102165,27 +122903,10 @@ impl ShardDataset { } /// Builds the `ShardDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - num_shards: O1, - index: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_shards: O1, index: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), num_shards.into(), index.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - num_shards: crate::Output, - index: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, num_shards: crate::Output, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ShardDataset", |nd| { nd.add_input(input_dataset); nd.add_input(num_shards); @@ -102193,41 +122914,81 @@ impl ShardDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.require_non_empty { - nd.set_attr_bool("require_non_empty", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.require_non_empty { + nd.set_attr_bool("require_non_empty", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ShardDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, num_shards: O1, index: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), num_shards.into(), index.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, num_shards: crate::Output, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ShardDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(num_shards); + nd.add_input(index); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.require_non_empty { + nd.set_attr_bool("require_non_empty", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ShardDatasetInst{op}) + } +} +impl ShardDatasetInst { + /// Returns the 'handle' output of this 'ShardDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ShardDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ShardDataset::new().build(input_dataset, num_shards, index, scope)`. -pub fn shard_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - num_shards: O1, - index: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn shard_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, num_shards: O1, index: O2, scope: &mut crate::Scope) -> crate::Result { ShardDataset::new().build(input_dataset, num_shards, index, scope) } + /// Builder for the `ShardedFilename` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ShardedFilename { control_inputs: ::std::vec::Vec, } +/// An instance of 'ShardedFilename' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShardedFilenameInst { + /// An instance of a fully built ShardedFilename Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ShardedFilename { /// Creates a new `ShardedFilename`. @@ -102242,27 +123003,10 @@ impl ShardedFilename { } /// Builds the `ShardedFilename` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - basename: O0, - shard: O1, - num_shards: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, basename: O0, shard: O1, num_shards: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(basename.into(), shard.into(), num_shards.into(), scope) } - - fn build_impl( - &self, - basename: crate::Output, - shard: crate::Output, - num_shards: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, basename: crate::Output, shard: crate::Output, num_shards: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ShardedFilename", |nd| { nd.add_input(basename); nd.add_input(shard); @@ -102273,26 +123017,54 @@ impl ShardedFilename { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ShardedFilename` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, basename: O0, shard: O1, num_shards: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(basename.into(), shard.into(), num_shards.into(), scope) + } + fn build_instance_impl(&self, basename: crate::Output, shard: crate::Output, num_shards: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ShardedFilename", |nd| { + nd.add_input(basename); + nd.add_input(shard); + nd.add_input(num_shards); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ShardedFilenameInst{op}) + } +} +impl ShardedFilenameInst { + /// Returns the 'filename' output of this 'ShardedFilename' operation. + pub fn filename(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ShardedFilenameInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ShardedFilename::new().build(basename, shard, num_shards, scope)`. -pub fn sharded_filename< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - basename: O0, - shard: O1, - num_shards: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sharded_filename, O1: ::std::convert::Into, O2: ::std::convert::Into>(basename: O0, shard: O1, num_shards: O2, scope: &mut crate::Scope) -> crate::Result { ShardedFilename::new().build(basename, shard, num_shards, scope) } + /// Builder for the `ShardedFilespec` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ShardedFilespec { control_inputs: ::std::vec::Vec, } +/// An instance of 'ShardedFilespec' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShardedFilespecInst { + /// An instance of a fully built ShardedFilespec Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ShardedFilespec { /// Creates a new `ShardedFilespec`. @@ -102307,24 +123079,10 @@ impl ShardedFilespec { } /// Builds the `ShardedFilespec` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - basename: O0, - num_shards: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, basename: O0, num_shards: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(basename.into(), num_shards.into(), scope) } - - fn build_impl( - &self, - basename: crate::Output, - num_shards: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, basename: crate::Output, num_shards: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ShardedFilespec", |nd| { nd.add_input(basename); nd.add_input(num_shards); @@ -102334,19 +123092,42 @@ impl ShardedFilespec { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ShardedFilespec` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, basename: O0, num_shards: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(basename.into(), num_shards.into(), scope) + } + fn build_instance_impl(&self, basename: crate::Output, num_shards: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ShardedFilespec", |nd| { + nd.add_input(basename); + nd.add_input(num_shards); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ShardedFilespecInst{op}) + } +} +impl ShardedFilespecInst { + /// Returns the 'filename' output of this 'ShardedFilespec' operation. + pub fn filename(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ShardedFilespecInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ShardedFilespec::new().build(basename, num_shards, scope)`. -pub fn sharded_filespec< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - basename: O0, - num_shards: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sharded_filespec, O1: ::std::convert::Into>(basename: O0, num_shards: O1, scope: &mut crate::Scope) -> crate::Result { ShardedFilespec::new().build(basename, num_shards, scope) } + /// Builder for the `ShuffleAndRepeatDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ShuffleAndRepeatDataset { @@ -102356,6 +123137,12 @@ pub struct ShuffleAndRepeatDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ShuffleAndRepeatDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShuffleAndRepeatDatasetInst { + /// An instance of a fully built ShuffleAndRepeatDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ShuffleAndRepeatDataset { /// Creates a new `ShuffleAndRepeatDataset`. @@ -102364,37 +123151,25 @@ impl ShuffleAndRepeatDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `reshuffle_each_iteration` attribute. - pub fn reshuffle_each_iteration>( - mut self, - value: ArgType, - ) -> Self { + pub fn reshuffle_each_iteration>(mut self, value: ArgType) -> Self { self.reshuffle_each_iteration = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -102406,40 +123181,10 @@ impl ShuffleAndRepeatDataset { } /// Builds the `ShuffleAndRepeatDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input_dataset: O0, - buffer_size: O1, - seed: O2, - seed2: O3, - count: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - buffer_size.into(), - seed.into(), - seed2.into(), - count.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - buffer_size: crate::Output, - seed: crate::Output, - seed2: crate::Output, - count: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, count: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), buffer_size.into(), seed.into(), seed2.into(), count.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, seed: crate::Output, seed2: crate::Output, count: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ShuffleAndRepeatDataset", |nd| { nd.add_input(input_dataset); nd.add_input(buffer_size); @@ -102449,40 +123194,72 @@ impl ShuffleAndRepeatDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { - nd.set_attr_bool("reshuffle_each_iteration", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { + nd.set_attr_bool("reshuffle_each_iteration", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ShuffleAndRepeatDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, count: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), buffer_size.into(), seed.into(), seed2.into(), count.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, seed: crate::Output, seed2: crate::Output, count: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ShuffleAndRepeatDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(buffer_size); + nd.add_input(seed); + nd.add_input(seed2); + nd.add_input(count); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { + nd.set_attr_bool("reshuffle_each_iteration", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ShuffleAndRepeatDatasetInst{op}) + } +} +impl ShuffleAndRepeatDatasetInst { + /// Returns the 'handle' output of this 'ShuffleAndRepeatDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ShuffleAndRepeatDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ShuffleAndRepeatDataset::new().build(input_dataset, buffer_size, seed, seed2, count, scope)`. -pub fn shuffle_and_repeat_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input_dataset: O0, - buffer_size: O1, - seed: O2, - seed2: O3, - count: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn shuffle_and_repeat_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, count: O4, scope: &mut crate::Scope) -> crate::Result { ShuffleAndRepeatDataset::new().build(input_dataset, buffer_size, seed, seed2, count, scope) } + /// Builder for the `ShuffleAndRepeatDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ShuffleAndRepeatDatasetV2 { @@ -102492,6 +123269,12 @@ pub struct ShuffleAndRepeatDatasetV2 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ShuffleAndRepeatDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShuffleAndRepeatDatasetV2Inst { + /// An instance of a fully built ShuffleAndRepeatDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ShuffleAndRepeatDatasetV2 { /// Creates a new `ShuffleAndRepeatDatasetV2`. @@ -102500,37 +123283,25 @@ impl ShuffleAndRepeatDatasetV2 { } /// Sets the `reshuffle_each_iteration` attribute. - pub fn reshuffle_each_iteration>( - mut self, - value: ArgType, - ) -> Self { + pub fn reshuffle_each_iteration>(mut self, value: ArgType) -> Self { self.reshuffle_each_iteration = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -102542,44 +123313,10 @@ impl ShuffleAndRepeatDatasetV2 { } /// Builds the `ShuffleAndRepeatDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - input_dataset: O0, - buffer_size: O1, - seed: O2, - seed2: O3, - count: O4, - seed_generator: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - buffer_size.into(), - seed.into(), - seed2.into(), - count.into(), - seed_generator.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - buffer_size: crate::Output, - seed: crate::Output, - seed2: crate::Output, - count: crate::Output, - seed_generator: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, count: O4, seed_generator: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), buffer_size.into(), seed.into(), seed2.into(), count.into(), seed_generator.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, seed: crate::Output, seed2: crate::Output, count: crate::Output, seed_generator: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ShuffleAndRepeatDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(buffer_size); @@ -102590,50 +123327,73 @@ impl ShuffleAndRepeatDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { - nd.set_attr_bool("reshuffle_each_iteration", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { + nd.set_attr_bool("reshuffle_each_iteration", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ShuffleAndRepeatDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, count: O4, seed_generator: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), buffer_size.into(), seed.into(), seed2.into(), count.into(), seed_generator.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, seed: crate::Output, seed2: crate::Output, count: crate::Output, seed_generator: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ShuffleAndRepeatDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(buffer_size); + nd.add_input(seed); + nd.add_input(seed2); + nd.add_input(count); + nd.add_input(seed_generator); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { + nd.set_attr_bool("reshuffle_each_iteration", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ShuffleAndRepeatDatasetV2Inst{op}) + } +} +impl ShuffleAndRepeatDatasetV2Inst { + /// Returns the 'handle' output of this 'ShuffleAndRepeatDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ShuffleAndRepeatDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ShuffleAndRepeatDatasetV2::new().build(input_dataset, buffer_size, seed, seed2, count, seed_generator, scope)`. -pub fn shuffle_and_repeat_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - input_dataset: O0, - buffer_size: O1, - seed: O2, - seed2: O3, - count: O4, - seed_generator: O5, - scope: &mut crate::Scope, -) -> crate::Result { - ShuffleAndRepeatDatasetV2::new().build( - input_dataset, - buffer_size, - seed, - seed2, - count, - seed_generator, - scope, - ) +pub fn shuffle_and_repeat_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, count: O4, seed_generator: O5, scope: &mut crate::Scope) -> crate::Result { + ShuffleAndRepeatDatasetV2::new().build(input_dataset, buffer_size, seed, seed2, count, seed_generator, scope) } + /// Builder for the `ShuffleDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ShuffleDataset { @@ -102643,6 +123403,12 @@ pub struct ShuffleDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ShuffleDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShuffleDatasetInst { + /// An instance of a fully built ShuffleDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ShuffleDataset { /// Creates a new `ShuffleDataset`. @@ -102651,37 +123417,25 @@ impl ShuffleDataset { } /// Sets the `reshuffle_each_iteration` attribute. - pub fn reshuffle_each_iteration>( - mut self, - value: ArgType, - ) -> Self { + pub fn reshuffle_each_iteration>(mut self, value: ArgType) -> Self { self.reshuffle_each_iteration = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -102693,36 +123447,10 @@ impl ShuffleDataset { } /// Builds the `ShuffleDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - buffer_size: O1, - seed: O2, - seed2: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - buffer_size.into(), - seed.into(), - seed2.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - buffer_size: crate::Output, - seed: crate::Output, - seed2: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), buffer_size.into(), seed.into(), seed2.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, seed: crate::Output, seed2: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ShuffleDataset", |nd| { nd.add_input(input_dataset); nd.add_input(buffer_size); @@ -102731,38 +123459,71 @@ impl ShuffleDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { - nd.set_attr_bool("reshuffle_each_iteration", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { + nd.set_attr_bool("reshuffle_each_iteration", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ShuffleDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), buffer_size.into(), seed.into(), seed2.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, seed: crate::Output, seed2: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ShuffleDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(buffer_size); + nd.add_input(seed); + nd.add_input(seed2); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { + nd.set_attr_bool("reshuffle_each_iteration", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ShuffleDatasetInst{op}) + } +} +impl ShuffleDatasetInst { + /// Returns the 'handle' output of this 'ShuffleDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ShuffleDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ShuffleDataset::new().build(input_dataset, buffer_size, seed, seed2, scope)`. -pub fn shuffle_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - buffer_size: O1, - seed: O2, - seed2: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn shuffle_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, scope: &mut crate::Scope) -> crate::Result { ShuffleDataset::new().build(input_dataset, buffer_size, seed, seed2, scope) } + /// Builder for the `ShuffleDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ShuffleDatasetV2 { @@ -102771,6 +123532,12 @@ pub struct ShuffleDatasetV2 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ShuffleDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShuffleDatasetV2Inst { + /// An instance of a fully built ShuffleDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ShuffleDatasetV2 { /// Creates a new `ShuffleDatasetV2`. @@ -102779,28 +123546,19 @@ impl ShuffleDatasetV2 { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -102812,32 +123570,10 @@ impl ShuffleDatasetV2 { } /// Builds the `ShuffleDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_dataset: O0, - buffer_size: O1, - seed_generator: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - buffer_size.into(), - seed_generator.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - buffer_size: crate::Output, - seed_generator: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, seed_generator: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), buffer_size.into(), seed_generator.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, seed_generator: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ShuffleDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(buffer_size); @@ -102845,33 +123581,64 @@ impl ShuffleDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ShuffleDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, seed_generator: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), buffer_size.into(), seed_generator.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, seed_generator: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ShuffleDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(buffer_size); + nd.add_input(seed_generator); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ShuffleDatasetV2Inst{op}) + } +} +impl ShuffleDatasetV2Inst { + /// Returns the 'handle' output of this 'ShuffleDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ShuffleDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ShuffleDatasetV2::new().build(input_dataset, buffer_size, seed_generator, scope)`. -pub fn shuffle_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_dataset: O0, - buffer_size: O1, - seed_generator: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn shuffle_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_dataset: O0, buffer_size: O1, seed_generator: O2, scope: &mut crate::Scope) -> crate::Result { ShuffleDatasetV2::new().build(input_dataset, buffer_size, seed_generator, scope) } + /// Builder for the `ShuffleDatasetV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ShuffleDatasetV3 { @@ -102881,6 +123648,12 @@ pub struct ShuffleDatasetV3 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ShuffleDatasetV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShuffleDatasetV3Inst { + /// An instance of a fully built ShuffleDatasetV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ShuffleDatasetV3 { /// Creates a new `ShuffleDatasetV3`. @@ -102889,37 +123662,25 @@ impl ShuffleDatasetV3 { } /// Sets the `reshuffle_each_iteration` attribute. - pub fn reshuffle_each_iteration>( - mut self, - value: ArgType, - ) -> Self { + pub fn reshuffle_each_iteration>(mut self, value: ArgType) -> Self { self.reshuffle_each_iteration = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -102931,40 +123692,10 @@ impl ShuffleDatasetV3 { } /// Builds the `ShuffleDatasetV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input_dataset: O0, - buffer_size: O1, - seed: O2, - seed2: O3, - seed_generator: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - buffer_size.into(), - seed.into(), - seed2.into(), - seed_generator.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - buffer_size: crate::Output, - seed: crate::Output, - seed2: crate::Output, - seed_generator: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, seed_generator: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), buffer_size.into(), seed.into(), seed2.into(), seed_generator.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, seed: crate::Output, seed2: crate::Output, seed_generator: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ShuffleDatasetV3", |nd| { nd.add_input(input_dataset); nd.add_input(buffer_size); @@ -102974,52 +123705,83 @@ impl ShuffleDatasetV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { - nd.set_attr_bool("reshuffle_each_iteration", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { + nd.set_attr_bool("reshuffle_each_iteration", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ShuffleDatasetV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, seed_generator: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), buffer_size.into(), seed.into(), seed2.into(), seed_generator.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, buffer_size: crate::Output, seed: crate::Output, seed2: crate::Output, seed_generator: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ShuffleDatasetV3", |nd| { + nd.add_input(input_dataset); + nd.add_input(buffer_size); + nd.add_input(seed); + nd.add_input(seed2); + nd.add_input(seed_generator); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.reshuffle_each_iteration { + nd.set_attr_bool("reshuffle_each_iteration", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ShuffleDatasetV3Inst{op}) + } +} +impl ShuffleDatasetV3Inst { + /// Returns the 'handle' output of this 'ShuffleDatasetV3' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ShuffleDatasetV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ShuffleDatasetV3::new().build(input_dataset, buffer_size, seed, seed2, seed_generator, scope)`. -pub fn shuffle_dataset_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input_dataset: O0, - buffer_size: O1, - seed: O2, - seed2: O3, - seed_generator: O4, - scope: &mut crate::Scope, -) -> crate::Result { - ShuffleDatasetV3::new().build( - input_dataset, - buffer_size, - seed, - seed2, - seed_generator, - scope, - ) +pub fn shuffle_dataset_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input_dataset: O0, buffer_size: O1, seed: O2, seed2: O3, seed_generator: O4, scope: &mut crate::Scope) -> crate::Result { + ShuffleDatasetV3::new().build(input_dataset, buffer_size, seed, seed2, seed_generator, scope) } + /// Builder for the `ShutdownDistributedTPU` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ShutdownDistributedTPU { control_inputs: ::std::vec::Vec, } +/// An instance of 'ShutdownDistributedTPU' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ShutdownDistributedTPUInst { + /// An instance of a fully built ShutdownDistributedTPU Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ShutdownDistributedTPU { /// Creates a new `ShutdownDistributedTPU`. @@ -103034,10 +123796,9 @@ impl ShutdownDistributedTPU { } /// Builds the `ShutdownDistributedTPU` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ShutdownDistributedTPU", |nd| { for op in &self.control_inputs { @@ -103046,18 +123807,45 @@ impl ShutdownDistributedTPU { ::std::result::Result::Ok(()) }) } -} + /// Builds the `ShutdownDistributedTPU` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ShutdownDistributedTPU", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(ShutdownDistributedTPUInst{op}) + } +} +impl ShutdownDistributedTPUInst { +} +impl Into for ShutdownDistributedTPUInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ShutdownDistributedTPU::new().build(scope)`. -pub fn shutdown_distributed_tpu(scope: &mut crate::Scope) -> crate::Result { +pub fn shutdown_distributed_tpu<>(scope: &mut crate::Scope) -> crate::Result { ShutdownDistributedTPU::new().build(scope) } + /// Builder for the `Sigmoid` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Sigmoid { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Sigmoid' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SigmoidInst { + /// An instance of a fully built Sigmoid Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Sigmoid { /// Creates a new `Sigmoid`. @@ -103078,45 +123866,71 @@ impl Sigmoid { } /// Builds the `Sigmoid` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Sigmoid", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Sigmoid` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Sigmoid", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SigmoidInst{op}) + } +} +impl SigmoidInst { + /// Returns the 'y' output of this 'Sigmoid' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SigmoidInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Sigmoid::new().build(x, scope)`. -pub fn sigmoid>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sigmoid>(x: O0, scope: &mut crate::Scope) -> crate::Result { Sigmoid::new().build(x, scope) } + /// Builder for the `SigmoidGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SigmoidGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SigmoidGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SigmoidGradInst { + /// An instance of a fully built SigmoidGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SigmoidGrad { /// Creates a new `SigmoidGrad`. @@ -103137,55 +123951,73 @@ impl SigmoidGrad { } /// Builds the `SigmoidGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - y: O0, - dy: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(y.into(), dy.into(), scope) } - - fn build_impl( - &self, - y: crate::Output, - dy: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SigmoidGrad", |nd| { nd.add_input(y); nd.add_input(dy); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SigmoidGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(y.into(), dy.into(), scope) + } + fn build_instance_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SigmoidGrad", |nd| { + nd.add_input(y); + nd.add_input(dy); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SigmoidGradInst{op}) + } +} +impl SigmoidGradInst { + /// Returns the 'z' output of this 'SigmoidGrad' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SigmoidGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SigmoidGrad::new().build(y, dy, scope)`. -pub fn sigmoid_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - y: O0, - dy: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sigmoid_grad, O1: ::std::convert::Into>(y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { SigmoidGrad::new().build(y, dy, scope) } + /// Builder for the `Sign` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Sign { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Sign' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SignInst { + /// An instance of a fully built Sign Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Sign { /// Creates a new `Sign`. @@ -103206,45 +124038,71 @@ impl Sign { } /// Builds the `Sign` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Sign", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Sign` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Sign", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SignInst{op}) + } +} +impl SignInst { + /// Returns the 'y' output of this 'Sign' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SignInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Sign::new().build(x, scope)`. -pub fn sign>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sign>(x: O0, scope: &mut crate::Scope) -> crate::Result { Sign::new().build(x, scope) } + /// Builder for the `Sin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Sin { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Sin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SinInst { + /// An instance of a fully built Sin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Sin { /// Creates a new `Sin`. @@ -103265,45 +124123,71 @@ impl Sin { } /// Builds the `Sin` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Sin", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Sin` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Sin", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SinInst{op}) + } +} +impl SinInst { + /// Returns the 'y' output of this 'Sin' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Sin::new().build(x, scope)`. -pub fn sin>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sin>(x: O0, scope: &mut crate::Scope) -> crate::Result { Sin::new().build(x, scope) } + /// Builder for the `Sinh` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Sinh { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Sinh' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SinhInst { + /// An instance of a fully built Sinh Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Sinh { /// Creates a new `Sinh`. @@ -103324,39 +124208,59 @@ impl Sinh { } /// Builds the `Sinh` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Sinh", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Sinh` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Sinh", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SinhInst{op}) + } +} +impl SinhInst { + /// Returns the 'y' output of this 'Sinh' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SinhInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Sinh::new().build(x, scope)`. -pub fn sinh>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sinh>(x: O0, scope: &mut crate::Scope) -> crate::Result { Sinh::new().build(x, scope) } + /// Builder for the `Size` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Size { @@ -103364,6 +124268,12 @@ pub struct Size { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Size' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SizeInst { + /// An instance of a fully built Size Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Size { /// Creates a new `Size`. @@ -103378,10 +124288,7 @@ impl Size { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -103393,42 +124300,65 @@ impl Size { } /// Builds the `Size` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Size", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Size` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Size", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SizeInst{op}) + } +} +impl SizeInst { + /// Returns the 'output' output of this 'Size' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Size::new().build(input, scope)`. -pub fn size>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn size>(input: O0, scope: &mut crate::Scope) -> crate::Result { Size::new().build(input, scope) } + /// Builder for the `SkipDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SkipDataset { @@ -103437,6 +124367,12 @@ pub struct SkipDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SkipDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SkipDatasetInst { + /// An instance of a fully built SkipDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SkipDataset { /// Creates a new `SkipDataset`. @@ -103445,28 +124381,19 @@ impl SkipDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -103478,55 +124405,73 @@ impl SkipDataset { } /// Builds the `SkipDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - count: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, count: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), count.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - count: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, count: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SkipDataset", |nd| { nd.add_input(input_dataset); nd.add_input(count); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SkipDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, count: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), count.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, count: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SkipDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(count); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SkipDatasetInst{op}) + } +} +impl SkipDatasetInst { + /// Returns the 'handle' output of this 'SkipDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SkipDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SkipDataset::new().build(input_dataset, count, scope)`. -pub fn skip_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - count: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn skip_dataset, O1: ::std::convert::Into>(input_dataset: O0, count: O1, scope: &mut crate::Scope) -> crate::Result { SkipDataset::new().build(input_dataset, count, scope) } + /// Builder for the `Skipgram` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Skipgram { @@ -103537,6 +124482,12 @@ pub struct Skipgram { subsample: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Skipgram' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SkipgramInst { + /// An instance of a fully built Skipgram Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Skipgram { /// Creates a new `Skipgram`. @@ -103545,10 +124496,7 @@ impl Skipgram { } /// Sets the `filename` attribute. - pub fn filename>( - mut self, - value: ArgType, - ) -> Self { + pub fn filename>(mut self, value: ArgType) -> Self { self.filename = ::std::option::Option::Some(value.into()); self } @@ -103584,39 +124532,123 @@ impl Skipgram { } /// Builds the `Skipgram` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Skipgram", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.filename { - nd.set_attr_string("filename", value)?; - } - if let ::std::option::Option::Some(value) = &self.batch_size { - nd.set_attr_int("batch_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.window_size { - nd.set_attr_int("window_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.min_count { - nd.set_attr_int("min_count", *value)?; - } - if let ::std::option::Option::Some(value) = &self.subsample { - nd.set_attr_float("subsample", *value)?; - } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.filename { + nd.set_attr_string("filename", value)?; + } + if let ::std::option::Option::Some(value) = &self.batch_size { + nd.set_attr_int("batch_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.window_size { + nd.set_attr_int("window_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.min_count { + nd.set_attr_int("min_count", *value)?; + } + if let ::std::option::Option::Some(value) = &self.subsample { + nd.set_attr_float("subsample", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `Skipgram` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Skipgram", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.filename { + nd.set_attr_string("filename", value)?; + } + if let ::std::option::Option::Some(value) = &self.batch_size { + nd.set_attr_int("batch_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.window_size { + nd.set_attr_int("window_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.min_count { + nd.set_attr_int("min_count", *value)?; + } + if let ::std::option::Option::Some(value) = &self.subsample { + nd.set_attr_float("subsample", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SkipgramInst{op}) + } +} +impl SkipgramInst { + /// Returns the 'vocab_word' output of this 'Skipgram' operation. + pub fn vocab_word(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'vocab_freq' output of this 'Skipgram' operation. + pub fn vocab_freq(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'words_per_epoch' output of this 'Skipgram' operation. + pub fn words_per_epoch(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'current_epoch' output of this 'Skipgram' operation. + pub fn current_epoch(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } + /// Returns the 'total_words_processed' output of this 'Skipgram' operation. + pub fn total_words_processed(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 4 + } + } + /// Returns the 'examples' output of this 'Skipgram' operation. + pub fn examples(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 5 + } + } + /// Returns the 'labels' output of this 'Skipgram' operation. + pub fn labels(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 6 + } + } +} +impl Into for SkipgramInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `Skipgram::new().build(scope)`. -pub fn skipgram(scope: &mut crate::Scope) -> crate::Result { +pub fn skipgram<>(scope: &mut crate::Scope) -> crate::Result { Skipgram::new().build(scope) } + /// Builder for the `SleepDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SleepDataset { @@ -103624,6 +124656,12 @@ pub struct SleepDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SleepDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SleepDatasetInst { + /// An instance of a fully built SleepDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SleepDataset { /// Creates a new `SleepDataset`. @@ -103632,19 +124670,13 @@ impl SleepDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -103656,52 +124688,67 @@ impl SleepDataset { } /// Builds the `SleepDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - sleep_microseconds: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, sleep_microseconds: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), sleep_microseconds.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - sleep_microseconds: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, sleep_microseconds: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SleepDataset", |nd| { nd.add_input(input_dataset); nd.add_input(sleep_microseconds); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SleepDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, sleep_microseconds: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), sleep_microseconds.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, sleep_microseconds: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SleepDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(sleep_microseconds); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SleepDatasetInst{op}) + } +} +impl SleepDatasetInst { + /// Returns the 'handle' output of this 'SleepDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SleepDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SleepDataset::new().build(input_dataset, sleep_microseconds, scope)`. -pub fn sleep_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - sleep_microseconds: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sleep_dataset, O1: ::std::convert::Into>(input_dataset: O0, sleep_microseconds: O1, scope: &mut crate::Scope) -> crate::Result { SleepDataset::new().build(input_dataset, sleep_microseconds, scope) } + /// Builder for the `Slice` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Slice { @@ -103709,6 +124756,12 @@ pub struct Slice { Index: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Slice' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SliceInst { + /// An instance of a fully built Slice Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Slice { /// Creates a new `Slice`. @@ -103735,27 +124788,10 @@ impl Slice { } /// Builds the `Slice` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - begin: O1, - size: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, begin: O1, size: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), begin.into(), size.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - begin: crate::Output, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, begin: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Slice", |nd| { nd.add_input(input); nd.add_input(begin); @@ -103763,30 +124799,58 @@ impl Slice { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Index { - nd.set_attr_type("Index", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Slice` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, begin: O1, size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), begin.into(), size.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, begin: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Slice", |nd| { + nd.add_input(input); + nd.add_input(begin); + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SliceInst{op}) + } +} +impl SliceInst { + /// Returns the 'output' output of this 'Slice' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SliceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Slice::new().build(input, begin, size, scope)`. -pub fn slice< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - begin: O1, - size: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn slice, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, begin: O1, size: O2, scope: &mut crate::Scope) -> crate::Result { Slice::new().build(input, begin, size, scope) } + /// Builder for the `SlidingWindowDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SlidingWindowDataset { @@ -103795,6 +124859,12 @@ pub struct SlidingWindowDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SlidingWindowDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SlidingWindowDatasetInst { + /// An instance of a fully built SlidingWindowDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SlidingWindowDataset { /// Creates a new `SlidingWindowDataset`. @@ -103809,19 +124879,13 @@ impl SlidingWindowDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -103833,36 +124897,10 @@ impl SlidingWindowDataset { } /// Builds the `SlidingWindowDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - window_size: O1, - window_shift: O2, - window_stride: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - window_size.into(), - window_shift.into(), - window_stride.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - window_size: crate::Output, - window_shift: crate::Output, - window_stride: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, window_size: O1, window_shift: O2, window_stride: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), window_size.into(), window_shift.into(), window_stride.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, window_size: crate::Output, window_shift: crate::Output, window_stride: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SlidingWindowDataset", |nd| { nd.add_input(input_dataset); nd.add_input(window_size); @@ -103871,47 +124909,77 @@ impl SlidingWindowDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.drop_remainder { - nd.set_attr_bool("drop_remainder", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.drop_remainder { + nd.set_attr_bool("drop_remainder", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SlidingWindowDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, window_size: O1, window_shift: O2, window_stride: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), window_size.into(), window_shift.into(), window_stride.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, window_size: crate::Output, window_shift: crate::Output, window_stride: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SlidingWindowDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(window_size); + nd.add_input(window_shift); + nd.add_input(window_stride); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.drop_remainder { + nd.set_attr_bool("drop_remainder", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SlidingWindowDatasetInst{op}) + } +} +impl SlidingWindowDatasetInst { + /// Returns the 'handle' output of this 'SlidingWindowDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SlidingWindowDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SlidingWindowDataset::new().build(input_dataset, window_size, window_shift, window_stride, scope)`. -pub fn sliding_window_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - window_size: O1, - window_shift: O2, - window_stride: O3, - scope: &mut crate::Scope, -) -> crate::Result { - SlidingWindowDataset::new().build( - input_dataset, - window_size, - window_shift, - window_stride, - scope, - ) +pub fn sliding_window_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, window_size: O1, window_shift: O2, window_stride: O3, scope: &mut crate::Scope) -> crate::Result { + SlidingWindowDataset::new().build(input_dataset, window_size, window_shift, window_stride, scope) } + /// Builder for the `Snapshot` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Snapshot { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Snapshot' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SnapshotInst { + /// An instance of a fully built Snapshot Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Snapshot { /// Creates a new `Snapshot`. @@ -103932,39 +125000,59 @@ impl Snapshot { } /// Builds the `Snapshot` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Snapshot", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Snapshot` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Snapshot", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SnapshotInst{op}) + } +} +impl SnapshotInst { + /// Returns the 'output' output of this 'Snapshot' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SnapshotInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Snapshot::new().build(input, scope)`. -pub fn snapshot>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn snapshot>(input: O0, scope: &mut crate::Scope) -> crate::Result { Snapshot::new().build(input, scope) } + /// Builder for the `SnapshotDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SnapshotDataset { @@ -103986,6 +125074,12 @@ pub struct SnapshotDataset { snapshot_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SnapshotDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SnapshotDatasetInst { + /// An instance of a fully built SnapshotDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SnapshotDataset { /// Creates a new `SnapshotDataset`. @@ -103994,46 +125088,31 @@ impl SnapshotDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `compression` attribute. - pub fn compression>( - mut self, - value: ArgType, - ) -> Self { + pub fn compression>(mut self, value: ArgType) -> Self { self.compression = ::std::option::Option::Some(value.into()); self } /// Sets the `reader_path_prefix` attribute. - pub fn reader_path_prefix>( - mut self, - value: ArgType, - ) -> Self { + pub fn reader_path_prefix>(mut self, value: ArgType) -> Self { self.reader_path_prefix = ::std::option::Option::Some(value.into()); self } /// Sets the `writer_path_prefix` attribute. - pub fn writer_path_prefix>( - mut self, - value: ArgType, - ) -> Self { + pub fn writer_path_prefix>(mut self, value: ArgType) -> Self { self.writer_path_prefix = ::std::option::Option::Some(value.into()); self } @@ -104045,46 +125124,31 @@ impl SnapshotDataset { } /// Sets the `pending_snapshot_expiry_seconds` attribute. - pub fn pending_snapshot_expiry_seconds>( - mut self, - value: ArgType, - ) -> Self { + pub fn pending_snapshot_expiry_seconds>(mut self, value: ArgType) -> Self { self.pending_snapshot_expiry_seconds = ::std::option::Option::Some(value.into()); self } /// Sets the `num_reader_threads` attribute. - pub fn num_reader_threads>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_reader_threads>(mut self, value: ArgType) -> Self { self.num_reader_threads = ::std::option::Option::Some(value.into()); self } /// Sets the `reader_buffer_size` attribute. - pub fn reader_buffer_size>( - mut self, - value: ArgType, - ) -> Self { + pub fn reader_buffer_size>(mut self, value: ArgType) -> Self { self.reader_buffer_size = ::std::option::Option::Some(value.into()); self } /// Sets the `num_writer_threads` attribute. - pub fn num_writer_threads>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_writer_threads>(mut self, value: ArgType) -> Self { self.num_writer_threads = ::std::option::Option::Some(value.into()); self } /// Sets the `writer_buffer_size` attribute. - pub fn writer_buffer_size>( - mut self, - value: ArgType, - ) -> Self { + pub fn writer_buffer_size>(mut self, value: ArgType) -> Self { self.writer_buffer_size = ::std::option::Option::Some(value.into()); self } @@ -104108,19 +125172,13 @@ impl SnapshotDataset { } /// Sets the `mode` attribute. - pub fn mode>( - mut self, - value: ArgType, - ) -> Self { + pub fn mode>(mut self, value: ArgType) -> Self { self.mode = ::std::option::Option::Some(value.into()); self } /// Sets the `snapshot_name` attribute. - pub fn snapshot_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn snapshot_name>(mut self, value: ArgType) -> Self { self.snapshot_name = ::std::option::Option::Some(value.into()); self } @@ -104132,94 +125190,151 @@ impl SnapshotDataset { } /// Builds the `SnapshotDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - path: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, path: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), path.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - path: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, path: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SnapshotDataset", |nd| { nd.add_input(input_dataset); nd.add_input(path); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.compression { - nd.set_attr_string("compression", value)?; - } - if let ::std::option::Option::Some(value) = &self.reader_path_prefix { - nd.set_attr_string("reader_path_prefix", value)?; - } - if let ::std::option::Option::Some(value) = &self.writer_path_prefix { - nd.set_attr_string("writer_path_prefix", value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_size_bytes { - nd.set_attr_int("shard_size_bytes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.pending_snapshot_expiry_seconds { - nd.set_attr_int("pending_snapshot_expiry_seconds", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_reader_threads { - nd.set_attr_int("num_reader_threads", *value)?; - } - if let ::std::option::Option::Some(value) = &self.reader_buffer_size { - nd.set_attr_int("reader_buffer_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_writer_threads { - nd.set_attr_int("num_writer_threads", *value)?; - } - if let ::std::option::Option::Some(value) = &self.writer_buffer_size { - nd.set_attr_int("writer_buffer_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shuffle_on_read { - nd.set_attr_bool("shuffle_on_read", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.mode { - nd.set_attr_string("mode", value)?; - } - if let ::std::option::Option::Some(value) = &self.snapshot_name { - nd.set_attr_string("snapshot_name", value)?; + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.reader_path_prefix { + nd.set_attr_string("reader_path_prefix", value)?; + } + if let ::std::option::Option::Some(value) = &self.writer_path_prefix { + nd.set_attr_string("writer_path_prefix", value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_size_bytes { + nd.set_attr_int("shard_size_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.pending_snapshot_expiry_seconds { + nd.set_attr_int("pending_snapshot_expiry_seconds", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_reader_threads { + nd.set_attr_int("num_reader_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reader_buffer_size { + nd.set_attr_int("reader_buffer_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_writer_threads { + nd.set_attr_int("num_writer_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.writer_buffer_size { + nd.set_attr_int("writer_buffer_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shuffle_on_read { + nd.set_attr_bool("shuffle_on_read", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.snapshot_name { + nd.set_attr_string("snapshot_name", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `SnapshotDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, path: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), path.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, path: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SnapshotDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(path); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.reader_path_prefix { + nd.set_attr_string("reader_path_prefix", value)?; + } + if let ::std::option::Option::Some(value) = &self.writer_path_prefix { + nd.set_attr_string("writer_path_prefix", value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_size_bytes { + nd.set_attr_int("shard_size_bytes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.pending_snapshot_expiry_seconds { + nd.set_attr_int("pending_snapshot_expiry_seconds", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_reader_threads { + nd.set_attr_int("num_reader_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reader_buffer_size { + nd.set_attr_int("reader_buffer_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_writer_threads { + nd.set_attr_int("num_writer_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.writer_buffer_size { + nd.set_attr_int("writer_buffer_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shuffle_on_read { + nd.set_attr_bool("shuffle_on_read", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.mode { + nd.set_attr_string("mode", value)?; + } + if let ::std::option::Option::Some(value) = &self.snapshot_name { + nd.set_attr_string("snapshot_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SnapshotDatasetInst{op}) + } +} +impl SnapshotDatasetInst { + /// Returns the 'handle' output of this 'SnapshotDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SnapshotDatasetInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `SnapshotDataset::new().build(input_dataset, path, scope)`. -pub fn snapshot_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - path: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn snapshot_dataset, O1: ::std::convert::Into>(input_dataset: O0, path: O1, scope: &mut crate::Scope) -> crate::Result { SnapshotDataset::new().build(input_dataset, path, scope) } + /// Builder for the `SnapshotDatasetReader` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SnapshotDatasetReader { @@ -104229,6 +125344,12 @@ pub struct SnapshotDatasetReader { version: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SnapshotDatasetReader' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SnapshotDatasetReaderInst { + /// An instance of a fully built SnapshotDatasetReader Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SnapshotDatasetReader { /// Creates a new `SnapshotDatasetReader`. @@ -104237,28 +125358,19 @@ impl SnapshotDatasetReader { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `compression` attribute. - pub fn compression>( - mut self, - value: ArgType, - ) -> Self { + pub fn compression>(mut self, value: ArgType) -> Self { self.compression = ::std::option::Option::Some(value.into()); self } @@ -104276,58 +125388,79 @@ impl SnapshotDatasetReader { } /// Builds the `SnapshotDatasetReader` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - shard_dir: O0, - start_index: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, shard_dir: O0, start_index: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shard_dir.into(), start_index.into(), scope) } - - fn build_impl( - &self, - shard_dir: crate::Output, - start_index: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shard_dir: crate::Output, start_index: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SnapshotDatasetReader", |nd| { nd.add_input(shard_dir); nd.add_input(start_index); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.compression { - nd.set_attr_string("compression", value)?; - } - if let ::std::option::Option::Some(value) = &self.version { - nd.set_attr_int("version", *value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.version { + nd.set_attr_int("version", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SnapshotDatasetReader` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, shard_dir: O0, start_index: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shard_dir.into(), start_index.into(), scope) + } + fn build_instance_impl(&self, shard_dir: crate::Output, start_index: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SnapshotDatasetReader", |nd| { + nd.add_input(shard_dir); + nd.add_input(start_index); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.version { + nd.set_attr_int("version", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SnapshotDatasetReaderInst{op}) + } +} +impl SnapshotDatasetReaderInst { + /// Returns the 'handle' output of this 'SnapshotDatasetReader' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SnapshotDatasetReaderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SnapshotDatasetReader::new().build(shard_dir, start_index, scope)`. -pub fn snapshot_dataset_reader< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - shard_dir: O0, - start_index: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn snapshot_dataset_reader, O1: ::std::convert::Into>(shard_dir: O0, start_index: O1, scope: &mut crate::Scope) -> crate::Result { SnapshotDatasetReader::new().build(shard_dir, start_index, scope) } + /// Builder for the `SnapshotDatasetV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SnapshotDatasetV2 { @@ -104345,6 +125478,12 @@ pub struct SnapshotDatasetV2 { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SnapshotDatasetV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SnapshotDatasetV2Inst { + /// An instance of a fully built SnapshotDatasetV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SnapshotDatasetV2 { /// Creates a new `SnapshotDatasetV2`. @@ -104353,46 +125492,31 @@ impl SnapshotDatasetV2 { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `compression` attribute. - pub fn compression>( - mut self, - value: ArgType, - ) -> Self { + pub fn compression>(mut self, value: ArgType) -> Self { self.compression = ::std::option::Option::Some(value.into()); self } /// Sets the `reader_prefix` attribute. - pub fn reader_prefix>( - mut self, - value: ArgType, - ) -> Self { + pub fn reader_prefix>(mut self, value: ArgType) -> Self { self.reader_prefix = ::std::option::Option::Some(value.into()); self } /// Sets the `writer_prefix` attribute. - pub fn writer_prefix>( - mut self, - value: ArgType, - ) -> Self { + pub fn writer_prefix>(mut self, value: ArgType) -> Self { self.writer_prefix = ::std::option::Option::Some(value.into()); self } @@ -104410,46 +125534,31 @@ impl SnapshotDatasetV2 { } /// Sets the `reader_func` attribute. - pub fn reader_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn reader_func>(mut self, value: ArgType) -> Self { self.reader_func = ::std::option::Option::Some(value.into()); self } /// Sets the `shard_func` attribute. - pub fn shard_func>( - mut self, - value: ArgType, - ) -> Self { + pub fn shard_func>(mut self, value: ArgType) -> Self { self.shard_func = ::std::option::Option::Some(value.into()); self } /// Sets the `Treader_func_args` attribute. - pub fn Treader_func_args>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Treader_func_args>>(mut self, value: ArgType) -> Self { self.Treader_func_args = ::std::option::Option::Some(value.into()); self } /// Sets the `Tshard_func_args` attribute. - pub fn Tshard_func_args>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshard_func_args>>(mut self, value: ArgType) -> Self { self.Tshard_func_args = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -104461,36 +125570,10 @@ impl SnapshotDatasetV2 { } /// Builds the `SnapshotDatasetV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_dataset: O0, - path: O1, - reader_func_other_args: O2, - shard_func_other_args: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - path.into(), - reader_func_other_args.into(), - shard_func_other_args.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - path: crate::Output, - reader_func_other_args: crate::Output, - shard_func_other_args: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, path: O1, reader_func_other_args: O2, shard_func_other_args: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), path.into(), reader_func_other_args.into(), shard_func_other_args.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, path: crate::Output, reader_func_other_args: crate::Output, shard_func_other_args: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SnapshotDatasetV2", |nd| { nd.add_input(input_dataset); nd.add_input(path); @@ -104499,68 +125582,119 @@ impl SnapshotDatasetV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.compression { - nd.set_attr_string("compression", value)?; - } - if let ::std::option::Option::Some(value) = &self.reader_prefix { - nd.set_attr_string("reader_prefix", value)?; - } - if let ::std::option::Option::Some(value) = &self.writer_prefix { - nd.set_attr_string("writer_prefix", value)?; - } - if let ::std::option::Option::Some(value) = &self.hash_valid { - nd.set_attr_bool("hash_valid", *value)?; - } - if let ::std::option::Option::Some(value) = &self.hash { - nd.set_attr_int("hash", *value)?; - } - if let ::std::option::Option::Some(value) = &self.reader_func { - nd.set_attr_string("reader_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.shard_func { - nd.set_attr_string("shard_func", value)?; - } - if let ::std::option::Option::Some(value) = &self.Treader_func_args { - nd.set_attr_type_list("Treader_func_args", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshard_func_args { - nd.set_attr_type_list("Tshard_func_args", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.reader_prefix { + nd.set_attr_string("reader_prefix", value)?; + } + if let ::std::option::Option::Some(value) = &self.writer_prefix { + nd.set_attr_string("writer_prefix", value)?; + } + if let ::std::option::Option::Some(value) = &self.hash_valid { + nd.set_attr_bool("hash_valid", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hash { + nd.set_attr_int("hash", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reader_func { + nd.set_attr_string("reader_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_func { + nd.set_attr_string("shard_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treader_func_args { + nd.set_attr_type_list("Treader_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshard_func_args { + nd.set_attr_type_list("Tshard_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `SnapshotDatasetV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_dataset: O0, path: O1, reader_func_other_args: O2, shard_func_other_args: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), path.into(), reader_func_other_args.into(), shard_func_other_args.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, path: crate::Output, reader_func_other_args: crate::Output, shard_func_other_args: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SnapshotDatasetV2", |nd| { + nd.add_input(input_dataset); + nd.add_input(path); + nd.add_input(reader_func_other_args); + nd.add_input(shard_func_other_args); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression { + nd.set_attr_string("compression", value)?; + } + if let ::std::option::Option::Some(value) = &self.reader_prefix { + nd.set_attr_string("reader_prefix", value)?; + } + if let ::std::option::Option::Some(value) = &self.writer_prefix { + nd.set_attr_string("writer_prefix", value)?; + } + if let ::std::option::Option::Some(value) = &self.hash_valid { + nd.set_attr_bool("hash_valid", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hash { + nd.set_attr_int("hash", *value)?; + } + if let ::std::option::Option::Some(value) = &self.reader_func { + nd.set_attr_string("reader_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.shard_func { + nd.set_attr_string("shard_func", value)?; + } + if let ::std::option::Option::Some(value) = &self.Treader_func_args { + nd.set_attr_type_list("Treader_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshard_func_args { + nd.set_attr_type_list("Tshard_func_args", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SnapshotDatasetV2Inst{op}) + } +} +impl SnapshotDatasetV2Inst { + /// Returns the 'handle' output of this 'SnapshotDatasetV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SnapshotDatasetV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `SnapshotDatasetV2::new().build(input_dataset, path, reader_func_other_args, shard_func_other_args, scope)`. -pub fn snapshot_dataset_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_dataset: O0, - path: O1, - reader_func_other_args: O2, - shard_func_other_args: O3, - scope: &mut crate::Scope, -) -> crate::Result { - SnapshotDatasetV2::new().build( - input_dataset, - path, - reader_func_other_args, - shard_func_other_args, - scope, - ) +pub fn snapshot_dataset_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_dataset: O0, path: O1, reader_func_other_args: O2, shard_func_other_args: O3, scope: &mut crate::Scope) -> crate::Result { + SnapshotDatasetV2::new().build(input_dataset, path, reader_func_other_args, shard_func_other_args, scope) } + /// Builder for the `SnapshotNestedDatasetReader` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SnapshotNestedDatasetReader { @@ -104569,6 +125703,12 @@ pub struct SnapshotNestedDatasetReader { N: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SnapshotNestedDatasetReader' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SnapshotNestedDatasetReaderInst { + /// An instance of a fully built SnapshotNestedDatasetReader Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SnapshotNestedDatasetReader { /// Creates a new `SnapshotNestedDatasetReader`. @@ -104577,19 +125717,13 @@ impl SnapshotNestedDatasetReader { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -104607,51 +125741,83 @@ impl SnapshotNestedDatasetReader { } /// Builds the `SnapshotNestedDatasetReader` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SnapshotNestedDatasetReader", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SnapshotNestedDatasetReader` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SnapshotNestedDatasetReader", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SnapshotNestedDatasetReaderInst{op}) + } +} +impl SnapshotNestedDatasetReaderInst { + /// Returns the 'handle' output of this 'SnapshotNestedDatasetReader' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SnapshotNestedDatasetReaderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SnapshotNestedDatasetReader::new().build(inputs, scope)`. -pub fn snapshot_nested_dataset_reader>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn snapshot_nested_dataset_reader>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { SnapshotNestedDatasetReader::new().build(inputs, scope) } + /// Builder for the `SobolSample` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SobolSample { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SobolSample' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SobolSampleInst { + /// An instance of a fully built SobolSample Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SobolSample { /// Creates a new `SobolSample`. @@ -104672,27 +125838,10 @@ impl SobolSample { } /// Builds the `SobolSample` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - dim: O0, - num_results: O1, - skip: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, dim: O0, num_results: O1, skip: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(dim.into(), num_results.into(), skip.into(), scope) } - - fn build_impl( - &self, - dim: crate::Output, - num_results: crate::Output, - skip: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, dim: crate::Output, num_results: crate::Output, skip: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SobolSample", |nd| { nd.add_input(dim); nd.add_input(num_results); @@ -104700,33 +125849,64 @@ impl SobolSample { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SobolSample` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, dim: O0, num_results: O1, skip: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dim.into(), num_results.into(), skip.into(), scope) + } + fn build_instance_impl(&self, dim: crate::Output, num_results: crate::Output, skip: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SobolSample", |nd| { + nd.add_input(dim); + nd.add_input(num_results); + nd.add_input(skip); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SobolSampleInst{op}) + } +} +impl SobolSampleInst { + /// Returns the 'samples' output of this 'SobolSample' operation. + pub fn samples(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SobolSampleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SobolSample::new().build(dim, num_results, skip, scope)`. -pub fn sobol_sample< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - dim: O0, - num_results: O1, - skip: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sobol_sample, O1: ::std::convert::Into, O2: ::std::convert::Into>(dim: O0, num_results: O1, skip: O2, scope: &mut crate::Scope) -> crate::Result { SobolSample::new().build(dim, num_results, skip, scope) } + /// Builder for the `Softmax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Softmax { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Softmax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SoftmaxInst { + /// An instance of a fully built Softmax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Softmax { /// Creates a new `Softmax`. @@ -104747,45 +125927,71 @@ impl Softmax { } /// Builds the `Softmax` operation. - pub fn build>( - &self, - logits: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, logits: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(logits.into(), scope) } - - fn build_impl( - &self, - logits: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, logits: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Softmax", |nd| { nd.add_input(logits); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Softmax` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, logits: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(logits.into(), scope) + } + fn build_instance_impl(&self, logits: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Softmax", |nd| { + nd.add_input(logits); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SoftmaxInst{op}) + } +} +impl SoftmaxInst { + /// Returns the 'softmax' output of this 'Softmax' operation. + pub fn softmax(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SoftmaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Softmax::new().build(logits, scope)`. -pub fn softmax>( - logits: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn softmax>(logits: O0, scope: &mut crate::Scope) -> crate::Result { Softmax::new().build(logits, scope) } + /// Builder for the `SoftmaxCrossEntropyWithLogits` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SoftmaxCrossEntropyWithLogits { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SoftmaxCrossEntropyWithLogits' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SoftmaxCrossEntropyWithLogitsInst { + /// An instance of a fully built SoftmaxCrossEntropyWithLogits Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SoftmaxCrossEntropyWithLogits { /// Creates a new `SoftmaxCrossEntropyWithLogits`. @@ -104806,55 +126012,80 @@ impl SoftmaxCrossEntropyWithLogits { } /// Builds the `SoftmaxCrossEntropyWithLogits` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - features: O0, - labels: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, features: O0, labels: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(features.into(), labels.into(), scope) } - - fn build_impl( - &self, - features: crate::Output, - labels: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, features: crate::Output, labels: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SoftmaxCrossEntropyWithLogits", |nd| { nd.add_input(features); nd.add_input(labels); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SoftmaxCrossEntropyWithLogits` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, features: O0, labels: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), labels.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, labels: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SoftmaxCrossEntropyWithLogits", |nd| { + nd.add_input(features); + nd.add_input(labels); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SoftmaxCrossEntropyWithLogitsInst{op}) + } +} +impl SoftmaxCrossEntropyWithLogitsInst { + /// Returns the 'loss' output of this 'SoftmaxCrossEntropyWithLogits' operation. + pub fn loss(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'backprop' output of this 'SoftmaxCrossEntropyWithLogits' operation. + pub fn backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for SoftmaxCrossEntropyWithLogitsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SoftmaxCrossEntropyWithLogits::new().build(features, labels, scope)`. -pub fn softmax_cross_entropy_with_logits< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - features: O0, - labels: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn softmax_cross_entropy_with_logits, O1: ::std::convert::Into>(features: O0, labels: O1, scope: &mut crate::Scope) -> crate::Result { SoftmaxCrossEntropyWithLogits::new().build(features, labels, scope) } + /// Builder for the `Softplus` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Softplus { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Softplus' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SoftplusInst { + /// An instance of a fully built Softplus Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Softplus { /// Creates a new `Softplus`. @@ -104875,45 +126106,71 @@ impl Softplus { } /// Builds the `Softplus` operation. - pub fn build>( - &self, - features: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(features.into(), scope) } - - fn build_impl( - &self, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Softplus", |nd| { nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Softplus` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Softplus", |nd| { + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SoftplusInst{op}) + } +} +impl SoftplusInst { + /// Returns the 'activations' output of this 'Softplus' operation. + pub fn activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SoftplusInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Softplus::new().build(features, scope)`. -pub fn softplus>( - features: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn softplus>(features: O0, scope: &mut crate::Scope) -> crate::Result { Softplus::new().build(features, scope) } + /// Builder for the `SoftplusGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SoftplusGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SoftplusGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SoftplusGradInst { + /// An instance of a fully built SoftplusGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SoftplusGrad { /// Creates a new `SoftplusGrad`. @@ -104934,55 +126191,73 @@ impl SoftplusGrad { } /// Builds the `SoftplusGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - gradients: O0, - features: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(gradients.into(), features.into(), scope) } - - fn build_impl( - &self, - gradients: crate::Output, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, gradients: crate::Output, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SoftplusGrad", |nd| { nd.add_input(gradients); nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SoftplusGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), features.into(), scope) + } + fn build_instance_impl(&self, gradients: crate::Output, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SoftplusGrad", |nd| { + nd.add_input(gradients); + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SoftplusGradInst{op}) + } +} +impl SoftplusGradInst { + /// Returns the 'backprops' output of this 'SoftplusGrad' operation. + pub fn backprops(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SoftplusGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SoftplusGrad::new().build(gradients, features, scope)`. -pub fn softplus_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - gradients: O0, - features: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn softplus_grad, O1: ::std::convert::Into>(gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { SoftplusGrad::new().build(gradients, features, scope) } + /// Builder for the `Softsign` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Softsign { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Softsign' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SoftsignInst { + /// An instance of a fully built Softsign Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Softsign { /// Creates a new `Softsign`. @@ -105003,45 +126278,71 @@ impl Softsign { } /// Builds the `Softsign` operation. - pub fn build>( - &self, - features: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(features.into(), scope) } - - fn build_impl( - &self, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Softsign", |nd| { nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Softsign` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, features: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Softsign", |nd| { + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SoftsignInst{op}) + } +} +impl SoftsignInst { + /// Returns the 'activations' output of this 'Softsign' operation. + pub fn activations(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SoftsignInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Softsign::new().build(features, scope)`. -pub fn softsign>( - features: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn softsign>(features: O0, scope: &mut crate::Scope) -> crate::Result { Softsign::new().build(features, scope) } + /// Builder for the `SoftsignGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SoftsignGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SoftsignGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SoftsignGradInst { + /// An instance of a fully built SoftsignGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SoftsignGrad { /// Creates a new `SoftsignGrad`. @@ -105062,49 +126363,61 @@ impl SoftsignGrad { } /// Builds the `SoftsignGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - gradients: O0, - features: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(gradients.into(), features.into(), scope) } - - fn build_impl( - &self, - gradients: crate::Output, - features: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, gradients: crate::Output, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SoftsignGrad", |nd| { nd.add_input(gradients); nd.add_input(features); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SoftsignGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(gradients.into(), features.into(), scope) + } + fn build_instance_impl(&self, gradients: crate::Output, features: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SoftsignGrad", |nd| { + nd.add_input(gradients); + nd.add_input(features); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SoftsignGradInst{op}) + } +} +impl SoftsignGradInst { + /// Returns the 'backprops' output of this 'SoftsignGrad' operation. + pub fn backprops(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SoftsignGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SoftsignGrad::new().build(gradients, features, scope)`. -pub fn softsign_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - gradients: O0, - features: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn softsign_grad, O1: ::std::convert::Into>(gradients: O0, features: O1, scope: &mut crate::Scope) -> crate::Result { SoftsignGrad::new().build(gradients, features, scope) } + /// Builder for the `SpaceToBatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SpaceToBatch { @@ -105113,6 +126426,12 @@ pub struct SpaceToBatch { block_size: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SpaceToBatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SpaceToBatchInst { + /// An instance of a fully built SpaceToBatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SpaceToBatch { /// Creates a new `SpaceToBatch`. @@ -105127,10 +126446,7 @@ impl SpaceToBatch { } /// Sets the `Tpaddings` attribute. - pub fn Tpaddings>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tpaddings>(mut self, value: ArgType) -> Self { self.Tpaddings = ::std::option::Option::Some(value.into()); self } @@ -105148,55 +126464,73 @@ impl SpaceToBatch { } /// Builds the `SpaceToBatch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - paddings: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), paddings.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - paddings: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, paddings: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SpaceToBatch", |nd| { nd.add_input(input); nd.add_input(paddings); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tpaddings { - nd.set_attr_type("Tpaddings", *value)?; - } - if let ::std::option::Option::Some(value) = &self.block_size { - nd.set_attr_int("block_size", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } + if let ::std::option::Option::Some(value) = &self.block_size { + nd.set_attr_int("block_size", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SpaceToBatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), paddings.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, paddings: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SpaceToBatch", |nd| { + nd.add_input(input); + nd.add_input(paddings); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } + if let ::std::option::Option::Some(value) = &self.block_size { + nd.set_attr_int("block_size", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SpaceToBatchInst{op}) + } +} +impl SpaceToBatchInst { + /// Returns the 'output' output of this 'SpaceToBatch' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SpaceToBatchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SpaceToBatch::new().build(input, paddings, scope)`. -pub fn space_to_batch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - paddings: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn space_to_batch, O1: ::std::convert::Into>(input: O0, paddings: O1, scope: &mut crate::Scope) -> crate::Result { SpaceToBatch::new().build(input, paddings, scope) } + /// Builder for the `SpaceToBatchND` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SpaceToBatchND { @@ -105205,6 +126539,12 @@ pub struct SpaceToBatchND { Tpaddings: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SpaceToBatchND' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SpaceToBatchNDInst { + /// An instance of a fully built SpaceToBatchND Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SpaceToBatchND { /// Creates a new `SpaceToBatchND`. @@ -105219,19 +126559,13 @@ impl SpaceToBatchND { } /// Sets the `Tblock_shape` attribute. - pub fn Tblock_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tblock_shape>(mut self, value: ArgType) -> Self { self.Tblock_shape = ::std::option::Option::Some(value.into()); self } /// Sets the `Tpaddings` attribute. - pub fn Tpaddings>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tpaddings>(mut self, value: ArgType) -> Self { self.Tpaddings = ::std::option::Option::Some(value.into()); self } @@ -105243,27 +126577,10 @@ impl SpaceToBatchND { } /// Builds the `SpaceToBatchND` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - block_shape: O1, - paddings: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, block_shape: O1, paddings: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), block_shape.into(), paddings.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - block_shape: crate::Output, - paddings: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, block_shape: crate::Output, paddings: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SpaceToBatchND", |nd| { nd.add_input(input); nd.add_input(block_shape); @@ -105271,33 +126588,64 @@ impl SpaceToBatchND { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tblock_shape { - nd.set_attr_type("Tblock_shape", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tpaddings { - nd.set_attr_type("Tpaddings", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tblock_shape { + nd.set_attr_type("Tblock_shape", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SpaceToBatchND` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, block_shape: O1, paddings: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), block_shape.into(), paddings.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, block_shape: crate::Output, paddings: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SpaceToBatchND", |nd| { + nd.add_input(input); + nd.add_input(block_shape); + nd.add_input(paddings); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tblock_shape { + nd.set_attr_type("Tblock_shape", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tpaddings { + nd.set_attr_type("Tpaddings", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SpaceToBatchNDInst{op}) + } +} +impl SpaceToBatchNDInst { + /// Returns the 'output' output of this 'SpaceToBatchND' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SpaceToBatchNDInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SpaceToBatchND::new().build(input, block_shape, paddings, scope)`. -pub fn space_to_batch_nd< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - block_shape: O1, - paddings: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn space_to_batch_nd, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, block_shape: O1, paddings: O2, scope: &mut crate::Scope) -> crate::Result { SpaceToBatchND::new().build(input, block_shape, paddings, scope) } + /// Builder for the `SpaceToDepth` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SpaceToDepth { @@ -105306,6 +126654,12 @@ pub struct SpaceToDepth { data_format: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SpaceToDepth' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SpaceToDepthInst { + /// An instance of a fully built SpaceToDepth Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SpaceToDepth { /// Creates a new `SpaceToDepth`. @@ -105326,10 +126680,7 @@ impl SpaceToDepth { } /// Sets the `data_format` attribute. - pub fn data_format>( - mut self, - value: ArgType, - ) -> Self { + pub fn data_format>(mut self, value: ArgType) -> Self { self.data_format = ::std::option::Option::Some(value.into()); self } @@ -105341,45 +126692,71 @@ impl SpaceToDepth { } /// Builds the `SpaceToDepth` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SpaceToDepth", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.block_size { - nd.set_attr_int("block_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.data_format { - nd.set_attr_string("data_format", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.block_size { + nd.set_attr_int("block_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SpaceToDepth` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SpaceToDepth", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.block_size { + nd.set_attr_int("block_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.data_format { + nd.set_attr_string("data_format", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SpaceToDepthInst{op}) + } +} +impl SpaceToDepthInst { + /// Returns the 'output' output of this 'SpaceToDepth' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SpaceToDepthInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SpaceToDepth::new().build(input, scope)`. -pub fn space_to_depth>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn space_to_depth>(input: O0, scope: &mut crate::Scope) -> crate::Result { SpaceToDepth::new().build(input, scope) } + /// Builder for the `SparseAccumulatorApplyGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseAccumulatorApplyGradient { @@ -105387,6 +126764,12 @@ pub struct SparseAccumulatorApplyGradient { has_known_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseAccumulatorApplyGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseAccumulatorApplyGradientInst { + /// An instance of a fully built SparseAccumulatorApplyGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseAccumulatorApplyGradient { /// Creates a new `SparseAccumulatorApplyGradient`. @@ -105413,40 +126796,10 @@ impl SparseAccumulatorApplyGradient { } /// Builds the `SparseAccumulatorApplyGradient` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - handle: O0, - local_step: O1, - gradient_indices: O2, - gradient_values: O3, - gradient_shape: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - local_step.into(), - gradient_indices.into(), - gradient_values.into(), - gradient_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - local_step: crate::Output, - gradient_indices: crate::Output, - gradient_values: crate::Output, - gradient_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, handle: O0, local_step: O1, gradient_indices: O2, gradient_values: O3, gradient_shape: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), local_step.into(), gradient_indices.into(), gradient_values.into(), gradient_shape.into(), scope) + } + fn build_impl(&self, handle: crate::Output, local_step: crate::Output, gradient_indices: crate::Output, gradient_values: crate::Output, gradient_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseAccumulatorApplyGradient", |nd| { nd.add_input(handle); nd.add_input(local_step); @@ -105456,47 +126809,65 @@ impl SparseAccumulatorApplyGradient { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.has_known_shape { - nd.set_attr_bool("has_known_shape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.has_known_shape { + nd.set_attr_bool("has_known_shape", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseAccumulatorApplyGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, handle: O0, local_step: O1, gradient_indices: O2, gradient_values: O3, gradient_shape: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), local_step.into(), gradient_indices.into(), gradient_values.into(), gradient_shape.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, local_step: crate::Output, gradient_indices: crate::Output, gradient_values: crate::Output, gradient_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseAccumulatorApplyGradient", |nd| { + nd.add_input(handle); + nd.add_input(local_step); + nd.add_input(gradient_indices); + nd.add_input(gradient_values); + nd.add_input(gradient_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.has_known_shape { + nd.set_attr_bool("has_known_shape", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseAccumulatorApplyGradientInst{op}) + } +} +impl SparseAccumulatorApplyGradientInst { +} +impl Into for SparseAccumulatorApplyGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseAccumulatorApplyGradient::new().build(handle, local_step, gradient_indices, gradient_values, gradient_shape, scope)`. -pub fn sparse_accumulator_apply_gradient< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - handle: O0, - local_step: O1, - gradient_indices: O2, - gradient_values: O3, - gradient_shape: O4, - scope: &mut crate::Scope, -) -> crate::Result { - SparseAccumulatorApplyGradient::new().build( - handle, - local_step, - gradient_indices, - gradient_values, - gradient_shape, - scope, - ) +pub fn sparse_accumulator_apply_gradient, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(handle: O0, local_step: O1, gradient_indices: O2, gradient_values: O3, gradient_shape: O4, scope: &mut crate::Scope) -> crate::Result { + SparseAccumulatorApplyGradient::new().build(handle, local_step, gradient_indices, gradient_values, gradient_shape, scope) } + /// Builder for the `SparseAccumulatorTakeGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseAccumulatorTakeGradient { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseAccumulatorTakeGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseAccumulatorTakeGradientInst { + /// An instance of a fully built SparseAccumulatorTakeGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseAccumulatorTakeGradient { /// Creates a new `SparseAccumulatorTakeGradient`. @@ -105517,49 +126888,75 @@ impl SparseAccumulatorTakeGradient { } /// Builds the `SparseAccumulatorTakeGradient` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - num_required: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, num_required: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), num_required.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - num_required: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, num_required: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseAccumulatorTakeGradient", |nd| { nd.add_input(handle); nd.add_input(num_required); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseAccumulatorTakeGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, num_required: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), num_required.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, num_required: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseAccumulatorTakeGradient", |nd| { + nd.add_input(handle); + nd.add_input(num_required); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseAccumulatorTakeGradientInst{op}) + } +} +impl SparseAccumulatorTakeGradientInst { + /// Returns the 'indices' output of this 'SparseAccumulatorTakeGradient' operation. + pub fn indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'SparseAccumulatorTakeGradient' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'shape' output of this 'SparseAccumulatorTakeGradient' operation. + pub fn shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseAccumulatorTakeGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseAccumulatorTakeGradient::new().build(handle, num_required, scope)`. -pub fn sparse_accumulator_take_gradient< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - num_required: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_accumulator_take_gradient, O1: ::std::convert::Into>(handle: O0, num_required: O1, scope: &mut crate::Scope) -> crate::Result { SparseAccumulatorTakeGradient::new().build(handle, num_required, scope) } + /// Builder for the `SparseAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseAdd { @@ -105567,6 +126964,12 @@ pub struct SparseAdd { Treal: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseAddInst { + /// An instance of a fully built SparseAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseAdd { /// Creates a new `SparseAdd`. @@ -105593,48 +126996,10 @@ impl SparseAdd { } /// Builds the `SparseAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - a_indices: O0, - a_values: O1, - a_shape: O2, - b_indices: O3, - b_values: O4, - b_shape: O5, - thresh: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a_indices.into(), - a_values.into(), - a_shape.into(), - b_indices.into(), - b_values.into(), - b_shape.into(), - thresh.into(), - scope, - ) - } - - fn build_impl( - &self, - a_indices: crate::Output, - a_values: crate::Output, - a_shape: crate::Output, - b_indices: crate::Output, - b_values: crate::Output, - b_shape: crate::Output, - thresh: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, a_indices: O0, a_values: O1, a_shape: O2, b_indices: O3, b_values: O4, b_shape: O5, thresh: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a_indices.into(), a_values.into(), a_shape.into(), b_indices.into(), b_values.into(), b_shape.into(), thresh.into(), scope) + } + fn build_impl(&self, a_indices: crate::Output, a_values: crate::Output, a_shape: crate::Output, b_indices: crate::Output, b_values: crate::Output, b_shape: crate::Output, thresh: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseAdd", |nd| { nd.add_input(a_indices); nd.add_input(a_values); @@ -105646,46 +127011,88 @@ impl SparseAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Treal { - nd.set_attr_type("Treal", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, a_indices: O0, a_values: O1, a_shape: O2, b_indices: O3, b_values: O4, b_shape: O5, thresh: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a_indices.into(), a_values.into(), a_shape.into(), b_indices.into(), b_values.into(), b_shape.into(), thresh.into(), scope) + } + fn build_instance_impl(&self, a_indices: crate::Output, a_values: crate::Output, a_shape: crate::Output, b_indices: crate::Output, b_values: crate::Output, b_shape: crate::Output, thresh: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseAdd", |nd| { + nd.add_input(a_indices); + nd.add_input(a_values); + nd.add_input(a_shape); + nd.add_input(b_indices); + nd.add_input(b_values); + nd.add_input(b_shape); + nd.add_input(thresh); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Treal { + nd.set_attr_type("Treal", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseAddInst{op}) + } +} +impl SparseAddInst { + /// Returns the 'sum_indices' output of this 'SparseAdd' operation. + pub fn sum_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'sum_values' output of this 'SparseAdd' operation. + pub fn sum_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sum_shape' output of this 'SparseAdd' operation. + pub fn sum_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseAdd::new().build(a_indices, a_values, a_shape, b_indices, b_values, b_shape, thresh, scope)`. -pub fn sparse_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - a_indices: O0, - a_values: O1, - a_shape: O2, - b_indices: O3, - b_values: O4, - b_shape: O5, - thresh: O6, - scope: &mut crate::Scope, -) -> crate::Result { - SparseAdd::new().build( - a_indices, a_values, a_shape, b_indices, b_values, b_shape, thresh, scope, - ) +pub fn sparse_add, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(a_indices: O0, a_values: O1, a_shape: O2, b_indices: O3, b_values: O4, b_shape: O5, thresh: O6, scope: &mut crate::Scope) -> crate::Result { + SparseAdd::new().build(a_indices, a_values, a_shape, b_indices, b_values, b_shape, thresh, scope) } + /// Builder for the `SparseAddGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseAddGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseAddGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseAddGradInst { + /// An instance of a fully built SparseAddGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseAddGrad { /// Creates a new `SparseAddGrad`. @@ -105706,36 +127113,10 @@ impl SparseAddGrad { } /// Builds the `SparseAddGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - backprop_val_grad: O0, - a_indices: O1, - b_indices: O2, - sum_indices: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - backprop_val_grad.into(), - a_indices.into(), - b_indices.into(), - sum_indices.into(), - scope, - ) - } - - fn build_impl( - &self, - backprop_val_grad: crate::Output, - a_indices: crate::Output, - b_indices: crate::Output, - sum_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, backprop_val_grad: O0, a_indices: O1, b_indices: O2, sum_indices: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(backprop_val_grad.into(), a_indices.into(), b_indices.into(), sum_indices.into(), scope) + } + fn build_impl(&self, backprop_val_grad: crate::Output, a_indices: crate::Output, b_indices: crate::Output, sum_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseAddGrad", |nd| { nd.add_input(backprop_val_grad); nd.add_input(a_indices); @@ -105744,29 +127125,60 @@ impl SparseAddGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseAddGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, backprop_val_grad: O0, a_indices: O1, b_indices: O2, sum_indices: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(backprop_val_grad.into(), a_indices.into(), b_indices.into(), sum_indices.into(), scope) + } + fn build_instance_impl(&self, backprop_val_grad: crate::Output, a_indices: crate::Output, b_indices: crate::Output, sum_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseAddGrad", |nd| { + nd.add_input(backprop_val_grad); + nd.add_input(a_indices); + nd.add_input(b_indices); + nd.add_input(sum_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseAddGradInst{op}) + } +} +impl SparseAddGradInst { + /// Returns the 'a_val_grad' output of this 'SparseAddGrad' operation. + pub fn a_val_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'b_val_grad' output of this 'SparseAddGrad' operation. + pub fn b_val_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for SparseAddGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseAddGrad::new().build(backprop_val_grad, a_indices, b_indices, sum_indices, scope)`. -pub fn sparse_add_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - backprop_val_grad: O0, - a_indices: O1, - b_indices: O2, - sum_indices: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_add_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(backprop_val_grad: O0, a_indices: O1, b_indices: O2, sum_indices: O3, scope: &mut crate::Scope) -> crate::Result { SparseAddGrad::new().build(backprop_val_grad, a_indices, b_indices, sum_indices, scope) } + /// Builder for the `SparseApplyAdadelta` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyAdadelta { @@ -105775,6 +127187,12 @@ pub struct SparseApplyAdadelta { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyAdadelta' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyAdadeltaInst { + /// An instance of a fully built SparseApplyAdadelta Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyAdadelta { /// Creates a new `SparseApplyAdadelta`. @@ -105789,10 +127207,7 @@ impl SparseApplyAdadelta { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -105810,52 +127225,10 @@ impl SparseApplyAdadelta { } /// Builds the `SparseApplyAdadelta` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - accum_update: O2, - lr: O3, - rho: O4, - epsilon: O5, - grad: O6, - indices: O7, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - accum_update.into(), - lr.into(), - rho.into(), - epsilon.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - accum_update: crate::Output, - lr: crate::Output, - rho: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, indices: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), accum_update.into(), lr.into(), rho.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, accum_update: crate::Output, lr: crate::Output, rho: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyAdadelta", |nd| { nd.add_input(var); nd.add_input(accum); @@ -105868,53 +127241,69 @@ impl SparseApplyAdadelta { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyAdadelta` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(&self, var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, indices: O7, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), accum_update.into(), lr.into(), rho.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, accum_update: crate::Output, lr: crate::Output, rho: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyAdadelta", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(accum_update); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(epsilon); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyAdadeltaInst{op}) + } +} +impl SparseApplyAdadeltaInst { + /// Returns the 'out' output of this 'SparseApplyAdadelta' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyAdadeltaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyAdadelta::new().build(var, accum, accum_update, lr, rho, epsilon, grad, indices, scope)`. -pub fn sparse_apply_adadelta< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, ->( - var: O0, - accum: O1, - accum_update: O2, - lr: O3, - rho: O4, - epsilon: O5, - grad: O6, - indices: O7, - scope: &mut crate::Scope, -) -> crate::Result { - SparseApplyAdadelta::new().build( - var, - accum, - accum_update, - lr, - rho, - epsilon, - grad, - indices, - scope, - ) +pub fn sparse_apply_adadelta, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into>(var: O0, accum: O1, accum_update: O2, lr: O3, rho: O4, epsilon: O5, grad: O6, indices: O7, scope: &mut crate::Scope) -> crate::Result { + SparseApplyAdadelta::new().build(var, accum, accum_update, lr, rho, epsilon, grad, indices, scope) } + /// Builder for the `SparseApplyAdagrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyAdagrad { @@ -105924,6 +127313,12 @@ pub struct SparseApplyAdagrad { update_slots: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyAdagrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyAdagradInst { + /// An instance of a fully built SparseApplyAdagrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyAdagrad { /// Creates a new `SparseApplyAdagrad`. @@ -105938,10 +127333,7 @@ impl SparseApplyAdagrad { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -105965,40 +127357,10 @@ impl SparseApplyAdagrad { } /// Builds the `SparseApplyAdagrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - grad: O3, - indices: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, indices: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyAdagrad", |nd| { nd.add_input(var); nd.add_input(accum); @@ -106008,40 +127370,72 @@ impl SparseApplyAdagrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.update_slots { - nd.set_attr_bool("update_slots", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyAdagrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, indices: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyAdagrad", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyAdagradInst{op}) + } +} +impl SparseApplyAdagradInst { + /// Returns the 'out' output of this 'SparseApplyAdagrad' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyAdagradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyAdagrad::new().build(var, accum, lr, grad, indices, scope)`. -pub fn sparse_apply_adagrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - grad: O3, - indices: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_apply_adagrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(var: O0, accum: O1, lr: O2, grad: O3, indices: O4, scope: &mut crate::Scope) -> crate::Result { SparseApplyAdagrad::new().build(var, accum, lr, grad, indices, scope) } + /// Builder for the `SparseApplyAdagradDA` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyAdagradDA { @@ -106050,6 +127444,12 @@ pub struct SparseApplyAdagradDA { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyAdagradDA' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyAdagradDAInst { + /// An instance of a fully built SparseApplyAdagradDA Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyAdagradDA { /// Creates a new `SparseApplyAdagradDA`. @@ -106064,10 +127464,7 @@ impl SparseApplyAdagradDA { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -106085,56 +127482,10 @@ impl SparseApplyAdagradDA { } /// Builds the `SparseApplyAdagradDA` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - gradient_accumulator: O1, - gradient_squared_accumulator: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - global_step: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - gradient_accumulator.into(), - gradient_squared_accumulator.into(), - grad.into(), - indices.into(), - lr.into(), - l1.into(), - l2.into(), - global_step.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - gradient_accumulator: crate::Output, - gradient_squared_accumulator: crate::Output, - grad: crate::Output, - indices: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - global_step: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, global_step: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), gradient_accumulator.into(), gradient_squared_accumulator.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), global_step.into(), scope) + } + fn build_impl(&self, var: crate::Output, gradient_accumulator: crate::Output, gradient_squared_accumulator: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyAdagradDA", |nd| { nd.add_input(var); nd.add_input(gradient_accumulator); @@ -106148,56 +127499,70 @@ impl SparseApplyAdagradDA { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyAdagradDA` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, global_step: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), gradient_accumulator.into(), gradient_squared_accumulator.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), global_step.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, gradient_accumulator: crate::Output, gradient_squared_accumulator: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, global_step: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyAdagradDA", |nd| { + nd.add_input(var); + nd.add_input(gradient_accumulator); + nd.add_input(gradient_squared_accumulator); + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(global_step); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyAdagradDAInst{op}) + } +} +impl SparseApplyAdagradDAInst { + /// Returns the 'out' output of this 'SparseApplyAdagradDA' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyAdagradDAInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyAdagradDA::new().build(var, gradient_accumulator, gradient_squared_accumulator, grad, indices, lr, l1, l2, global_step, scope)`. -pub fn sparse_apply_adagrad_da< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - gradient_accumulator: O1, - gradient_squared_accumulator: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - global_step: O8, - scope: &mut crate::Scope, -) -> crate::Result { - SparseApplyAdagradDA::new().build( - var, - gradient_accumulator, - gradient_squared_accumulator, - grad, - indices, - lr, - l1, - l2, - global_step, - scope, - ) +pub fn sparse_apply_adagrad_da, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, gradient_accumulator: O1, gradient_squared_accumulator: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, global_step: O8, scope: &mut crate::Scope) -> crate::Result { + SparseApplyAdagradDA::new().build(var, gradient_accumulator, gradient_squared_accumulator, grad, indices, lr, l1, l2, global_step, scope) } + /// Builder for the `SparseApplyAdagradV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyAdagradV2 { @@ -106207,6 +127572,12 @@ pub struct SparseApplyAdagradV2 { update_slots: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyAdagradV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyAdagradV2Inst { + /// An instance of a fully built SparseApplyAdagradV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyAdagradV2 { /// Creates a new `SparseApplyAdagradV2`. @@ -106221,10 +127592,7 @@ impl SparseApplyAdagradV2 { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -106248,44 +127616,10 @@ impl SparseApplyAdagradV2 { } /// Builds the `SparseApplyAdagradV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - epsilon: O3, - grad: O4, - indices: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - epsilon.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyAdagradV2", |nd| { nd.add_input(var); nd.add_input(accum); @@ -106296,42 +127630,73 @@ impl SparseApplyAdagradV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.update_slots { - nd.set_attr_bool("update_slots", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyAdagradV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyAdagradV2", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(epsilon); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.update_slots { + nd.set_attr_bool("update_slots", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyAdagradV2Inst{op}) + } +} +impl SparseApplyAdagradV2Inst { + /// Returns the 'out' output of this 'SparseApplyAdagradV2' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyAdagradV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyAdagradV2::new().build(var, accum, lr, epsilon, grad, indices, scope)`. -pub fn sparse_apply_adagrad_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - epsilon: O3, - grad: O4, - indices: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_apply_adagrad_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(var: O0, accum: O1, lr: O2, epsilon: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { SparseApplyAdagradV2::new().build(var, accum, lr, epsilon, grad, indices, scope) } + /// Builder for the `SparseApplyCenteredRMSProp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyCenteredRMSProp { @@ -106340,6 +127705,12 @@ pub struct SparseApplyCenteredRMSProp { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyCenteredRMSProp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyCenteredRMSPropInst { + /// An instance of a fully built SparseApplyCenteredRMSProp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyCenteredRMSProp { /// Creates a new `SparseApplyCenteredRMSProp`. @@ -106354,10 +127725,7 @@ impl SparseApplyCenteredRMSProp { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -106375,60 +127743,10 @@ impl SparseApplyCenteredRMSProp { } /// Builds the `SparseApplyCenteredRMSProp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - var: O0, - mg: O1, - ms: O2, - mom: O3, - lr: O4, - rho: O5, - momentum: O6, - epsilon: O7, - grad: O8, - indices: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - mg.into(), - ms.into(), - mom.into(), - lr.into(), - rho.into(), - momentum.into(), - epsilon.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - mg: crate::Output, - ms: crate::Output, - mom: crate::Output, - lr: crate::Output, - rho: crate::Output, - momentum: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, indices: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), mg.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, mg: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyCenteredRMSProp", |nd| { nd.add_input(var); nd.add_input(mg); @@ -106443,49 +127761,71 @@ impl SparseApplyCenteredRMSProp { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyCenteredRMSProp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, indices: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), mg.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, mg: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyCenteredRMSProp", |nd| { + nd.add_input(var); + nd.add_input(mg); + nd.add_input(ms); + nd.add_input(mom); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(momentum); + nd.add_input(epsilon); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyCenteredRMSPropInst{op}) + } +} +impl SparseApplyCenteredRMSPropInst { + /// Returns the 'out' output of this 'SparseApplyCenteredRMSProp' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyCenteredRMSPropInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyCenteredRMSProp::new().build(var, mg, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope)`. -pub fn sparse_apply_centered_rmsprop< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - var: O0, - mg: O1, - ms: O2, - mom: O3, - lr: O4, - rho: O5, - momentum: O6, - epsilon: O7, - grad: O8, - indices: O9, - scope: &mut crate::Scope, -) -> crate::Result { - SparseApplyCenteredRMSProp::new().build( - var, mg, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope, - ) +pub fn sparse_apply_centered_rmsprop, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(var: O0, mg: O1, ms: O2, mom: O3, lr: O4, rho: O5, momentum: O6, epsilon: O7, grad: O8, indices: O9, scope: &mut crate::Scope) -> crate::Result { + SparseApplyCenteredRMSProp::new().build(var, mg, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope) } + /// Builder for the `SparseApplyFtrl` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyFtrl { @@ -106495,6 +127835,12 @@ pub struct SparseApplyFtrl { multiply_linear_by_lr: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyFtrl' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyFtrlInst { + /// An instance of a fully built SparseApplyFtrl Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyFtrl { /// Creates a new `SparseApplyFtrl`. @@ -106509,10 +127855,7 @@ impl SparseApplyFtrl { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -106524,10 +127867,7 @@ impl SparseApplyFtrl { } /// Sets the `multiply_linear_by_lr` attribute. - pub fn multiply_linear_by_lr>( - mut self, - value: ArgType, - ) -> Self { + pub fn multiply_linear_by_lr>(mut self, value: ArgType) -> Self { self.multiply_linear_by_lr = ::std::option::Option::Some(value.into()); self } @@ -106539,56 +127879,10 @@ impl SparseApplyFtrl { } /// Builds the `SparseApplyFtrl` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - linear: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - lr_power: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - linear.into(), - grad.into(), - indices.into(), - lr.into(), - l1.into(), - l2.into(), - lr_power.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - linear: crate::Output, - grad: crate::Output, - indices: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - lr_power: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), linear.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), lr_power.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyFtrl", |nd| { nd.add_input(var); nd.add_input(accum); @@ -106602,50 +127896,76 @@ impl SparseApplyFtrl { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { - nd.set_attr_bool("multiply_linear_by_lr", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyFtrl` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), linear.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), lr_power.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyFtrl", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(linear); + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(lr_power); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyFtrlInst{op}) + } +} +impl SparseApplyFtrlInst { + /// Returns the 'out' output of this 'SparseApplyFtrl' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyFtrlInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyFtrl::new().build(var, accum, linear, grad, indices, lr, l1, l2, lr_power, scope)`. -pub fn sparse_apply_ftrl< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - accum: O1, - linear: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - lr_power: O8, - scope: &mut crate::Scope, -) -> crate::Result { - SparseApplyFtrl::new().build( - var, accum, linear, grad, indices, lr, l1, l2, lr_power, scope, - ) +pub fn sparse_apply_ftrl, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, lr_power: O8, scope: &mut crate::Scope) -> crate::Result { + SparseApplyFtrl::new().build(var, accum, linear, grad, indices, lr, l1, l2, lr_power, scope) } + /// Builder for the `SparseApplyFtrlV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyFtrlV2 { @@ -106655,6 +127975,12 @@ pub struct SparseApplyFtrlV2 { multiply_linear_by_lr: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyFtrlV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyFtrlV2Inst { + /// An instance of a fully built SparseApplyFtrlV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyFtrlV2 { /// Creates a new `SparseApplyFtrlV2`. @@ -106669,10 +127995,7 @@ impl SparseApplyFtrlV2 { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -106684,10 +128007,7 @@ impl SparseApplyFtrlV2 { } /// Sets the `multiply_linear_by_lr` attribute. - pub fn multiply_linear_by_lr>( - mut self, - value: ArgType, - ) -> Self { + pub fn multiply_linear_by_lr>(mut self, value: ArgType) -> Self { self.multiply_linear_by_lr = ::std::option::Option::Some(value.into()); self } @@ -106699,60 +128019,10 @@ impl SparseApplyFtrlV2 { } /// Builds the `SparseApplyFtrlV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - linear: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - l2_shrinkage: O8, - lr_power: O9, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - linear.into(), - grad.into(), - indices.into(), - lr.into(), - l1.into(), - l2.into(), - l2_shrinkage.into(), - lr_power.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - linear: crate::Output, - grad: crate::Output, - indices: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - l2_shrinkage: crate::Output, - lr_power: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, l2_shrinkage: O8, lr_power: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), linear.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), l2_shrinkage.into(), lr_power.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, l2_shrinkage: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyFtrlV2", |nd| { nd.add_input(var); nd.add_input(accum); @@ -106767,62 +128037,77 @@ impl SparseApplyFtrlV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { - nd.set_attr_bool("multiply_linear_by_lr", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyFtrlV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(&self, var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, l2_shrinkage: O8, lr_power: O9, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), linear.into(), grad.into(), indices.into(), lr.into(), l1.into(), l2.into(), l2_shrinkage.into(), lr_power.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, linear: crate::Output, grad: crate::Output, indices: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, l2_shrinkage: crate::Output, lr_power: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyFtrlV2", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(linear); + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(l2_shrinkage); + nd.add_input(lr_power); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.multiply_linear_by_lr { + nd.set_attr_bool("multiply_linear_by_lr", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyFtrlV2Inst{op}) + } +} +impl SparseApplyFtrlV2Inst { + /// Returns the 'out' output of this 'SparseApplyFtrlV2' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyFtrlV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyFtrlV2::new().build(var, accum, linear, grad, indices, lr, l1, l2, l2_shrinkage, lr_power, scope)`. -pub fn sparse_apply_ftrl_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - O9: ::std::convert::Into, ->( - var: O0, - accum: O1, - linear: O2, - grad: O3, - indices: O4, - lr: O5, - l1: O6, - l2: O7, - l2_shrinkage: O8, - lr_power: O9, - scope: &mut crate::Scope, -) -> crate::Result { - SparseApplyFtrlV2::new().build( - var, - accum, - linear, - grad, - indices, - lr, - l1, - l2, - l2_shrinkage, - lr_power, - scope, - ) +pub fn sparse_apply_ftrl_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into, O9: ::std::convert::Into>(var: O0, accum: O1, linear: O2, grad: O3, indices: O4, lr: O5, l1: O6, l2: O7, l2_shrinkage: O8, lr_power: O9, scope: &mut crate::Scope) -> crate::Result { + SparseApplyFtrlV2::new().build(var, accum, linear, grad, indices, lr, l1, l2, l2_shrinkage, lr_power, scope) } + /// Builder for the `SparseApplyMomentum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyMomentum { @@ -106832,6 +128117,12 @@ pub struct SparseApplyMomentum { use_nesterov: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyMomentum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyMomentumInst { + /// An instance of a fully built SparseApplyMomentum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyMomentum { /// Creates a new `SparseApplyMomentum`. @@ -106846,10 +128137,7 @@ impl SparseApplyMomentum { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -106873,44 +128161,10 @@ impl SparseApplyMomentum { } /// Builds the `SparseApplyMomentum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - grad: O3, - indices: O4, - momentum: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - grad.into(), - indices.into(), - momentum.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - grad: crate::Output, - indices: crate::Output, - momentum: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, indices: O4, momentum: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), grad.into(), indices.into(), momentum.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, indices: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyMomentum", |nd| { nd.add_input(var); nd.add_input(accum); @@ -106921,42 +128175,73 @@ impl SparseApplyMomentum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_nesterov { - nd.set_attr_bool("use_nesterov", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyMomentum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, grad: O3, indices: O4, momentum: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), grad.into(), indices.into(), momentum.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, grad: crate::Output, indices: crate::Output, momentum: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyMomentum", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(momentum); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_nesterov { + nd.set_attr_bool("use_nesterov", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyMomentumInst{op}) + } +} +impl SparseApplyMomentumInst { + /// Returns the 'out' output of this 'SparseApplyMomentum' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyMomentumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyMomentum::new().build(var, accum, lr, grad, indices, momentum, scope)`. -pub fn sparse_apply_momentum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - grad: O3, - indices: O4, - momentum: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_apply_momentum, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(var: O0, accum: O1, lr: O2, grad: O3, indices: O4, momentum: O5, scope: &mut crate::Scope) -> crate::Result { SparseApplyMomentum::new().build(var, accum, lr, grad, indices, momentum, scope) } + /// Builder for the `SparseApplyProximalAdagrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyProximalAdagrad { @@ -106965,6 +128250,12 @@ pub struct SparseApplyProximalAdagrad { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyProximalAdagrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyProximalAdagradInst { + /// An instance of a fully built SparseApplyProximalAdagrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyProximalAdagrad { /// Creates a new `SparseApplyProximalAdagrad`. @@ -106979,10 +128270,7 @@ impl SparseApplyProximalAdagrad { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -107000,48 +128288,10 @@ impl SparseApplyProximalAdagrad { } /// Builds the `SparseApplyProximalAdagrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - var: O0, - accum: O1, - lr: O2, - l1: O3, - l2: O4, - grad: O5, - indices: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - accum.into(), - lr.into(), - l1.into(), - l2.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - accum: crate::Output, - lr: crate::Output, - l1: crate::Output, - l2: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, indices: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), accum.into(), lr.into(), l1.into(), l2.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyProximalAdagrad", |nd| { nd.add_input(var); nd.add_input(accum); @@ -107053,41 +128303,68 @@ impl SparseApplyProximalAdagrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyProximalAdagrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, indices: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), accum.into(), lr.into(), l1.into(), l2.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, accum: crate::Output, lr: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyProximalAdagrad", |nd| { + nd.add_input(var); + nd.add_input(accum); + nd.add_input(lr); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyProximalAdagradInst{op}) + } +} +impl SparseApplyProximalAdagradInst { + /// Returns the 'out' output of this 'SparseApplyProximalAdagrad' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyProximalAdagradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyProximalAdagrad::new().build(var, accum, lr, l1, l2, grad, indices, scope)`. -pub fn sparse_apply_proximal_adagrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - var: O0, - accum: O1, - lr: O2, - l1: O3, - l2: O4, - grad: O5, - indices: O6, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_apply_proximal_adagrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(var: O0, accum: O1, lr: O2, l1: O3, l2: O4, grad: O5, indices: O6, scope: &mut crate::Scope) -> crate::Result { SparseApplyProximalAdagrad::new().build(var, accum, lr, l1, l2, grad, indices, scope) } + /// Builder for the `SparseApplyProximalGradientDescent` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyProximalGradientDescent { @@ -107096,6 +128373,12 @@ pub struct SparseApplyProximalGradientDescent { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyProximalGradientDescent' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyProximalGradientDescentInst { + /// An instance of a fully built SparseApplyProximalGradientDescent Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyProximalGradientDescent { /// Creates a new `SparseApplyProximalGradientDescent`. @@ -107110,10 +128393,7 @@ impl SparseApplyProximalGradientDescent { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -107131,44 +128411,10 @@ impl SparseApplyProximalGradientDescent { } /// Builds the `SparseApplyProximalGradientDescent` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - var: O0, - alpha: O1, - l1: O2, - l2: O3, - grad: O4, - indices: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - alpha.into(), - l1.into(), - l2.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - alpha: crate::Output, - l1: crate::Output, - l2: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, alpha: O1, l1: O2, l2: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), alpha.into(), l1.into(), l2.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, alpha: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyProximalGradientDescent", |nd| { nd.add_input(var); nd.add_input(alpha); @@ -107179,39 +128425,67 @@ impl SparseApplyProximalGradientDescent { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyProximalGradientDescent` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, var: O0, alpha: O1, l1: O2, l2: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), alpha.into(), l1.into(), l2.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, alpha: crate::Output, l1: crate::Output, l2: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyProximalGradientDescent", |nd| { + nd.add_input(var); + nd.add_input(alpha); + nd.add_input(l1); + nd.add_input(l2); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyProximalGradientDescentInst{op}) + } +} +impl SparseApplyProximalGradientDescentInst { + /// Returns the 'out' output of this 'SparseApplyProximalGradientDescent' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyProximalGradientDescentInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyProximalGradientDescent::new().build(var, alpha, l1, l2, grad, indices, scope)`. -pub fn sparse_apply_proximal_gradient_descent< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - var: O0, - alpha: O1, - l1: O2, - l2: O3, - grad: O4, - indices: O5, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_apply_proximal_gradient_descent, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(var: O0, alpha: O1, l1: O2, l2: O3, grad: O4, indices: O5, scope: &mut crate::Scope) -> crate::Result { SparseApplyProximalGradientDescent::new().build(var, alpha, l1, l2, grad, indices, scope) } + /// Builder for the `SparseApplyRMSProp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseApplyRMSProp { @@ -107220,6 +128494,12 @@ pub struct SparseApplyRMSProp { use_locking: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseApplyRMSProp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseApplyRMSPropInst { + /// An instance of a fully built SparseApplyRMSProp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseApplyRMSProp { /// Creates a new `SparseApplyRMSProp`. @@ -107234,10 +128514,7 @@ impl SparseApplyRMSProp { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -107255,56 +128532,10 @@ impl SparseApplyRMSProp { } /// Builds the `SparseApplyRMSProp` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, - >( - &self, - var: O0, - ms: O1, - mom: O2, - lr: O3, - rho: O4, - momentum: O5, - epsilon: O6, - grad: O7, - indices: O8, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - var.into(), - ms.into(), - mom.into(), - lr.into(), - rho.into(), - momentum.into(), - epsilon.into(), - grad.into(), - indices.into(), - scope, - ) - } - - fn build_impl( - &self, - var: crate::Output, - ms: crate::Output, - mom: crate::Output, - lr: crate::Output, - rho: crate::Output, - momentum: crate::Output, - epsilon: crate::Output, - grad: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, indices: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(var.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_impl(&self, var: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseApplyRMSProp", |nd| { nd.add_input(var); nd.add_input(ms); @@ -107318,47 +128549,70 @@ impl SparseApplyRMSProp { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_locking { - nd.set_attr_bool("use_locking", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseApplyRMSProp` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(&self, var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, indices: O8, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(var.into(), ms.into(), mom.into(), lr.into(), rho.into(), momentum.into(), epsilon.into(), grad.into(), indices.into(), scope) + } + fn build_instance_impl(&self, var: crate::Output, ms: crate::Output, mom: crate::Output, lr: crate::Output, rho: crate::Output, momentum: crate::Output, epsilon: crate::Output, grad: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseApplyRMSProp", |nd| { + nd.add_input(var); + nd.add_input(ms); + nd.add_input(mom); + nd.add_input(lr); + nd.add_input(rho); + nd.add_input(momentum); + nd.add_input(epsilon); + nd.add_input(grad); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_locking { + nd.set_attr_bool("use_locking", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseApplyRMSPropInst{op}) + } +} +impl SparseApplyRMSPropInst { + /// Returns the 'out' output of this 'SparseApplyRMSProp' operation. + pub fn out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseApplyRMSPropInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseApplyRMSProp::new().build(var, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope)`. -pub fn sparse_apply_rmsprop< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - O7: ::std::convert::Into, - O8: ::std::convert::Into, ->( - var: O0, - ms: O1, - mom: O2, - lr: O3, - rho: O4, - momentum: O5, - epsilon: O6, - grad: O7, - indices: O8, - scope: &mut crate::Scope, -) -> crate::Result { - SparseApplyRMSProp::new().build( - var, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope, - ) +pub fn sparse_apply_rmsprop, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into, O7: ::std::convert::Into, O8: ::std::convert::Into>(var: O0, ms: O1, mom: O2, lr: O3, rho: O4, momentum: O5, epsilon: O6, grad: O7, indices: O8, scope: &mut crate::Scope) -> crate::Result { + SparseApplyRMSProp::new().build(var, ms, mom, lr, rho, momentum, epsilon, grad, indices, scope) } + /// Builder for the `SparseBincount` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseBincount { @@ -107367,6 +128621,12 @@ pub struct SparseBincount { binary_output: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseBincount' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseBincountInst { + /// An instance of a fully built SparseBincount Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseBincount { /// Creates a new `SparseBincount`. @@ -107399,40 +128659,10 @@ impl SparseBincount { } /// Builds the `SparseBincount` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - indices: O0, - values: O1, - dense_shape: O2, - size: O3, - weights: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - indices.into(), - values.into(), - dense_shape.into(), - size.into(), - weights.into(), - scope, - ) - } - - fn build_impl( - &self, - indices: crate::Output, - values: crate::Output, - dense_shape: crate::Output, - size: crate::Output, - weights: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, indices: O0, values: O1, dense_shape: O2, size: O3, weights: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(indices.into(), values.into(), dense_shape.into(), size.into(), weights.into(), scope) + } + fn build_impl(&self, indices: crate::Output, values: crate::Output, dense_shape: crate::Output, size: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseBincount", |nd| { nd.add_input(indices); nd.add_input(values); @@ -107442,37 +128672,66 @@ impl SparseBincount { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.binary_output { - nd.set_attr_bool("binary_output", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseBincount` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, indices: O0, values: O1, dense_shape: O2, size: O3, weights: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), values.into(), dense_shape.into(), size.into(), weights.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, values: crate::Output, dense_shape: crate::Output, size: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseBincount", |nd| { + nd.add_input(indices); + nd.add_input(values); + nd.add_input(dense_shape); + nd.add_input(size); + nd.add_input(weights); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseBincountInst{op}) + } +} +impl SparseBincountInst { + /// Returns the 'output' output of this 'SparseBincount' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseBincountInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseBincount::new().build(indices, values, dense_shape, size, weights, scope)`. -pub fn sparse_bincount< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - indices: O0, - values: O1, - dense_shape: O2, - size: O3, - weights: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_bincount, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(indices: O0, values: O1, dense_shape: O2, size: O3, weights: O4, scope: &mut crate::Scope) -> crate::Result { SparseBincount::new().build(indices, values, dense_shape, size, weights, scope) } + /// Builder for the `SparseConcat` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseConcat { @@ -107481,6 +128740,12 @@ pub struct SparseConcat { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseConcat' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseConcatInst { + /// An instance of a fully built SparseConcat Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseConcat { /// Creates a new `SparseConcat`. @@ -107513,27 +128778,10 @@ impl SparseConcat { } /// Builds the `SparseConcat` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - indices: O0, - values: O1, - shapes: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, indices: O0, values: O1, shapes: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(indices.into(), values.into(), shapes.into(), scope) } - - fn build_impl( - &self, - indices: crate::Output, - values: crate::Output, - shapes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, indices: crate::Output, values: crate::Output, shapes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseConcat", |nd| { nd.add_input(indices); nd.add_input(values); @@ -107541,33 +128789,78 @@ impl SparseConcat { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.concat_dim { - nd.set_attr_int("concat_dim", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.concat_dim { + nd.set_attr_int("concat_dim", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseConcat` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, indices: O0, values: O1, shapes: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), values.into(), shapes.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, values: crate::Output, shapes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseConcat", |nd| { + nd.add_input(indices); + nd.add_input(values); + nd.add_input(shapes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.concat_dim { + nd.set_attr_int("concat_dim", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseConcatInst{op}) + } +} +impl SparseConcatInst { + /// Returns the 'output_indices' output of this 'SparseConcat' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseConcat' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_shape' output of this 'SparseConcat' operation. + pub fn output_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseConcatInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseConcat::new().build(indices, values, shapes, scope)`. -pub fn sparse_concat< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - indices: O0, - values: O1, - shapes: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_concat, O1: ::std::convert::Into, O2: ::std::convert::Into>(indices: O0, values: O1, shapes: O2, scope: &mut crate::Scope) -> crate::Result { SparseConcat::new().build(indices, values, shapes, scope) } + /// Builder for the `SparseConditionalAccumulator` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseConditionalAccumulator { @@ -107578,6 +128871,12 @@ pub struct SparseConditionalAccumulator { reduction_type: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseConditionalAccumulator' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseConditionalAccumulatorInst { + /// An instance of a fully built SparseConditionalAccumulator Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseConditionalAccumulator { /// Creates a new `SparseConditionalAccumulator`. @@ -107598,28 +128897,19 @@ impl SparseConditionalAccumulator { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `reduction_type` attribute. - pub fn reduction_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn reduction_type>(mut self, value: ArgType) -> Self { self.reduction_type = ::std::option::Option::Some(value.into()); self } @@ -107631,39 +128921,81 @@ impl SparseConditionalAccumulator { } /// Builds the `SparseConditionalAccumulator` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseConditionalAccumulator", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.reduction_type { - nd.set_attr_string("reduction_type", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction_type { + nd.set_attr_string("reduction_type", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseConditionalAccumulator` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseConditionalAccumulator", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.reduction_type { + nd.set_attr_string("reduction_type", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseConditionalAccumulatorInst{op}) + } +} +impl SparseConditionalAccumulatorInst { + /// Returns the 'handle' output of this 'SparseConditionalAccumulator' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseConditionalAccumulatorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseConditionalAccumulator::new().build(scope)`. -pub fn sparse_conditional_accumulator(scope: &mut crate::Scope) -> crate::Result { +pub fn sparse_conditional_accumulator<>(scope: &mut crate::Scope) -> crate::Result { SparseConditionalAccumulator::new().build(scope) } + /// Builder for the `SparseCountSparseOutput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseCountSparseOutput { @@ -107674,6 +129006,12 @@ pub struct SparseCountSparseOutput { output_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseCountSparseOutput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseCountSparseOutputInst { + /// An instance of a fully built SparseCountSparseOutput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseCountSparseOutput { /// Creates a new `SparseCountSparseOutput`. @@ -107706,10 +129044,7 @@ impl SparseCountSparseOutput { } /// Sets the `output_type` attribute. - pub fn output_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_type>(mut self, value: ArgType) -> Self { self.output_type = ::std::option::Option::Some(value.into()); self } @@ -107721,36 +129056,10 @@ impl SparseCountSparseOutput { } /// Builds the `SparseCountSparseOutput` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - indices: O0, - values: O1, - dense_shape: O2, - weights: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - indices.into(), - values.into(), - dense_shape.into(), - weights.into(), - scope, - ) - } - - fn build_impl( - &self, - indices: crate::Output, - values: crate::Output, - dense_shape: crate::Output, - weights: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, indices: O0, values: O1, dense_shape: O2, weights: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(indices.into(), values.into(), dense_shape.into(), weights.into(), scope) + } + fn build_impl(&self, indices: crate::Output, values: crate::Output, dense_shape: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseCountSparseOutput", |nd| { nd.add_input(indices); nd.add_input(values); @@ -107759,41 +129068,91 @@ impl SparseCountSparseOutput { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.minlength { - nd.set_attr_int("minlength", *value)?; - } - if let ::std::option::Option::Some(value) = &self.maxlength { - nd.set_attr_int("maxlength", *value)?; - } - if let ::std::option::Option::Some(value) = &self.binary_output { - nd.set_attr_bool("binary_output", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_type { - nd.set_attr_type("output_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.minlength { + nd.set_attr_int("minlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.maxlength { + nd.set_attr_int("maxlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseCountSparseOutput` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, indices: O0, values: O1, dense_shape: O2, weights: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), values.into(), dense_shape.into(), weights.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, values: crate::Output, dense_shape: crate::Output, weights: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseCountSparseOutput", |nd| { + nd.add_input(indices); + nd.add_input(values); + nd.add_input(dense_shape); + nd.add_input(weights); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.minlength { + nd.set_attr_int("minlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.maxlength { + nd.set_attr_int("maxlength", *value)?; + } + if let ::std::option::Option::Some(value) = &self.binary_output { + nd.set_attr_bool("binary_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_type { + nd.set_attr_type("output_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseCountSparseOutputInst{op}) + } +} +impl SparseCountSparseOutputInst { + /// Returns the 'output_indices' output of this 'SparseCountSparseOutput' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseCountSparseOutput' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_dense_shape' output of this 'SparseCountSparseOutput' operation. + pub fn output_dense_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseCountSparseOutputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseCountSparseOutput::new().build(indices, values, dense_shape, weights, scope)`. -pub fn sparse_count_sparse_output< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - indices: O0, - values: O1, - dense_shape: O2, - weights: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_count_sparse_output, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(indices: O0, values: O1, dense_shape: O2, weights: O3, scope: &mut crate::Scope) -> crate::Result { SparseCountSparseOutput::new().build(indices, values, dense_shape, weights, scope) } + /// Builder for the `SparseCross` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseCross { @@ -107807,6 +129166,12 @@ pub struct SparseCross { internal_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseCross' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseCrossInst { + /// An instance of a fully built SparseCross Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseCross { /// Creates a new `SparseCross`. @@ -107839,37 +129204,25 @@ impl SparseCross { } /// Sets the `sparse_types` attribute. - pub fn sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_types>>(mut self, value: ArgType) -> Self { self.sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_types` attribute. - pub fn dense_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_types>>(mut self, value: ArgType) -> Self { self.dense_types = ::std::option::Option::Some(value.into()); self } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } /// Sets the `internal_type` attribute. - pub fn internal_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn internal_type>(mut self, value: ArgType) -> Self { self.internal_type = ::std::option::Option::Some(value.into()); self } @@ -107881,36 +129234,10 @@ impl SparseCross { } /// Builds the `SparseCross` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - indices: O0, - values: O1, - shapes: O2, - dense_inputs: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - indices.into(), - values.into(), - shapes.into(), - dense_inputs.into(), - scope, - ) - } - - fn build_impl( - &self, - indices: crate::Output, - values: crate::Output, - shapes: crate::Output, - dense_inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, indices: O0, values: O1, shapes: O2, dense_inputs: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(indices.into(), values.into(), shapes.into(), dense_inputs.into(), scope) + } + fn build_impl(&self, indices: crate::Output, values: crate::Output, shapes: crate::Output, dense_inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseCross", |nd| { nd.add_input(indices); nd.add_input(values); @@ -107919,50 +129246,109 @@ impl SparseCross { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.hashed_output { - nd.set_attr_bool("hashed_output", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_buckets { - nd.set_attr_int("num_buckets", *value)?; - } - if let ::std::option::Option::Some(value) = &self.hash_key { - nd.set_attr_int("hash_key", *value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_types { - nd.set_attr_type_list("sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_types { - nd.set_attr_type_list("dense_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.internal_type { - nd.set_attr_type("internal_type", *value)?; + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hashed_output { + nd.set_attr_bool("hashed_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hash_key { + nd.set_attr_int("hash_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_types { + nd.set_attr_type_list("dense_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.internal_type { + nd.set_attr_type("internal_type", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `SparseCross` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, indices: O0, values: O1, shapes: O2, dense_inputs: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), values.into(), shapes.into(), dense_inputs.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, values: crate::Output, shapes: crate::Output, dense_inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseCross", |nd| { + nd.add_input(indices); + nd.add_input(values); + nd.add_input(shapes); + nd.add_input(dense_inputs); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hashed_output { + nd.set_attr_bool("hashed_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.hash_key { + nd.set_attr_int("hash_key", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_types { + nd.set_attr_type_list("dense_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.internal_type { + nd.set_attr_type("internal_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseCrossInst{op}) + } +} +impl SparseCrossInst { + /// Returns the 'output_indices' output of this 'SparseCross' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseCross' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_shape' output of this 'SparseCross' operation. + pub fn output_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseCrossInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `SparseCross::new().build(indices, values, shapes, dense_inputs, scope)`. -pub fn sparse_cross< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - indices: O0, - values: O1, - shapes: O2, - dense_inputs: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_cross, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(indices: O0, values: O1, shapes: O2, dense_inputs: O3, scope: &mut crate::Scope) -> crate::Result { SparseCross::new().build(indices, values, shapes, dense_inputs, scope) } + /// Builder for the `SparseCrossHashed` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseCrossHashed { @@ -107971,6 +129357,12 @@ pub struct SparseCrossHashed { dense_types: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseCrossHashed' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseCrossHashedInst { + /// An instance of a fully built SparseCrossHashed Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseCrossHashed { /// Creates a new `SparseCrossHashed`. @@ -107985,19 +129377,13 @@ impl SparseCrossHashed { } /// Sets the `sparse_types` attribute. - pub fn sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_types>>(mut self, value: ArgType) -> Self { self.sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_types` attribute. - pub fn dense_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_types>>(mut self, value: ArgType) -> Self { self.dense_types = ::std::option::Option::Some(value.into()); self } @@ -108009,48 +129395,10 @@ impl SparseCrossHashed { } /// Builds the `SparseCrossHashed` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, - >( - &self, - indices: O0, - values: O1, - shapes: O2, - dense_inputs: O3, - num_buckets: O4, - strong_hash: O5, - salt: O6, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - indices.into(), - values.into(), - shapes.into(), - dense_inputs.into(), - num_buckets.into(), - strong_hash.into(), - salt.into(), - scope, - ) - } - - fn build_impl( - &self, - indices: crate::Output, - values: crate::Output, - shapes: crate::Output, - dense_inputs: crate::Output, - num_buckets: crate::Output, - strong_hash: crate::Output, - salt: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, indices: O0, values: O1, shapes: O2, dense_inputs: O3, num_buckets: O4, strong_hash: O5, salt: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(indices.into(), values.into(), shapes.into(), dense_inputs.into(), num_buckets.into(), strong_hash.into(), salt.into(), scope) + } + fn build_impl(&self, indices: crate::Output, values: crate::Output, shapes: crate::Output, dense_inputs: crate::Output, num_buckets: crate::Output, strong_hash: crate::Output, salt: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseCrossHashed", |nd| { nd.add_input(indices); nd.add_input(values); @@ -108062,50 +129410,82 @@ impl SparseCrossHashed { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_types { - nd.set_attr_type_list("sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_types { - nd.set_attr_type_list("dense_types", value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_types { + nd.set_attr_type_list("dense_types", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseCrossHashed` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(&self, indices: O0, values: O1, shapes: O2, dense_inputs: O3, num_buckets: O4, strong_hash: O5, salt: O6, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), values.into(), shapes.into(), dense_inputs.into(), num_buckets.into(), strong_hash.into(), salt.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, values: crate::Output, shapes: crate::Output, dense_inputs: crate::Output, num_buckets: crate::Output, strong_hash: crate::Output, salt: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseCrossHashed", |nd| { + nd.add_input(indices); + nd.add_input(values); + nd.add_input(shapes); + nd.add_input(dense_inputs); + nd.add_input(num_buckets); + nd.add_input(strong_hash); + nd.add_input(salt); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_types { + nd.set_attr_type_list("dense_types", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseCrossHashedInst{op}) + } +} +impl SparseCrossHashedInst { + /// Returns the 'output_indices' output of this 'SparseCrossHashed' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseCrossHashed' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_shape' output of this 'SparseCrossHashed' operation. + pub fn output_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseCrossHashedInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseCrossHashed::new().build(indices, values, shapes, dense_inputs, num_buckets, strong_hash, salt, scope)`. -pub fn sparse_cross_hashed< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - O6: ::std::convert::Into, ->( - indices: O0, - values: O1, - shapes: O2, - dense_inputs: O3, - num_buckets: O4, - strong_hash: O5, - salt: O6, - scope: &mut crate::Scope, -) -> crate::Result { - SparseCrossHashed::new().build( - indices, - values, - shapes, - dense_inputs, - num_buckets, - strong_hash, - salt, - scope, - ) +pub fn sparse_cross_hashed, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into, O6: ::std::convert::Into>(indices: O0, values: O1, shapes: O2, dense_inputs: O3, num_buckets: O4, strong_hash: O5, salt: O6, scope: &mut crate::Scope) -> crate::Result { + SparseCrossHashed::new().build(indices, values, shapes, dense_inputs, num_buckets, strong_hash, salt, scope) } + /// Builder for the `SparseCrossV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseCrossV2 { @@ -108114,6 +129494,12 @@ pub struct SparseCrossV2 { dense_types: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseCrossV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseCrossV2Inst { + /// An instance of a fully built SparseCrossV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseCrossV2 { /// Creates a new `SparseCrossV2`. @@ -108128,19 +129514,13 @@ impl SparseCrossV2 { } /// Sets the `sparse_types` attribute. - pub fn sparse_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn sparse_types>>(mut self, value: ArgType) -> Self { self.sparse_types = ::std::option::Option::Some(value.into()); self } /// Sets the `dense_types` attribute. - pub fn dense_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dense_types>>(mut self, value: ArgType) -> Self { self.dense_types = ::std::option::Option::Some(value.into()); self } @@ -108152,40 +129532,10 @@ impl SparseCrossV2 { } /// Builds the `SparseCrossV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - indices: O0, - values: O1, - shapes: O2, - dense_inputs: O3, - sep: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - indices.into(), - values.into(), - shapes.into(), - dense_inputs.into(), - sep.into(), - scope, - ) - } - - fn build_impl( - &self, - indices: crate::Output, - values: crate::Output, - shapes: crate::Output, - dense_inputs: crate::Output, - sep: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, indices: O0, values: O1, shapes: O2, dense_inputs: O3, sep: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(indices.into(), values.into(), shapes.into(), dense_inputs.into(), sep.into(), scope) + } + fn build_impl(&self, indices: crate::Output, values: crate::Output, shapes: crate::Output, dense_inputs: crate::Output, sep: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseCrossV2", |nd| { nd.add_input(indices); nd.add_input(values); @@ -108195,43 +129545,92 @@ impl SparseCrossV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.sparse_types { - nd.set_attr_type_list("sparse_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.dense_types { - nd.set_attr_type_list("dense_types", value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_types { + nd.set_attr_type_list("dense_types", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseCrossV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, indices: O0, values: O1, shapes: O2, dense_inputs: O3, sep: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), values.into(), shapes.into(), dense_inputs.into(), sep.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, values: crate::Output, shapes: crate::Output, dense_inputs: crate::Output, sep: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseCrossV2", |nd| { + nd.add_input(indices); + nd.add_input(values); + nd.add_input(shapes); + nd.add_input(dense_inputs); + nd.add_input(sep); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sparse_types { + nd.set_attr_type_list("sparse_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.dense_types { + nd.set_attr_type_list("dense_types", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseCrossV2Inst{op}) + } +} +impl SparseCrossV2Inst { + /// Returns the 'output_indices' output of this 'SparseCrossV2' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseCrossV2' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_shape' output of this 'SparseCrossV2' operation. + pub fn output_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseCrossV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseCrossV2::new().build(indices, values, shapes, dense_inputs, sep, scope)`. -pub fn sparse_cross_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - indices: O0, - values: O1, - shapes: O2, - dense_inputs: O3, - sep: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_cross_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(indices: O0, values: O1, shapes: O2, dense_inputs: O3, sep: O4, scope: &mut crate::Scope) -> crate::Result { SparseCrossV2::new().build(indices, values, shapes, dense_inputs, sep, scope) } + /// Builder for the `SparseDenseCwiseAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseDenseCwiseAdd { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseDenseCwiseAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseDenseCwiseAddInst { + /// An instance of a fully built SparseDenseCwiseAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseDenseCwiseAdd { /// Creates a new `SparseDenseCwiseAdd`. @@ -108252,36 +129651,10 @@ impl SparseDenseCwiseAdd { } /// Builds the `SparseDenseCwiseAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - sp_indices: O0, - sp_values: O1, - sp_shape: O2, - dense: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sp_indices.into(), - sp_values.into(), - sp_shape.into(), - dense.into(), - scope, - ) - } - - fn build_impl( - &self, - sp_indices: crate::Output, - sp_values: crate::Output, - sp_shape: crate::Output, - dense: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sp_indices: O0, sp_values: O1, sp_shape: O2, dense: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sp_indices.into(), sp_values.into(), sp_shape.into(), dense.into(), scope) + } + fn build_impl(&self, sp_indices: crate::Output, sp_values: crate::Output, sp_shape: crate::Output, dense: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseDenseCwiseAdd", |nd| { nd.add_input(sp_indices); nd.add_input(sp_values); @@ -108290,35 +129663,65 @@ impl SparseDenseCwiseAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseDenseCwiseAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sp_indices: O0, sp_values: O1, sp_shape: O2, dense: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sp_indices.into(), sp_values.into(), sp_shape.into(), dense.into(), scope) + } + fn build_instance_impl(&self, sp_indices: crate::Output, sp_values: crate::Output, sp_shape: crate::Output, dense: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseDenseCwiseAdd", |nd| { + nd.add_input(sp_indices); + nd.add_input(sp_values); + nd.add_input(sp_shape); + nd.add_input(dense); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseDenseCwiseAddInst{op}) + } +} +impl SparseDenseCwiseAddInst { + /// Returns the 'output' output of this 'SparseDenseCwiseAdd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseDenseCwiseAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseDenseCwiseAdd::new().build(sp_indices, sp_values, sp_shape, dense, scope)`. -pub fn sparse_dense_cwise_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - sp_indices: O0, - sp_values: O1, - sp_shape: O2, - dense: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_dense_cwise_add, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(sp_indices: O0, sp_values: O1, sp_shape: O2, dense: O3, scope: &mut crate::Scope) -> crate::Result { SparseDenseCwiseAdd::new().build(sp_indices, sp_values, sp_shape, dense, scope) } + /// Builder for the `SparseDenseCwiseDiv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseDenseCwiseDiv { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseDenseCwiseDiv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseDenseCwiseDivInst { + /// An instance of a fully built SparseDenseCwiseDiv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseDenseCwiseDiv { /// Creates a new `SparseDenseCwiseDiv`. @@ -108339,36 +129742,10 @@ impl SparseDenseCwiseDiv { } /// Builds the `SparseDenseCwiseDiv` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - sp_indices: O0, - sp_values: O1, - sp_shape: O2, - dense: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sp_indices.into(), - sp_values.into(), - sp_shape.into(), - dense.into(), - scope, - ) - } - - fn build_impl( - &self, - sp_indices: crate::Output, - sp_values: crate::Output, - sp_shape: crate::Output, - dense: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sp_indices: O0, sp_values: O1, sp_shape: O2, dense: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sp_indices.into(), sp_values.into(), sp_shape.into(), dense.into(), scope) + } + fn build_impl(&self, sp_indices: crate::Output, sp_values: crate::Output, sp_shape: crate::Output, dense: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseDenseCwiseDiv", |nd| { nd.add_input(sp_indices); nd.add_input(sp_values); @@ -108377,35 +129754,65 @@ impl SparseDenseCwiseDiv { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseDenseCwiseDiv` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sp_indices: O0, sp_values: O1, sp_shape: O2, dense: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sp_indices.into(), sp_values.into(), sp_shape.into(), dense.into(), scope) + } + fn build_instance_impl(&self, sp_indices: crate::Output, sp_values: crate::Output, sp_shape: crate::Output, dense: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseDenseCwiseDiv", |nd| { + nd.add_input(sp_indices); + nd.add_input(sp_values); + nd.add_input(sp_shape); + nd.add_input(dense); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseDenseCwiseDivInst{op}) + } +} +impl SparseDenseCwiseDivInst { + /// Returns the 'output' output of this 'SparseDenseCwiseDiv' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseDenseCwiseDivInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseDenseCwiseDiv::new().build(sp_indices, sp_values, sp_shape, dense, scope)`. -pub fn sparse_dense_cwise_div< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - sp_indices: O0, - sp_values: O1, - sp_shape: O2, - dense: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_dense_cwise_div, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(sp_indices: O0, sp_values: O1, sp_shape: O2, dense: O3, scope: &mut crate::Scope) -> crate::Result { SparseDenseCwiseDiv::new().build(sp_indices, sp_values, sp_shape, dense, scope) } + /// Builder for the `SparseDenseCwiseMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseDenseCwiseMul { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseDenseCwiseMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseDenseCwiseMulInst { + /// An instance of a fully built SparseDenseCwiseMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseDenseCwiseMul { /// Creates a new `SparseDenseCwiseMul`. @@ -108426,36 +129833,10 @@ impl SparseDenseCwiseMul { } /// Builds the `SparseDenseCwiseMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - sp_indices: O0, - sp_values: O1, - sp_shape: O2, - dense: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sp_indices.into(), - sp_values.into(), - sp_shape.into(), - dense.into(), - scope, - ) - } - - fn build_impl( - &self, - sp_indices: crate::Output, - sp_values: crate::Output, - sp_shape: crate::Output, - dense: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sp_indices: O0, sp_values: O1, sp_shape: O2, dense: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sp_indices.into(), sp_values.into(), sp_shape.into(), dense.into(), scope) + } + fn build_impl(&self, sp_indices: crate::Output, sp_values: crate::Output, sp_shape: crate::Output, dense: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseDenseCwiseMul", |nd| { nd.add_input(sp_indices); nd.add_input(sp_values); @@ -108464,35 +129845,65 @@ impl SparseDenseCwiseMul { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseDenseCwiseMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sp_indices: O0, sp_values: O1, sp_shape: O2, dense: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sp_indices.into(), sp_values.into(), sp_shape.into(), dense.into(), scope) + } + fn build_instance_impl(&self, sp_indices: crate::Output, sp_values: crate::Output, sp_shape: crate::Output, dense: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseDenseCwiseMul", |nd| { + nd.add_input(sp_indices); + nd.add_input(sp_values); + nd.add_input(sp_shape); + nd.add_input(dense); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseDenseCwiseMulInst{op}) + } +} +impl SparseDenseCwiseMulInst { + /// Returns the 'output' output of this 'SparseDenseCwiseMul' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseDenseCwiseMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseDenseCwiseMul::new().build(sp_indices, sp_values, sp_shape, dense, scope)`. -pub fn sparse_dense_cwise_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - sp_indices: O0, - sp_values: O1, - sp_shape: O2, - dense: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_dense_cwise_mul, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(sp_indices: O0, sp_values: O1, sp_shape: O2, dense: O3, scope: &mut crate::Scope) -> crate::Result { SparseDenseCwiseMul::new().build(sp_indices, sp_values, sp_shape, dense, scope) } + /// Builder for the `SparseFillEmptyRows` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseFillEmptyRows { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseFillEmptyRows' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseFillEmptyRowsInst { + /// An instance of a fully built SparseFillEmptyRows Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseFillEmptyRows { /// Creates a new `SparseFillEmptyRows`. @@ -108513,36 +129924,10 @@ impl SparseFillEmptyRows { } /// Builds the `SparseFillEmptyRows` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - indices: O0, - values: O1, - dense_shape: O2, - default_value: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - indices.into(), - values.into(), - dense_shape.into(), - default_value.into(), - scope, - ) - } - - fn build_impl( - &self, - indices: crate::Output, - values: crate::Output, - dense_shape: crate::Output, - default_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, indices: O0, values: O1, dense_shape: O2, default_value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(indices.into(), values.into(), dense_shape.into(), default_value.into(), scope) + } + fn build_impl(&self, indices: crate::Output, values: crate::Output, dense_shape: crate::Output, default_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseFillEmptyRows", |nd| { nd.add_input(indices); nd.add_input(values); @@ -108551,35 +129936,86 @@ impl SparseFillEmptyRows { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseFillEmptyRows` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, indices: O0, values: O1, dense_shape: O2, default_value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), values.into(), dense_shape.into(), default_value.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, values: crate::Output, dense_shape: crate::Output, default_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseFillEmptyRows", |nd| { + nd.add_input(indices); + nd.add_input(values); + nd.add_input(dense_shape); + nd.add_input(default_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseFillEmptyRowsInst{op}) + } +} +impl SparseFillEmptyRowsInst { + /// Returns the 'output_indices' output of this 'SparseFillEmptyRows' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseFillEmptyRows' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'empty_row_indicator' output of this 'SparseFillEmptyRows' operation. + pub fn empty_row_indicator(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } + /// Returns the 'reverse_index_map' output of this 'SparseFillEmptyRows' operation. + pub fn reverse_index_map(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 3 + } + } +} +impl Into for SparseFillEmptyRowsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseFillEmptyRows::new().build(indices, values, dense_shape, default_value, scope)`. -pub fn sparse_fill_empty_rows< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - indices: O0, - values: O1, - dense_shape: O2, - default_value: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_fill_empty_rows, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(indices: O0, values: O1, dense_shape: O2, default_value: O3, scope: &mut crate::Scope) -> crate::Result { SparseFillEmptyRows::new().build(indices, values, dense_shape, default_value, scope) } + /// Builder for the `SparseFillEmptyRowsGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseFillEmptyRowsGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseFillEmptyRowsGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseFillEmptyRowsGradInst { + /// An instance of a fully built SparseFillEmptyRowsGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseFillEmptyRowsGrad { /// Creates a new `SparseFillEmptyRowsGrad`. @@ -108600,49 +130036,68 @@ impl SparseFillEmptyRowsGrad { } /// Builds the `SparseFillEmptyRowsGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - reverse_index_map: O0, - grad_values: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, reverse_index_map: O0, grad_values: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(reverse_index_map.into(), grad_values.into(), scope) } - - fn build_impl( - &self, - reverse_index_map: crate::Output, - grad_values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, reverse_index_map: crate::Output, grad_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseFillEmptyRowsGrad", |nd| { nd.add_input(reverse_index_map); nd.add_input(grad_values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseFillEmptyRowsGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, reverse_index_map: O0, grad_values: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(reverse_index_map.into(), grad_values.into(), scope) + } + fn build_instance_impl(&self, reverse_index_map: crate::Output, grad_values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseFillEmptyRowsGrad", |nd| { + nd.add_input(reverse_index_map); + nd.add_input(grad_values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseFillEmptyRowsGradInst{op}) + } +} +impl SparseFillEmptyRowsGradInst { + /// Returns the 'd_values' output of this 'SparseFillEmptyRowsGrad' operation. + pub fn d_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'd_default_value' output of this 'SparseFillEmptyRowsGrad' operation. + pub fn d_default_value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for SparseFillEmptyRowsGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseFillEmptyRowsGrad::new().build(reverse_index_map, grad_values, scope)`. -pub fn sparse_fill_empty_rows_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - reverse_index_map: O0, - grad_values: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_fill_empty_rows_grad, O1: ::std::convert::Into>(reverse_index_map: O0, grad_values: O1, scope: &mut crate::Scope) -> crate::Result { SparseFillEmptyRowsGrad::new().build(reverse_index_map, grad_values, scope) } + /// Builder for the `SparseMatMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatMul { @@ -108654,6 +130109,12 @@ pub struct SparseMatMul { Tb: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatMulInst { + /// An instance of a fully built SparseMatMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatMul { /// Creates a new `SparseMatMul`. @@ -108704,70 +130165,103 @@ impl SparseMatMul { } /// Builds the `SparseMatMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), b.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatMul", |nd| { nd.add_input(a); nd.add_input(b); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.a_is_sparse { - nd.set_attr_bool("a_is_sparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.b_is_sparse { - nd.set_attr_bool("b_is_sparse", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Ta { - nd.set_attr_type("Ta", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tb { - nd.set_attr_type("Tb", *value)?; - } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.a_is_sparse { + nd.set_attr_bool("a_is_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.b_is_sparse { + nd.set_attr_bool("b_is_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Ta { + nd.set_attr_type("Ta", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tb { + nd.set_attr_type("Tb", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatMul", |nd| { + nd.add_input(a); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.a_is_sparse { + nd.set_attr_bool("a_is_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.b_is_sparse { + nd.set_attr_bool("b_is_sparse", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Ta { + nd.set_attr_type("Ta", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tb { + nd.set_attr_type("Tb", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatMulInst{op}) + } +} +impl SparseMatMulInst { + /// Returns the 'product' output of this 'SparseMatMul' operation. + pub fn product(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatMul::new().build(a, b, scope)`. -pub fn sparse_mat_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - a: O0, - b: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_mat_mul, O1: ::std::convert::Into>(a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { SparseMatMul::new().build(a, b, scope) } + /// Builder for the `SparseMatrixAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixAdd { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixAddInst { + /// An instance of a fully built SparseMatrixAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixAdd { /// Creates a new `SparseMatrixAdd`. @@ -108788,30 +130282,10 @@ impl SparseMatrixAdd { } /// Builds the `SparseMatrixAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - alpha: O2, - beta: O3, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, a: O0, b: O1, alpha: O2, beta: O3, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), b.into(), alpha.into(), beta.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - alpha: crate::Output, - beta: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, b: crate::Output, alpha: crate::Output, beta: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixAdd", |nd| { nd.add_input(a); nd.add_input(b); @@ -108820,29 +130294,53 @@ impl SparseMatrixAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, a: O0, b: O1, alpha: O2, beta: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), alpha.into(), beta.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, alpha: crate::Output, beta: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixAdd", |nd| { + nd.add_input(a); + nd.add_input(b); + nd.add_input(alpha); + nd.add_input(beta); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixAddInst{op}) + } +} +impl SparseMatrixAddInst { + /// Returns the 'c' output of this 'SparseMatrixAdd' operation. + pub fn c(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixAdd::new().build(a, b, alpha, beta, scope)`. -pub fn sparse_matrix_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - a: O0, - b: O1, - alpha: O2, - beta: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_add, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(a: O0, b: O1, alpha: O2, beta: O3, scope: &mut crate::Scope) -> crate::Result { SparseMatrixAdd::new().build(a, b, alpha, beta, scope) } + /// Builder for the `SparseMatrixMatMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixMatMul { @@ -108855,6 +130353,12 @@ pub struct SparseMatrixMatMul { conjugate_output: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixMatMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixMatMulInst { + /// An instance of a fully built SparseMatrixMatMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixMatMul { /// Creates a new `SparseMatrixMatMul`. @@ -108911,73 +130415,109 @@ impl SparseMatrixMatMul { } /// Builds the `SparseMatrixMatMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), b.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixMatMul", |nd| { nd.add_input(a); nd.add_input(b); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adjoint_a { - nd.set_attr_bool("adjoint_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adjoint_b { - nd.set_attr_bool("adjoint_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_output { - nd.set_attr_bool("transpose_output", *value)?; - } - if let ::std::option::Option::Some(value) = &self.conjugate_output { - nd.set_attr_bool("conjugate_output", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_a { + nd.set_attr_bool("adjoint_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_b { + nd.set_attr_bool("adjoint_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_output { + nd.set_attr_bool("transpose_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.conjugate_output { + nd.set_attr_bool("conjugate_output", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixMatMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixMatMul", |nd| { + nd.add_input(a); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_a { + nd.set_attr_bool("adjoint_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_b { + nd.set_attr_bool("adjoint_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_output { + nd.set_attr_bool("transpose_output", *value)?; + } + if let ::std::option::Option::Some(value) = &self.conjugate_output { + nd.set_attr_bool("conjugate_output", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixMatMulInst{op}) + } +} +impl SparseMatrixMatMulInst { + /// Returns the 'output' output of this 'SparseMatrixMatMul' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixMatMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixMatMul::new().build(a, b, scope)`. -pub fn sparse_matrix_mat_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - a: O0, - b: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_mat_mul, O1: ::std::convert::Into>(a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { SparseMatrixMatMul::new().build(a, b, scope) } + /// Builder for the `SparseMatrixMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixMul { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixMulInst { + /// An instance of a fully built SparseMatrixMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixMul { /// Creates a new `SparseMatrixMul`. @@ -108998,54 +130538,72 @@ impl SparseMatrixMul { } /// Builds the `SparseMatrixMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), b.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixMul", |nd| { nd.add_input(a); nd.add_input(b); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixMul", |nd| { + nd.add_input(a); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixMulInst{op}) + } +} +impl SparseMatrixMulInst { + /// Returns the 'output' output of this 'SparseMatrixMul' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixMul::new().build(a, b, scope)`. -pub fn sparse_matrix_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - a: O0, - b: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_mul, O1: ::std::convert::Into>(a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { SparseMatrixMul::new().build(a, b, scope) } + /// Builder for the `SparseMatrixNNZ` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixNNZ { control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixNNZ' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixNNZInst { + /// An instance of a fully built SparseMatrixNNZ Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixNNZ { /// Creates a new `SparseMatrixNNZ`. @@ -109060,19 +130618,10 @@ impl SparseMatrixNNZ { } /// Builds the `SparseMatrixNNZ` operation. - pub fn build>( - &self, - sparse_matrix: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, sparse_matrix: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(sparse_matrix.into(), scope) } - - fn build_impl( - &self, - sparse_matrix: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, sparse_matrix: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixNNZ", |nd| { nd.add_input(sparse_matrix); for op in &self.control_inputs { @@ -109081,20 +130630,52 @@ impl SparseMatrixNNZ { ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixNNZ` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, sparse_matrix: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_matrix.into(), scope) + } + fn build_instance_impl(&self, sparse_matrix: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixNNZ", |nd| { + nd.add_input(sparse_matrix); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixNNZInst{op}) + } +} +impl SparseMatrixNNZInst { + /// Returns the 'nnz' output of this 'SparseMatrixNNZ' operation. + pub fn nnz(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixNNZInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixNNZ::new().build(sparse_matrix, scope)`. -pub fn sparse_matrix_nnz>( - sparse_matrix: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_nnz>(sparse_matrix: O0, scope: &mut crate::Scope) -> crate::Result { SparseMatrixNNZ::new().build(sparse_matrix, scope) } + /// Builder for the `SparseMatrixOrderingAMD` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixOrderingAMD { control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixOrderingAMD' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixOrderingAMDInst { + /// An instance of a fully built SparseMatrixOrderingAMD Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixOrderingAMD { /// Creates a new `SparseMatrixOrderingAMD`. @@ -109109,19 +130690,10 @@ impl SparseMatrixOrderingAMD { } /// Builds the `SparseMatrixOrderingAMD` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixOrderingAMD", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -109130,21 +130702,53 @@ impl SparseMatrixOrderingAMD { ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixOrderingAMD` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixOrderingAMD", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixOrderingAMDInst{op}) + } +} +impl SparseMatrixOrderingAMDInst { + /// Returns the 'output' output of this 'SparseMatrixOrderingAMD' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixOrderingAMDInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixOrderingAMD::new().build(input, scope)`. -pub fn sparse_matrix_ordering_amd>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_ordering_amd>(input: O0, scope: &mut crate::Scope) -> crate::Result { SparseMatrixOrderingAMD::new().build(input, scope) } + /// Builder for the `SparseMatrixSoftmax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixSoftmax { type_: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixSoftmax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixSoftmaxInst { + /// An instance of a fully built SparseMatrixSoftmax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixSoftmax { /// Creates a new `SparseMatrixSoftmax`. @@ -109165,45 +130769,71 @@ impl SparseMatrixSoftmax { } /// Builds the `SparseMatrixSoftmax` operation. - pub fn build>( - &self, - logits: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, logits: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(logits.into(), scope) } - - fn build_impl( - &self, - logits: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, logits: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixSoftmax", |nd| { nd.add_input(logits); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.type_ { - nd.set_attr_type("type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixSoftmax` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, logits: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(logits.into(), scope) + } + fn build_instance_impl(&self, logits: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixSoftmax", |nd| { + nd.add_input(logits); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixSoftmaxInst{op}) + } +} +impl SparseMatrixSoftmaxInst { + /// Returns the 'softmax' output of this 'SparseMatrixSoftmax' operation. + pub fn softmax(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixSoftmaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixSoftmax::new().build(logits, scope)`. -pub fn sparse_matrix_softmax>( - logits: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_softmax>(logits: O0, scope: &mut crate::Scope) -> crate::Result { SparseMatrixSoftmax::new().build(logits, scope) } + /// Builder for the `SparseMatrixSoftmaxGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixSoftmaxGrad { type_: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixSoftmaxGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixSoftmaxGradInst { + /// An instance of a fully built SparseMatrixSoftmaxGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixSoftmaxGrad { /// Creates a new `SparseMatrixSoftmaxGrad`. @@ -109224,55 +130854,73 @@ impl SparseMatrixSoftmaxGrad { } /// Builds the `SparseMatrixSoftmaxGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - softmax: O0, - grad_softmax: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, softmax: O0, grad_softmax: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(softmax.into(), grad_softmax.into(), scope) } - - fn build_impl( - &self, - softmax: crate::Output, - grad_softmax: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, softmax: crate::Output, grad_softmax: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixSoftmaxGrad", |nd| { nd.add_input(softmax); nd.add_input(grad_softmax); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.type_ { - nd.set_attr_type("type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixSoftmaxGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, softmax: O0, grad_softmax: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(softmax.into(), grad_softmax.into(), scope) + } + fn build_instance_impl(&self, softmax: crate::Output, grad_softmax: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixSoftmaxGrad", |nd| { + nd.add_input(softmax); + nd.add_input(grad_softmax); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixSoftmaxGradInst{op}) + } +} +impl SparseMatrixSoftmaxGradInst { + /// Returns the 'gradient' output of this 'SparseMatrixSoftmaxGrad' operation. + pub fn gradient(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixSoftmaxGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixSoftmaxGrad::new().build(softmax, grad_softmax, scope)`. -pub fn sparse_matrix_softmax_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - softmax: O0, - grad_softmax: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_softmax_grad, O1: ::std::convert::Into>(softmax: O0, grad_softmax: O1, scope: &mut crate::Scope) -> crate::Result { SparseMatrixSoftmaxGrad::new().build(softmax, grad_softmax, scope) } + /// Builder for the `SparseMatrixSparseCholesky` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixSparseCholesky { type_: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixSparseCholesky' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixSparseCholeskyInst { + /// An instance of a fully built SparseMatrixSparseCholesky Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixSparseCholesky { /// Creates a new `SparseMatrixSparseCholesky`. @@ -109293,49 +130941,61 @@ impl SparseMatrixSparseCholesky { } /// Builds the `SparseMatrixSparseCholesky` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - permutation: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, permutation: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), permutation.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - permutation: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, permutation: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixSparseCholesky", |nd| { nd.add_input(input); nd.add_input(permutation); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.type_ { - nd.set_attr_type("type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixSparseCholesky` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, permutation: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), permutation.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, permutation: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixSparseCholesky", |nd| { + nd.add_input(input); + nd.add_input(permutation); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixSparseCholeskyInst{op}) + } +} +impl SparseMatrixSparseCholeskyInst { + /// Returns the 'output' output of this 'SparseMatrixSparseCholesky' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixSparseCholeskyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixSparseCholesky::new().build(input, permutation, scope)`. -pub fn sparse_matrix_sparse_cholesky< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - permutation: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_sparse_cholesky, O1: ::std::convert::Into>(input: O0, permutation: O1, scope: &mut crate::Scope) -> crate::Result { SparseMatrixSparseCholesky::new().build(input, permutation, scope) } + /// Builder for the `SparseMatrixSparseMatMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixSparseMatMul { @@ -109346,6 +131006,12 @@ pub struct SparseMatrixSparseMatMul { adjoint_b: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixSparseMatMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixSparseMatMulInst { + /// An instance of a fully built SparseMatrixSparseMatMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixSparseMatMul { /// Creates a new `SparseMatrixSparseMatMul`. @@ -109390,61 +131056,85 @@ impl SparseMatrixSparseMatMul { } /// Builds the `SparseMatrixSparseMatMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - a: O0, - b: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(a.into(), b.into(), scope) } - - fn build_impl( - &self, - a: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixSparseMatMul", |nd| { nd.add_input(a); nd.add_input(b); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.type_ { - nd.set_attr_type("type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_a { - nd.set_attr_bool("transpose_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.transpose_b { - nd.set_attr_bool("transpose_b", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adjoint_a { - nd.set_attr_bool("adjoint_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adjoint_b { - nd.set_attr_bool("adjoint_b", *value)?; - } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_a { + nd.set_attr_bool("adjoint_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_b { + nd.set_attr_bool("adjoint_b", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixSparseMatMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a.into(), b.into(), scope) + } + fn build_instance_impl(&self, a: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixSparseMatMul", |nd| { + nd.add_input(a); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_a { + nd.set_attr_bool("transpose_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.transpose_b { + nd.set_attr_bool("transpose_b", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_a { + nd.set_attr_bool("adjoint_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_b { + nd.set_attr_bool("adjoint_b", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixSparseMatMulInst{op}) + } +} +impl SparseMatrixSparseMatMulInst { + /// Returns the 'c' output of this 'SparseMatrixSparseMatMul' operation. + pub fn c(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixSparseMatMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixSparseMatMul::new().build(a, b, scope)`. -pub fn sparse_matrix_sparse_mat_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - a: O0, - b: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_sparse_mat_mul, O1: ::std::convert::Into>(a: O0, b: O1, scope: &mut crate::Scope) -> crate::Result { SparseMatrixSparseMatMul::new().build(a, b, scope) } + /// Builder for the `SparseMatrixTranspose` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixTranspose { @@ -109452,6 +131142,12 @@ pub struct SparseMatrixTranspose { type_: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixTranspose' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixTransposeInst { + /// An instance of a fully built SparseMatrixTranspose Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixTranspose { /// Creates a new `SparseMatrixTranspose`. @@ -109478,48 +131174,77 @@ impl SparseMatrixTranspose { } /// Builds the `SparseMatrixTranspose` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixTranspose", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.conjugate { - nd.set_attr_bool("conjugate", *value)?; - } - if let ::std::option::Option::Some(value) = &self.type_ { - nd.set_attr_type("type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.conjugate { + nd.set_attr_bool("conjugate", *value)?; + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixTranspose` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixTranspose", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.conjugate { + nd.set_attr_bool("conjugate", *value)?; + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixTransposeInst{op}) + } +} +impl SparseMatrixTransposeInst { + /// Returns the 'output' output of this 'SparseMatrixTranspose' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixTransposeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixTranspose::new().build(input, scope)`. -pub fn sparse_matrix_transpose>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_transpose>(input: O0, scope: &mut crate::Scope) -> crate::Result { SparseMatrixTranspose::new().build(input, scope) } + /// Builder for the `SparseMatrixZeros` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseMatrixZeros { type_: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseMatrixZeros' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseMatrixZerosInst { + /// An instance of a fully built SparseMatrixZeros Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseMatrixZeros { /// Creates a new `SparseMatrixZeros`. @@ -109540,39 +131265,59 @@ impl SparseMatrixZeros { } /// Builds the `SparseMatrixZeros` operation. - pub fn build>( - &self, - dense_shape: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, dense_shape: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(dense_shape.into(), scope) } - - fn build_impl( - &self, - dense_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, dense_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseMatrixZeros", |nd| { nd.add_input(dense_shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.type_ { - nd.set_attr_type("type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseMatrixZeros` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, dense_shape: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dense_shape.into(), scope) + } + fn build_instance_impl(&self, dense_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseMatrixZeros", |nd| { + nd.add_input(dense_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.type_ { + nd.set_attr_type("type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseMatrixZerosInst{op}) + } +} +impl SparseMatrixZerosInst { + /// Returns the 'sparse_matrix' output of this 'SparseMatrixZeros' operation. + pub fn sparse_matrix(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseMatrixZerosInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseMatrixZeros::new().build(dense_shape, scope)`. -pub fn sparse_matrix_zeros>( - dense_shape: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_matrix_zeros>(dense_shape: O0, scope: &mut crate::Scope) -> crate::Result { SparseMatrixZeros::new().build(dense_shape, scope) } + /// Builder for the `SparseReduceMax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseReduceMax { @@ -109580,6 +131325,12 @@ pub struct SparseReduceMax { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseReduceMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseReduceMaxInst { + /// An instance of a fully built SparseReduceMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseReduceMax { /// Creates a new `SparseReduceMax`. @@ -109606,36 +131357,10 @@ impl SparseReduceMax { } /// Builds the `SparseReduceMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_indices: O0, - input_values: O1, - input_shape: O2, - reduction_axes: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_indices.into(), - input_values.into(), - input_shape.into(), - reduction_axes.into(), - scope, - ) - } - - fn build_impl( - &self, - input_indices: crate::Output, - input_values: crate::Output, - input_shape: crate::Output, - reduction_axes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_indices.into(), input_values.into(), input_shape.into(), reduction_axes.into(), scope) + } + fn build_impl(&self, input_indices: crate::Output, input_values: crate::Output, input_shape: crate::Output, reduction_axes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseReduceMax", |nd| { nd.add_input(input_indices); nd.add_input(input_values); @@ -109644,38 +131369,59 @@ impl SparseReduceMax { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseReduceMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_indices.into(), input_values.into(), input_shape.into(), reduction_axes.into(), scope) + } + fn build_instance_impl(&self, input_indices: crate::Output, input_values: crate::Output, input_shape: crate::Output, reduction_axes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseReduceMax", |nd| { + nd.add_input(input_indices); + nd.add_input(input_values); + nd.add_input(input_shape); + nd.add_input(reduction_axes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseReduceMaxInst{op}) + } +} +impl SparseReduceMaxInst { + /// Returns the 'output' output of this 'SparseReduceMax' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseReduceMaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseReduceMax::new().build(input_indices, input_values, input_shape, reduction_axes, scope)`. -pub fn sparse_reduce_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_indices: O0, - input_values: O1, - input_shape: O2, - reduction_axes: O3, - scope: &mut crate::Scope, -) -> crate::Result { - SparseReduceMax::new().build( - input_indices, - input_values, - input_shape, - reduction_axes, - scope, - ) +pub fn sparse_reduce_max, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + SparseReduceMax::new().build(input_indices, input_values, input_shape, reduction_axes, scope) } + /// Builder for the `SparseReduceMaxSparse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseReduceMaxSparse { @@ -109683,6 +131429,12 @@ pub struct SparseReduceMaxSparse { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseReduceMaxSparse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseReduceMaxSparseInst { + /// An instance of a fully built SparseReduceMaxSparse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseReduceMaxSparse { /// Creates a new `SparseReduceMaxSparse`. @@ -109709,36 +131461,10 @@ impl SparseReduceMaxSparse { } /// Builds the `SparseReduceMaxSparse` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_indices: O0, - input_values: O1, - input_shape: O2, - reduction_axes: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_indices.into(), - input_values.into(), - input_shape.into(), - reduction_axes.into(), - scope, - ) - } - - fn build_impl( - &self, - input_indices: crate::Output, - input_values: crate::Output, - input_shape: crate::Output, - reduction_axes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_indices.into(), input_values.into(), input_shape.into(), reduction_axes.into(), scope) + } + fn build_impl(&self, input_indices: crate::Output, input_values: crate::Output, input_shape: crate::Output, reduction_axes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseReduceMaxSparse", |nd| { nd.add_input(input_indices); nd.add_input(input_values); @@ -109747,38 +131473,73 @@ impl SparseReduceMaxSparse { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseReduceMaxSparse` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_indices.into(), input_values.into(), input_shape.into(), reduction_axes.into(), scope) + } + fn build_instance_impl(&self, input_indices: crate::Output, input_values: crate::Output, input_shape: crate::Output, reduction_axes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseReduceMaxSparse", |nd| { + nd.add_input(input_indices); + nd.add_input(input_values); + nd.add_input(input_shape); + nd.add_input(reduction_axes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseReduceMaxSparseInst{op}) + } +} +impl SparseReduceMaxSparseInst { + /// Returns the 'output_indices' output of this 'SparseReduceMaxSparse' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseReduceMaxSparse' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_shape' output of this 'SparseReduceMaxSparse' operation. + pub fn output_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseReduceMaxSparseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseReduceMaxSparse::new().build(input_indices, input_values, input_shape, reduction_axes, scope)`. -pub fn sparse_reduce_max_sparse< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_indices: O0, - input_values: O1, - input_shape: O2, - reduction_axes: O3, - scope: &mut crate::Scope, -) -> crate::Result { - SparseReduceMaxSparse::new().build( - input_indices, - input_values, - input_shape, - reduction_axes, - scope, - ) +pub fn sparse_reduce_max_sparse, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + SparseReduceMaxSparse::new().build(input_indices, input_values, input_shape, reduction_axes, scope) } + /// Builder for the `SparseReduceSum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseReduceSum { @@ -109786,6 +131547,12 @@ pub struct SparseReduceSum { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseReduceSum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseReduceSumInst { + /// An instance of a fully built SparseReduceSum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseReduceSum { /// Creates a new `SparseReduceSum`. @@ -109812,36 +131579,10 @@ impl SparseReduceSum { } /// Builds the `SparseReduceSum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_indices: O0, - input_values: O1, - input_shape: O2, - reduction_axes: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_indices.into(), - input_values.into(), - input_shape.into(), - reduction_axes.into(), - scope, - ) - } - - fn build_impl( - &self, - input_indices: crate::Output, - input_values: crate::Output, - input_shape: crate::Output, - reduction_axes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_indices.into(), input_values.into(), input_shape.into(), reduction_axes.into(), scope) + } + fn build_impl(&self, input_indices: crate::Output, input_values: crate::Output, input_shape: crate::Output, reduction_axes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseReduceSum", |nd| { nd.add_input(input_indices); nd.add_input(input_values); @@ -109850,38 +131591,59 @@ impl SparseReduceSum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseReduceSum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_indices.into(), input_values.into(), input_shape.into(), reduction_axes.into(), scope) + } + fn build_instance_impl(&self, input_indices: crate::Output, input_values: crate::Output, input_shape: crate::Output, reduction_axes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseReduceSum", |nd| { + nd.add_input(input_indices); + nd.add_input(input_values); + nd.add_input(input_shape); + nd.add_input(reduction_axes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseReduceSumInst{op}) + } +} +impl SparseReduceSumInst { + /// Returns the 'output' output of this 'SparseReduceSum' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseReduceSumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseReduceSum::new().build(input_indices, input_values, input_shape, reduction_axes, scope)`. -pub fn sparse_reduce_sum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_indices: O0, - input_values: O1, - input_shape: O2, - reduction_axes: O3, - scope: &mut crate::Scope, -) -> crate::Result { - SparseReduceSum::new().build( - input_indices, - input_values, - input_shape, - reduction_axes, - scope, - ) +pub fn sparse_reduce_sum, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + SparseReduceSum::new().build(input_indices, input_values, input_shape, reduction_axes, scope) } + /// Builder for the `SparseReduceSumSparse` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseReduceSumSparse { @@ -109889,6 +131651,12 @@ pub struct SparseReduceSumSparse { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseReduceSumSparse' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseReduceSumSparseInst { + /// An instance of a fully built SparseReduceSumSparse Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseReduceSumSparse { /// Creates a new `SparseReduceSumSparse`. @@ -109915,36 +131683,10 @@ impl SparseReduceSumSparse { } /// Builds the `SparseReduceSumSparse` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input_indices: O0, - input_values: O1, - input_shape: O2, - reduction_axes: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_indices.into(), - input_values.into(), - input_shape.into(), - reduction_axes.into(), - scope, - ) - } - - fn build_impl( - &self, - input_indices: crate::Output, - input_values: crate::Output, - input_shape: crate::Output, - reduction_axes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_indices.into(), input_values.into(), input_shape.into(), reduction_axes.into(), scope) + } + fn build_impl(&self, input_indices: crate::Output, input_values: crate::Output, input_shape: crate::Output, reduction_axes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseReduceSumSparse", |nd| { nd.add_input(input_indices); nd.add_input(input_values); @@ -109953,44 +131695,85 @@ impl SparseReduceSumSparse { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseReduceSumSparse` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_indices.into(), input_values.into(), input_shape.into(), reduction_axes.into(), scope) + } + fn build_instance_impl(&self, input_indices: crate::Output, input_values: crate::Output, input_shape: crate::Output, reduction_axes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseReduceSumSparse", |nd| { + nd.add_input(input_indices); + nd.add_input(input_values); + nd.add_input(input_shape); + nd.add_input(reduction_axes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseReduceSumSparseInst{op}) + } +} +impl SparseReduceSumSparseInst { + /// Returns the 'output_indices' output of this 'SparseReduceSumSparse' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseReduceSumSparse' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_shape' output of this 'SparseReduceSumSparse' operation. + pub fn output_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseReduceSumSparseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseReduceSumSparse::new().build(input_indices, input_values, input_shape, reduction_axes, scope)`. -pub fn sparse_reduce_sum_sparse< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input_indices: O0, - input_values: O1, - input_shape: O2, - reduction_axes: O3, - scope: &mut crate::Scope, -) -> crate::Result { - SparseReduceSumSparse::new().build( - input_indices, - input_values, - input_shape, - reduction_axes, - scope, - ) +pub fn sparse_reduce_sum_sparse, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input_indices: O0, input_values: O1, input_shape: O2, reduction_axes: O3, scope: &mut crate::Scope) -> crate::Result { + SparseReduceSumSparse::new().build(input_indices, input_values, input_shape, reduction_axes, scope) } + /// Builder for the `SparseReorder` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseReorder { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseReorder' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseReorderInst { + /// An instance of a fully built SparseReorder Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseReorder { /// Creates a new `SparseReorder`. @@ -110011,32 +131794,10 @@ impl SparseReorder { } /// Builds the `SparseReorder` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_indices: O0, - input_values: O1, - input_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_indices.into(), - input_values.into(), - input_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - input_indices: crate::Output, - input_values: crate::Output, - input_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_indices: O0, input_values: O1, input_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_indices.into(), input_values.into(), input_shape.into(), scope) + } + fn build_impl(&self, input_indices: crate::Output, input_values: crate::Output, input_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseReorder", |nd| { nd.add_input(input_indices); nd.add_input(input_values); @@ -110044,32 +131805,70 @@ impl SparseReorder { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseReorder` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_indices: O0, input_values: O1, input_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_indices.into(), input_values.into(), input_shape.into(), scope) + } + fn build_instance_impl(&self, input_indices: crate::Output, input_values: crate::Output, input_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseReorder", |nd| { + nd.add_input(input_indices); + nd.add_input(input_values); + nd.add_input(input_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseReorderInst{op}) + } +} +impl SparseReorderInst { + /// Returns the 'output_indices' output of this 'SparseReorder' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseReorder' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for SparseReorderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseReorder::new().build(input_indices, input_values, input_shape, scope)`. -pub fn sparse_reorder< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_indices: O0, - input_values: O1, - input_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_reorder, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_indices: O0, input_values: O1, input_shape: O2, scope: &mut crate::Scope) -> crate::Result { SparseReorder::new().build(input_indices, input_values, input_shape, scope) } + /// Builder for the `SparseReshape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseReshape { control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseReshape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseReshapeInst { + /// An instance of a fully built SparseReshape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseReshape { /// Creates a new `SparseReshape`. @@ -110084,32 +131883,10 @@ impl SparseReshape { } /// Builds the `SparseReshape` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_indices: O0, - input_shape: O1, - new_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_indices.into(), - input_shape.into(), - new_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - input_indices: crate::Output, - input_shape: crate::Output, - new_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_indices: O0, input_shape: O1, new_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_indices.into(), input_shape.into(), new_shape.into(), scope) + } + fn build_impl(&self, input_indices: crate::Output, input_shape: crate::Output, new_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseReshape", |nd| { nd.add_input(input_indices); nd.add_input(input_shape); @@ -110120,21 +131897,50 @@ impl SparseReshape { ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseReshape` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_indices: O0, input_shape: O1, new_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_indices.into(), input_shape.into(), new_shape.into(), scope) + } + fn build_instance_impl(&self, input_indices: crate::Output, input_shape: crate::Output, new_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseReshape", |nd| { + nd.add_input(input_indices); + nd.add_input(input_shape); + nd.add_input(new_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseReshapeInst{op}) + } +} +impl SparseReshapeInst { + /// Returns the 'output_indices' output of this 'SparseReshape' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_shape' output of this 'SparseReshape' operation. + pub fn output_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for SparseReshapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseReshape::new().build(input_indices, input_shape, new_shape, scope)`. -pub fn sparse_reshape< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_indices: O0, - input_shape: O1, - new_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_reshape, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_indices: O0, input_shape: O1, new_shape: O2, scope: &mut crate::Scope) -> crate::Result { SparseReshape::new().build(input_indices, input_shape, new_shape, scope) } + /// Builder for the `SparseSegmentMean` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSegmentMean { @@ -110143,6 +131949,12 @@ pub struct SparseSegmentMean { Tsegmentids: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSegmentMean' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSegmentMeanInst { + /// An instance of a fully built SparseSegmentMean Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSegmentMean { /// Creates a new `SparseSegmentMean`. @@ -110163,10 +131975,7 @@ impl SparseSegmentMean { } /// Sets the `Tsegmentids` attribute. - pub fn Tsegmentids>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsegmentids>(mut self, value: ArgType) -> Self { self.Tsegmentids = ::std::option::Option::Some(value.into()); self } @@ -110178,27 +131987,10 @@ impl SparseSegmentMean { } /// Builds the `SparseSegmentMean` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - data: O0, - indices: O1, - segment_ids: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), indices.into(), segment_ids.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - indices: crate::Output, - segment_ids: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSegmentMean", |nd| { nd.add_input(data); nd.add_input(indices); @@ -110206,33 +131998,64 @@ impl SparseSegmentMean { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsegmentids { - nd.set_attr_type("Tsegmentids", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSegmentMean` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), indices.into(), segment_ids.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSegmentMean", |nd| { + nd.add_input(data); + nd.add_input(indices); + nd.add_input(segment_ids); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSegmentMeanInst{op}) + } +} +impl SparseSegmentMeanInst { + /// Returns the 'output' output of this 'SparseSegmentMean' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSegmentMeanInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSegmentMean::new().build(data, indices, segment_ids, scope)`. -pub fn sparse_segment_mean< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - data: O0, - indices: O1, - segment_ids: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_segment_mean, O1: ::std::convert::Into, O2: ::std::convert::Into>(data: O0, indices: O1, segment_ids: O2, scope: &mut crate::Scope) -> crate::Result { SparseSegmentMean::new().build(data, indices, segment_ids, scope) } + /// Builder for the `SparseSegmentMeanGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSegmentMeanGrad { @@ -110241,6 +132064,12 @@ pub struct SparseSegmentMeanGrad { Tsegmentids: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSegmentMeanGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSegmentMeanGradInst { + /// An instance of a fully built SparseSegmentMeanGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSegmentMeanGrad { /// Creates a new `SparseSegmentMeanGrad`. @@ -110261,10 +132090,7 @@ impl SparseSegmentMeanGrad { } /// Sets the `Tsegmentids` attribute. - pub fn Tsegmentids>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsegmentids>(mut self, value: ArgType) -> Self { self.Tsegmentids = ::std::option::Option::Some(value.into()); self } @@ -110276,36 +132102,10 @@ impl SparseSegmentMeanGrad { } /// Builds the `SparseSegmentMeanGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - grad: O0, - indices: O1, - segment_ids: O2, - output_dim0: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - grad.into(), - indices.into(), - segment_ids.into(), - output_dim0.into(), - scope, - ) - } - - fn build_impl( - &self, - grad: crate::Output, - indices: crate::Output, - segment_ids: crate::Output, - output_dim0: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grad: O0, indices: O1, segment_ids: O2, output_dim0: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(grad.into(), indices.into(), segment_ids.into(), output_dim0.into(), scope) + } + fn build_impl(&self, grad: crate::Output, indices: crate::Output, segment_ids: crate::Output, output_dim0: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSegmentMeanGrad", |nd| { nd.add_input(grad); nd.add_input(indices); @@ -110314,35 +132114,65 @@ impl SparseSegmentMeanGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsegmentids { - nd.set_attr_type("Tsegmentids", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSegmentMeanGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grad: O0, indices: O1, segment_ids: O2, output_dim0: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(grad.into(), indices.into(), segment_ids.into(), output_dim0.into(), scope) + } + fn build_instance_impl(&self, grad: crate::Output, indices: crate::Output, segment_ids: crate::Output, output_dim0: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSegmentMeanGrad", |nd| { + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(segment_ids); + nd.add_input(output_dim0); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSegmentMeanGradInst{op}) + } +} +impl SparseSegmentMeanGradInst { + /// Returns the 'output' output of this 'SparseSegmentMeanGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSegmentMeanGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSegmentMeanGrad::new().build(grad, indices, segment_ids, output_dim0, scope)`. -pub fn sparse_segment_mean_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - grad: O0, - indices: O1, - segment_ids: O2, - output_dim0: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_segment_mean_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(grad: O0, indices: O1, segment_ids: O2, output_dim0: O3, scope: &mut crate::Scope) -> crate::Result { SparseSegmentMeanGrad::new().build(grad, indices, segment_ids, output_dim0, scope) } + /// Builder for the `SparseSegmentMeanWithNumSegments` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSegmentMeanWithNumSegments { @@ -110352,6 +132182,12 @@ pub struct SparseSegmentMeanWithNumSegments { Tsegmentids: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSegmentMeanWithNumSegments' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSegmentMeanWithNumSegmentsInst { + /// An instance of a fully built SparseSegmentMeanWithNumSegments Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSegmentMeanWithNumSegments { /// Creates a new `SparseSegmentMeanWithNumSegments`. @@ -110372,19 +132208,13 @@ impl SparseSegmentMeanWithNumSegments { } /// Sets the `Tnumsegments` attribute. - pub fn Tnumsegments>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tnumsegments>(mut self, value: ArgType) -> Self { self.Tnumsegments = ::std::option::Option::Some(value.into()); self } /// Sets the `Tsegmentids` attribute. - pub fn Tsegmentids>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsegmentids>(mut self, value: ArgType) -> Self { self.Tsegmentids = ::std::option::Option::Some(value.into()); self } @@ -110396,36 +132226,10 @@ impl SparseSegmentMeanWithNumSegments { } /// Builds the `SparseSegmentMeanWithNumSegments` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - data: O0, - indices: O1, - segment_ids: O2, - num_segments: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - data.into(), - indices.into(), - segment_ids.into(), - num_segments.into(), - scope, - ) - } - - fn build_impl( - &self, - data: crate::Output, - indices: crate::Output, - segment_ids: crate::Output, - num_segments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, num_segments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(data.into(), indices.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSegmentMeanWithNumSegments", |nd| { nd.add_input(data); nd.add_input(indices); @@ -110434,38 +132238,71 @@ impl SparseSegmentMeanWithNumSegments { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tnumsegments { - nd.set_attr_type("Tnumsegments", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsegmentids { - nd.set_attr_type("Tsegmentids", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSegmentMeanWithNumSegments` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, num_segments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), indices.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSegmentMeanWithNumSegments", |nd| { + nd.add_input(data); + nd.add_input(indices); + nd.add_input(segment_ids); + nd.add_input(num_segments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSegmentMeanWithNumSegmentsInst{op}) + } +} +impl SparseSegmentMeanWithNumSegmentsInst { + /// Returns the 'output' output of this 'SparseSegmentMeanWithNumSegments' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSegmentMeanWithNumSegmentsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSegmentMeanWithNumSegments::new().build(data, indices, segment_ids, num_segments, scope)`. -pub fn sparse_segment_mean_with_num_segments< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - data: O0, - indices: O1, - segment_ids: O2, - num_segments: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_segment_mean_with_num_segments, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(data: O0, indices: O1, segment_ids: O2, num_segments: O3, scope: &mut crate::Scope) -> crate::Result { SparseSegmentMeanWithNumSegments::new().build(data, indices, segment_ids, num_segments, scope) } + /// Builder for the `SparseSegmentSqrtN` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSegmentSqrtN { @@ -110474,6 +132311,12 @@ pub struct SparseSegmentSqrtN { Tsegmentids: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSegmentSqrtN' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSegmentSqrtNInst { + /// An instance of a fully built SparseSegmentSqrtN Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSegmentSqrtN { /// Creates a new `SparseSegmentSqrtN`. @@ -110494,10 +132337,7 @@ impl SparseSegmentSqrtN { } /// Sets the `Tsegmentids` attribute. - pub fn Tsegmentids>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsegmentids>(mut self, value: ArgType) -> Self { self.Tsegmentids = ::std::option::Option::Some(value.into()); self } @@ -110509,27 +132349,10 @@ impl SparseSegmentSqrtN { } /// Builds the `SparseSegmentSqrtN` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - data: O0, - indices: O1, - segment_ids: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), indices.into(), segment_ids.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - indices: crate::Output, - segment_ids: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSegmentSqrtN", |nd| { nd.add_input(data); nd.add_input(indices); @@ -110537,33 +132360,64 @@ impl SparseSegmentSqrtN { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsegmentids { - nd.set_attr_type("Tsegmentids", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSegmentSqrtN` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), indices.into(), segment_ids.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSegmentSqrtN", |nd| { + nd.add_input(data); + nd.add_input(indices); + nd.add_input(segment_ids); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSegmentSqrtNInst{op}) + } +} +impl SparseSegmentSqrtNInst { + /// Returns the 'output' output of this 'SparseSegmentSqrtN' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSegmentSqrtNInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSegmentSqrtN::new().build(data, indices, segment_ids, scope)`. -pub fn sparse_segment_sqrt_n< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - data: O0, - indices: O1, - segment_ids: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_segment_sqrt_n, O1: ::std::convert::Into, O2: ::std::convert::Into>(data: O0, indices: O1, segment_ids: O2, scope: &mut crate::Scope) -> crate::Result { SparseSegmentSqrtN::new().build(data, indices, segment_ids, scope) } + /// Builder for the `SparseSegmentSqrtNGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSegmentSqrtNGrad { @@ -110572,6 +132426,12 @@ pub struct SparseSegmentSqrtNGrad { Tsegmentids: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSegmentSqrtNGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSegmentSqrtNGradInst { + /// An instance of a fully built SparseSegmentSqrtNGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSegmentSqrtNGrad { /// Creates a new `SparseSegmentSqrtNGrad`. @@ -110592,10 +132452,7 @@ impl SparseSegmentSqrtNGrad { } /// Sets the `Tsegmentids` attribute. - pub fn Tsegmentids>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsegmentids>(mut self, value: ArgType) -> Self { self.Tsegmentids = ::std::option::Option::Some(value.into()); self } @@ -110607,36 +132464,10 @@ impl SparseSegmentSqrtNGrad { } /// Builds the `SparseSegmentSqrtNGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - grad: O0, - indices: O1, - segment_ids: O2, - output_dim0: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - grad.into(), - indices.into(), - segment_ids.into(), - output_dim0.into(), - scope, - ) - } - - fn build_impl( - &self, - grad: crate::Output, - indices: crate::Output, - segment_ids: crate::Output, - output_dim0: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grad: O0, indices: O1, segment_ids: O2, output_dim0: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(grad.into(), indices.into(), segment_ids.into(), output_dim0.into(), scope) + } + fn build_impl(&self, grad: crate::Output, indices: crate::Output, segment_ids: crate::Output, output_dim0: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSegmentSqrtNGrad", |nd| { nd.add_input(grad); nd.add_input(indices); @@ -110645,35 +132476,65 @@ impl SparseSegmentSqrtNGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsegmentids { - nd.set_attr_type("Tsegmentids", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSegmentSqrtNGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grad: O0, indices: O1, segment_ids: O2, output_dim0: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(grad.into(), indices.into(), segment_ids.into(), output_dim0.into(), scope) + } + fn build_instance_impl(&self, grad: crate::Output, indices: crate::Output, segment_ids: crate::Output, output_dim0: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSegmentSqrtNGrad", |nd| { + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(segment_ids); + nd.add_input(output_dim0); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSegmentSqrtNGradInst{op}) + } +} +impl SparseSegmentSqrtNGradInst { + /// Returns the 'output' output of this 'SparseSegmentSqrtNGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSegmentSqrtNGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSegmentSqrtNGrad::new().build(grad, indices, segment_ids, output_dim0, scope)`. -pub fn sparse_segment_sqrt_ngrad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - grad: O0, - indices: O1, - segment_ids: O2, - output_dim0: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_segment_sqrt_ngrad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(grad: O0, indices: O1, segment_ids: O2, output_dim0: O3, scope: &mut crate::Scope) -> crate::Result { SparseSegmentSqrtNGrad::new().build(grad, indices, segment_ids, output_dim0, scope) } + /// Builder for the `SparseSegmentSqrtNWithNumSegments` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSegmentSqrtNWithNumSegments { @@ -110683,6 +132544,12 @@ pub struct SparseSegmentSqrtNWithNumSegments { Tsegmentids: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSegmentSqrtNWithNumSegments' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSegmentSqrtNWithNumSegmentsInst { + /// An instance of a fully built SparseSegmentSqrtNWithNumSegments Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSegmentSqrtNWithNumSegments { /// Creates a new `SparseSegmentSqrtNWithNumSegments`. @@ -110703,19 +132570,13 @@ impl SparseSegmentSqrtNWithNumSegments { } /// Sets the `Tnumsegments` attribute. - pub fn Tnumsegments>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tnumsegments>(mut self, value: ArgType) -> Self { self.Tnumsegments = ::std::option::Option::Some(value.into()); self } /// Sets the `Tsegmentids` attribute. - pub fn Tsegmentids>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsegmentids>(mut self, value: ArgType) -> Self { self.Tsegmentids = ::std::option::Option::Some(value.into()); self } @@ -110727,36 +132588,10 @@ impl SparseSegmentSqrtNWithNumSegments { } /// Builds the `SparseSegmentSqrtNWithNumSegments` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - data: O0, - indices: O1, - segment_ids: O2, - num_segments: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - data.into(), - indices.into(), - segment_ids.into(), - num_segments.into(), - scope, - ) - } - - fn build_impl( - &self, - data: crate::Output, - indices: crate::Output, - segment_ids: crate::Output, - num_segments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, num_segments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(data.into(), indices.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSegmentSqrtNWithNumSegments", |nd| { nd.add_input(data); nd.add_input(indices); @@ -110765,38 +132600,71 @@ impl SparseSegmentSqrtNWithNumSegments { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tnumsegments { - nd.set_attr_type("Tnumsegments", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsegmentids { - nd.set_attr_type("Tsegmentids", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSegmentSqrtNWithNumSegments` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, num_segments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), indices.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSegmentSqrtNWithNumSegments", |nd| { + nd.add_input(data); + nd.add_input(indices); + nd.add_input(segment_ids); + nd.add_input(num_segments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSegmentSqrtNWithNumSegmentsInst{op}) + } +} +impl SparseSegmentSqrtNWithNumSegmentsInst { + /// Returns the 'output' output of this 'SparseSegmentSqrtNWithNumSegments' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSegmentSqrtNWithNumSegmentsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSegmentSqrtNWithNumSegments::new().build(data, indices, segment_ids, num_segments, scope)`. -pub fn sparse_segment_sqrt_nwith_num_segments< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - data: O0, - indices: O1, - segment_ids: O2, - num_segments: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_segment_sqrt_nwith_num_segments, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(data: O0, indices: O1, segment_ids: O2, num_segments: O3, scope: &mut crate::Scope) -> crate::Result { SparseSegmentSqrtNWithNumSegments::new().build(data, indices, segment_ids, num_segments, scope) } + /// Builder for the `SparseSegmentSum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSegmentSum { @@ -110805,6 +132673,12 @@ pub struct SparseSegmentSum { Tsegmentids: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSegmentSum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSegmentSumInst { + /// An instance of a fully built SparseSegmentSum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSegmentSum { /// Creates a new `SparseSegmentSum`. @@ -110825,10 +132699,7 @@ impl SparseSegmentSum { } /// Sets the `Tsegmentids` attribute. - pub fn Tsegmentids>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsegmentids>(mut self, value: ArgType) -> Self { self.Tsegmentids = ::std::option::Option::Some(value.into()); self } @@ -110840,27 +132711,10 @@ impl SparseSegmentSum { } /// Builds the `SparseSegmentSum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - data: O0, - indices: O1, - segment_ids: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), indices.into(), segment_ids.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - indices: crate::Output, - segment_ids: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSegmentSum", |nd| { nd.add_input(data); nd.add_input(indices); @@ -110868,33 +132722,64 @@ impl SparseSegmentSum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsegmentids { - nd.set_attr_type("Tsegmentids", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSegmentSum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), indices.into(), segment_ids.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSegmentSum", |nd| { + nd.add_input(data); + nd.add_input(indices); + nd.add_input(segment_ids); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSegmentSumInst{op}) + } +} +impl SparseSegmentSumInst { + /// Returns the 'output' output of this 'SparseSegmentSum' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSegmentSumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSegmentSum::new().build(data, indices, segment_ids, scope)`. -pub fn sparse_segment_sum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - data: O0, - indices: O1, - segment_ids: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_segment_sum, O1: ::std::convert::Into, O2: ::std::convert::Into>(data: O0, indices: O1, segment_ids: O2, scope: &mut crate::Scope) -> crate::Result { SparseSegmentSum::new().build(data, indices, segment_ids, scope) } + /// Builder for the `SparseSegmentSumGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSegmentSumGrad { @@ -110903,6 +132788,12 @@ pub struct SparseSegmentSumGrad { Tsegmentids: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSegmentSumGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSegmentSumGradInst { + /// An instance of a fully built SparseSegmentSumGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSegmentSumGrad { /// Creates a new `SparseSegmentSumGrad`. @@ -110923,10 +132814,7 @@ impl SparseSegmentSumGrad { } /// Sets the `Tsegmentids` attribute. - pub fn Tsegmentids>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsegmentids>(mut self, value: ArgType) -> Self { self.Tsegmentids = ::std::option::Option::Some(value.into()); self } @@ -110938,36 +132826,10 @@ impl SparseSegmentSumGrad { } /// Builds the `SparseSegmentSumGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - grad: O0, - indices: O1, - segment_ids: O2, - output_dim0: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - grad.into(), - indices.into(), - segment_ids.into(), - output_dim0.into(), - scope, - ) - } - - fn build_impl( - &self, - grad: crate::Output, - indices: crate::Output, - segment_ids: crate::Output, - output_dim0: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grad: O0, indices: O1, segment_ids: O2, output_dim0: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(grad.into(), indices.into(), segment_ids.into(), output_dim0.into(), scope) + } + fn build_impl(&self, grad: crate::Output, indices: crate::Output, segment_ids: crate::Output, output_dim0: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSegmentSumGrad", |nd| { nd.add_input(grad); nd.add_input(indices); @@ -110976,35 +132838,65 @@ impl SparseSegmentSumGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsegmentids { - nd.set_attr_type("Tsegmentids", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSegmentSumGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, grad: O0, indices: O1, segment_ids: O2, output_dim0: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(grad.into(), indices.into(), segment_ids.into(), output_dim0.into(), scope) + } + fn build_instance_impl(&self, grad: crate::Output, indices: crate::Output, segment_ids: crate::Output, output_dim0: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSegmentSumGrad", |nd| { + nd.add_input(grad); + nd.add_input(indices); + nd.add_input(segment_ids); + nd.add_input(output_dim0); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSegmentSumGradInst{op}) + } +} +impl SparseSegmentSumGradInst { + /// Returns the 'output' output of this 'SparseSegmentSumGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSegmentSumGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSegmentSumGrad::new().build(grad, indices, segment_ids, output_dim0, scope)`. -pub fn sparse_segment_sum_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - grad: O0, - indices: O1, - segment_ids: O2, - output_dim0: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_segment_sum_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(grad: O0, indices: O1, segment_ids: O2, output_dim0: O3, scope: &mut crate::Scope) -> crate::Result { SparseSegmentSumGrad::new().build(grad, indices, segment_ids, output_dim0, scope) } + /// Builder for the `SparseSegmentSumWithNumSegments` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSegmentSumWithNumSegments { @@ -111014,6 +132906,12 @@ pub struct SparseSegmentSumWithNumSegments { Tsegmentids: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSegmentSumWithNumSegments' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSegmentSumWithNumSegmentsInst { + /// An instance of a fully built SparseSegmentSumWithNumSegments Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSegmentSumWithNumSegments { /// Creates a new `SparseSegmentSumWithNumSegments`. @@ -111034,19 +132932,13 @@ impl SparseSegmentSumWithNumSegments { } /// Sets the `Tnumsegments` attribute. - pub fn Tnumsegments>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tnumsegments>(mut self, value: ArgType) -> Self { self.Tnumsegments = ::std::option::Option::Some(value.into()); self } /// Sets the `Tsegmentids` attribute. - pub fn Tsegmentids>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsegmentids>(mut self, value: ArgType) -> Self { self.Tsegmentids = ::std::option::Option::Some(value.into()); self } @@ -111058,36 +132950,10 @@ impl SparseSegmentSumWithNumSegments { } /// Builds the `SparseSegmentSumWithNumSegments` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - data: O0, - indices: O1, - segment_ids: O2, - num_segments: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - data.into(), - indices.into(), - segment_ids.into(), - num_segments.into(), - scope, - ) - } - - fn build_impl( - &self, - data: crate::Output, - indices: crate::Output, - segment_ids: crate::Output, - num_segments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, num_segments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(data.into(), indices.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSegmentSumWithNumSegments", |nd| { nd.add_input(data); nd.add_input(indices); @@ -111096,44 +132962,83 @@ impl SparseSegmentSumWithNumSegments { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tnumsegments { - nd.set_attr_type("Tnumsegments", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsegmentids { - nd.set_attr_type("Tsegmentids", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSegmentSumWithNumSegments` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, data: O0, indices: O1, segment_ids: O2, num_segments: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), indices.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, indices: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSegmentSumWithNumSegments", |nd| { + nd.add_input(data); + nd.add_input(indices); + nd.add_input(segment_ids); + nd.add_input(num_segments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsegmentids { + nd.set_attr_type("Tsegmentids", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSegmentSumWithNumSegmentsInst{op}) + } +} +impl SparseSegmentSumWithNumSegmentsInst { + /// Returns the 'output' output of this 'SparseSegmentSumWithNumSegments' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSegmentSumWithNumSegmentsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSegmentSumWithNumSegments::new().build(data, indices, segment_ids, num_segments, scope)`. -pub fn sparse_segment_sum_with_num_segments< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - data: O0, - indices: O1, - segment_ids: O2, - num_segments: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_segment_sum_with_num_segments, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(data: O0, indices: O1, segment_ids: O2, num_segments: O3, scope: &mut crate::Scope) -> crate::Result { SparseSegmentSumWithNumSegments::new().build(data, indices, segment_ids, num_segments, scope) } + /// Builder for the `SparseSlice` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSlice { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSlice' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSliceInst { + /// An instance of a fully built SparseSlice Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSlice { /// Creates a new `SparseSlice`. @@ -111154,40 +133059,10 @@ impl SparseSlice { } /// Builds the `SparseSlice` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - indices: O0, - values: O1, - shape: O2, - start: O3, - size: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - indices.into(), - values.into(), - shape.into(), - start.into(), - size.into(), - scope, - ) - } - - fn build_impl( - &self, - indices: crate::Output, - values: crate::Output, - shape: crate::Output, - start: crate::Output, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, indices: O0, values: O1, shape: O2, start: O3, size: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(indices.into(), values.into(), shape.into(), start.into(), size.into(), scope) + } + fn build_impl(&self, indices: crate::Output, values: crate::Output, shape: crate::Output, start: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSlice", |nd| { nd.add_input(indices); nd.add_input(values); @@ -111197,37 +133072,80 @@ impl SparseSlice { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSlice` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, indices: O0, values: O1, shape: O2, start: O3, size: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), values.into(), shape.into(), start.into(), size.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, values: crate::Output, shape: crate::Output, start: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSlice", |nd| { + nd.add_input(indices); + nd.add_input(values); + nd.add_input(shape); + nd.add_input(start); + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSliceInst{op}) + } +} +impl SparseSliceInst { + /// Returns the 'output_indices' output of this 'SparseSlice' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseSlice' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'output_shape' output of this 'SparseSlice' operation. + pub fn output_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseSliceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSlice::new().build(indices, values, shape, start, size, scope)`. -pub fn sparse_slice< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - indices: O0, - values: O1, - shape: O2, - start: O3, - size: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_slice, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(indices: O0, values: O1, shape: O2, start: O3, size: O4, scope: &mut crate::Scope) -> crate::Result { SparseSlice::new().build(indices, values, shape, start, size, scope) } + /// Builder for the `SparseSliceGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSliceGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSliceGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSliceGradInst { + /// An instance of a fully built SparseSliceGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSliceGrad { /// Creates a new `SparseSliceGrad`. @@ -111248,36 +133166,10 @@ impl SparseSliceGrad { } /// Builds the `SparseSliceGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - backprop_val_grad: O0, - input_indices: O1, - input_start: O2, - output_indices: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - backprop_val_grad.into(), - input_indices.into(), - input_start.into(), - output_indices.into(), - scope, - ) - } - - fn build_impl( - &self, - backprop_val_grad: crate::Output, - input_indices: crate::Output, - input_start: crate::Output, - output_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, backprop_val_grad: O0, input_indices: O1, input_start: O2, output_indices: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(backprop_val_grad.into(), input_indices.into(), input_start.into(), output_indices.into(), scope) + } + fn build_impl(&self, backprop_val_grad: crate::Output, input_indices: crate::Output, input_start: crate::Output, output_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSliceGrad", |nd| { nd.add_input(backprop_val_grad); nd.add_input(input_indices); @@ -111286,41 +133178,65 @@ impl SparseSliceGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSliceGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, backprop_val_grad: O0, input_indices: O1, input_start: O2, output_indices: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(backprop_val_grad.into(), input_indices.into(), input_start.into(), output_indices.into(), scope) + } + fn build_instance_impl(&self, backprop_val_grad: crate::Output, input_indices: crate::Output, input_start: crate::Output, output_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSliceGrad", |nd| { + nd.add_input(backprop_val_grad); + nd.add_input(input_indices); + nd.add_input(input_start); + nd.add_input(output_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSliceGradInst{op}) + } +} +impl SparseSliceGradInst { + /// Returns the 'val_grad' output of this 'SparseSliceGrad' operation. + pub fn val_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSliceGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSliceGrad::new().build(backprop_val_grad, input_indices, input_start, output_indices, scope)`. -pub fn sparse_slice_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - backprop_val_grad: O0, - input_indices: O1, - input_start: O2, - output_indices: O3, - scope: &mut crate::Scope, -) -> crate::Result { - SparseSliceGrad::new().build( - backprop_val_grad, - input_indices, - input_start, - output_indices, - scope, - ) +pub fn sparse_slice_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(backprop_val_grad: O0, input_indices: O1, input_start: O2, output_indices: O3, scope: &mut crate::Scope) -> crate::Result { + SparseSliceGrad::new().build(backprop_val_grad, input_indices, input_start, output_indices, scope) } + /// Builder for the `SparseSoftmax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSoftmax { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSoftmax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSoftmaxInst { + /// An instance of a fully built SparseSoftmax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSoftmax { /// Creates a new `SparseSoftmax`. @@ -111341,27 +133257,10 @@ impl SparseSoftmax { } /// Builds the `SparseSoftmax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - sp_indices: O0, - sp_values: O1, - sp_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, sp_indices: O0, sp_values: O1, sp_shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(sp_indices.into(), sp_values.into(), sp_shape.into(), scope) } - - fn build_impl( - &self, - sp_indices: crate::Output, - sp_values: crate::Output, - sp_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, sp_indices: crate::Output, sp_values: crate::Output, sp_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSoftmax", |nd| { nd.add_input(sp_indices); nd.add_input(sp_values); @@ -111369,27 +133268,52 @@ impl SparseSoftmax { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSoftmax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, sp_indices: O0, sp_values: O1, sp_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sp_indices.into(), sp_values.into(), sp_shape.into(), scope) + } + fn build_instance_impl(&self, sp_indices: crate::Output, sp_values: crate::Output, sp_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSoftmax", |nd| { + nd.add_input(sp_indices); + nd.add_input(sp_values); + nd.add_input(sp_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSoftmaxInst{op}) + } +} +impl SparseSoftmaxInst { + /// Returns the 'output' output of this 'SparseSoftmax' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseSoftmaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSoftmax::new().build(sp_indices, sp_values, sp_shape, scope)`. -pub fn sparse_softmax< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - sp_indices: O0, - sp_values: O1, - sp_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_softmax, O1: ::std::convert::Into, O2: ::std::convert::Into>(sp_indices: O0, sp_values: O1, sp_shape: O2, scope: &mut crate::Scope) -> crate::Result { SparseSoftmax::new().build(sp_indices, sp_values, sp_shape, scope) } + /// Builder for the `SparseSoftmaxCrossEntropyWithLogits` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSoftmaxCrossEntropyWithLogits { @@ -111397,6 +133321,12 @@ pub struct SparseSoftmaxCrossEntropyWithLogits { Tlabels: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSoftmaxCrossEntropyWithLogits' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSoftmaxCrossEntropyWithLogitsInst { + /// An instance of a fully built SparseSoftmaxCrossEntropyWithLogits Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSoftmaxCrossEntropyWithLogits { /// Creates a new `SparseSoftmaxCrossEntropyWithLogits`. @@ -111411,10 +133341,7 @@ impl SparseSoftmaxCrossEntropyWithLogits { } /// Sets the `Tlabels` attribute. - pub fn Tlabels>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tlabels>(mut self, value: ArgType) -> Self { self.Tlabels = ::std::option::Option::Some(value.into()); self } @@ -111426,58 +133353,86 @@ impl SparseSoftmaxCrossEntropyWithLogits { } /// Builds the `SparseSoftmaxCrossEntropyWithLogits` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - features: O0, - labels: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, features: O0, labels: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(features.into(), labels.into(), scope) } - - fn build_impl( - &self, - features: crate::Output, - labels: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, features: crate::Output, labels: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSoftmaxCrossEntropyWithLogits", |nd| { nd.add_input(features); nd.add_input(labels); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tlabels { - nd.set_attr_type("Tlabels", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tlabels { + nd.set_attr_type("Tlabels", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSoftmaxCrossEntropyWithLogits` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, features: O0, labels: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(features.into(), labels.into(), scope) + } + fn build_instance_impl(&self, features: crate::Output, labels: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSoftmaxCrossEntropyWithLogits", |nd| { + nd.add_input(features); + nd.add_input(labels); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tlabels { + nd.set_attr_type("Tlabels", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSoftmaxCrossEntropyWithLogitsInst{op}) + } +} +impl SparseSoftmaxCrossEntropyWithLogitsInst { + /// Returns the 'loss' output of this 'SparseSoftmaxCrossEntropyWithLogits' operation. + pub fn loss(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'backprop' output of this 'SparseSoftmaxCrossEntropyWithLogits' operation. + pub fn backprop(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for SparseSoftmaxCrossEntropyWithLogitsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSoftmaxCrossEntropyWithLogits::new().build(features, labels, scope)`. -pub fn sparse_softmax_cross_entropy_with_logits< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - features: O0, - labels: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_softmax_cross_entropy_with_logits, O1: ::std::convert::Into>(features: O0, labels: O1, scope: &mut crate::Scope) -> crate::Result { SparseSoftmaxCrossEntropyWithLogits::new().build(features, labels, scope) } + /// Builder for the `SparseSparseMaximum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSparseMaximum { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSparseMaximum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSparseMaximumInst { + /// An instance of a fully built SparseSparseMaximum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSparseMaximum { /// Creates a new `SparseSparseMaximum`. @@ -111498,44 +133453,10 @@ impl SparseSparseMaximum { } /// Builds the `SparseSparseMaximum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - a_indices: O0, - a_values: O1, - a_shape: O2, - b_indices: O3, - b_values: O4, - b_shape: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a_indices.into(), - a_values.into(), - a_shape.into(), - b_indices.into(), - b_values.into(), - b_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - a_indices: crate::Output, - a_values: crate::Output, - a_shape: crate::Output, - b_indices: crate::Output, - b_values: crate::Output, - b_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, a_indices: O0, a_values: O1, a_shape: O2, b_indices: O3, b_values: O4, b_shape: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a_indices.into(), a_values.into(), a_shape.into(), b_indices.into(), b_values.into(), b_shape.into(), scope) + } + fn build_impl(&self, a_indices: crate::Output, a_values: crate::Output, a_shape: crate::Output, b_indices: crate::Output, b_values: crate::Output, b_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSparseMaximum", |nd| { nd.add_input(a_indices); nd.add_input(a_values); @@ -111546,41 +133467,74 @@ impl SparseSparseMaximum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSparseMaximum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, a_indices: O0, a_values: O1, a_shape: O2, b_indices: O3, b_values: O4, b_shape: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a_indices.into(), a_values.into(), a_shape.into(), b_indices.into(), b_values.into(), b_shape.into(), scope) + } + fn build_instance_impl(&self, a_indices: crate::Output, a_values: crate::Output, a_shape: crate::Output, b_indices: crate::Output, b_values: crate::Output, b_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSparseMaximum", |nd| { + nd.add_input(a_indices); + nd.add_input(a_values); + nd.add_input(a_shape); + nd.add_input(b_indices); + nd.add_input(b_values); + nd.add_input(b_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSparseMaximumInst{op}) + } +} +impl SparseSparseMaximumInst { + /// Returns the 'output_indices' output of this 'SparseSparseMaximum' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseSparseMaximum' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for SparseSparseMaximumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSparseMaximum::new().build(a_indices, a_values, a_shape, b_indices, b_values, b_shape, scope)`. -pub fn sparse_sparse_maximum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - a_indices: O0, - a_values: O1, - a_shape: O2, - b_indices: O3, - b_values: O4, - b_shape: O5, - scope: &mut crate::Scope, -) -> crate::Result { - SparseSparseMaximum::new().build( - a_indices, a_values, a_shape, b_indices, b_values, b_shape, scope, - ) +pub fn sparse_sparse_maximum, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(a_indices: O0, a_values: O1, a_shape: O2, b_indices: O3, b_values: O4, b_shape: O5, scope: &mut crate::Scope) -> crate::Result { + SparseSparseMaximum::new().build(a_indices, a_values, a_shape, b_indices, b_values, b_shape, scope) } + /// Builder for the `SparseSparseMinimum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSparseMinimum { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSparseMinimum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSparseMinimumInst { + /// An instance of a fully built SparseSparseMinimum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSparseMinimum { /// Creates a new `SparseSparseMinimum`. @@ -111601,44 +133555,10 @@ impl SparseSparseMinimum { } /// Builds the `SparseSparseMinimum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - a_indices: O0, - a_values: O1, - a_shape: O2, - b_indices: O3, - b_values: O4, - b_shape: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a_indices.into(), - a_values.into(), - a_shape.into(), - b_indices.into(), - b_values.into(), - b_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - a_indices: crate::Output, - a_values: crate::Output, - a_shape: crate::Output, - b_indices: crate::Output, - b_values: crate::Output, - b_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, a_indices: O0, a_values: O1, a_shape: O2, b_indices: O3, b_values: O4, b_shape: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a_indices.into(), a_values.into(), a_shape.into(), b_indices.into(), b_values.into(), b_shape.into(), scope) + } + fn build_impl(&self, a_indices: crate::Output, a_values: crate::Output, a_shape: crate::Output, b_indices: crate::Output, b_values: crate::Output, b_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSparseMinimum", |nd| { nd.add_input(a_indices); nd.add_input(a_values); @@ -111649,35 +133569,62 @@ impl SparseSparseMinimum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSparseMinimum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, a_indices: O0, a_values: O1, a_shape: O2, b_indices: O3, b_values: O4, b_shape: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a_indices.into(), a_values.into(), a_shape.into(), b_indices.into(), b_values.into(), b_shape.into(), scope) + } + fn build_instance_impl(&self, a_indices: crate::Output, a_values: crate::Output, a_shape: crate::Output, b_indices: crate::Output, b_values: crate::Output, b_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSparseMinimum", |nd| { + nd.add_input(a_indices); + nd.add_input(a_values); + nd.add_input(a_shape); + nd.add_input(b_indices); + nd.add_input(b_values); + nd.add_input(b_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSparseMinimumInst{op}) + } +} +impl SparseSparseMinimumInst { + /// Returns the 'output_indices' output of this 'SparseSparseMinimum' operation. + pub fn output_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_values' output of this 'SparseSparseMinimum' operation. + pub fn output_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for SparseSparseMinimumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSparseMinimum::new().build(a_indices, a_values, a_shape, b_indices, b_values, b_shape, scope)`. -pub fn sparse_sparse_minimum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - a_indices: O0, - a_values: O1, - a_shape: O2, - b_indices: O3, - b_values: O4, - b_shape: O5, - scope: &mut crate::Scope, -) -> crate::Result { - SparseSparseMinimum::new().build( - a_indices, a_values, a_shape, b_indices, b_values, b_shape, scope, - ) +pub fn sparse_sparse_minimum, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(a_indices: O0, a_values: O1, a_shape: O2, b_indices: O3, b_values: O4, b_shape: O5, scope: &mut crate::Scope) -> crate::Result { + SparseSparseMinimum::new().build(a_indices, a_values, a_shape, b_indices, b_values, b_shape, scope) } + /// Builder for the `SparseSplit` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseSplit { @@ -111685,6 +133632,12 @@ pub struct SparseSplit { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseSplit' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseSplitInst { + /// An instance of a fully built SparseSplit Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseSplit { /// Creates a new `SparseSplit`. @@ -111711,36 +133664,10 @@ impl SparseSplit { } /// Builds the `SparseSplit` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - split_dim: O0, - indices: O1, - values: O2, - shape: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - split_dim.into(), - indices.into(), - values.into(), - shape.into(), - scope, - ) - } - - fn build_impl( - &self, - split_dim: crate::Output, - indices: crate::Output, - values: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, split_dim: O0, indices: O1, values: O2, shape: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(split_dim.into(), indices.into(), values.into(), shape.into(), scope) + } + fn build_impl(&self, split_dim: crate::Output, indices: crate::Output, values: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseSplit", |nd| { nd.add_input(split_dim); nd.add_input(indices); @@ -111749,32 +133676,88 @@ impl SparseSplit { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_split { - nd.set_attr_int("num_split", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_split { + nd.set_attr_int("num_split", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseSplit` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, split_dim: O0, indices: O1, values: O2, shape: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(split_dim.into(), indices.into(), values.into(), shape.into(), scope) + } + fn build_instance_impl(&self, split_dim: crate::Output, indices: crate::Output, values: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseSplit", |nd| { + nd.add_input(split_dim); + nd.add_input(indices); + nd.add_input(values); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_split { + nd.set_attr_int("num_split", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseSplitInst{op}) + } +} +impl SparseSplitInst { + /// Returns a Vector of Outputs for 'output_indices' output of this SparseSplit operation. + pub fn output_indices(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_split")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'output_values' output of this SparseSplit operation. + pub fn output_values(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("num_split")?+1) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_split")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'output_shape' output of this SparseSplit operation. + pub fn output_shape(&self) -> crate::Result>{ + let dynamic_offset = (2*self.op.get_attr_int("num_split")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_split")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for SparseSplitInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseSplit::new().build(split_dim, indices, values, shape, scope)`. -pub fn sparse_split< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - split_dim: O0, - indices: O1, - values: O2, - shape: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_split, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(split_dim: O0, indices: O1, values: O2, shape: O3, scope: &mut crate::Scope) -> crate::Result { SparseSplit::new().build(split_dim, indices, values, shape, scope) } + /// Builder for the `SparseTensorDenseAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseTensorDenseAdd { @@ -111782,6 +133765,12 @@ pub struct SparseTensorDenseAdd { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseTensorDenseAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseTensorDenseAddInst { + /// An instance of a fully built SparseTensorDenseAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseTensorDenseAdd { /// Creates a new `SparseTensorDenseAdd`. @@ -111796,10 +133785,7 @@ impl SparseTensorDenseAdd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -111811,36 +133797,10 @@ impl SparseTensorDenseAdd { } /// Builds the `SparseTensorDenseAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - a_indices: O0, - a_values: O1, - a_shape: O2, - b: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a_indices.into(), - a_values.into(), - a_shape.into(), - b.into(), - scope, - ) - } - - fn build_impl( - &self, - a_indices: crate::Output, - a_values: crate::Output, - a_shape: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, a_indices: O0, a_values: O1, a_shape: O2, b: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a_indices.into(), a_values.into(), a_shape.into(), b.into(), scope) + } + fn build_impl(&self, a_indices: crate::Output, a_values: crate::Output, a_shape: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseTensorDenseAdd", |nd| { nd.add_input(a_indices); nd.add_input(a_values); @@ -111849,32 +133809,59 @@ impl SparseTensorDenseAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseTensorDenseAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, a_indices: O0, a_values: O1, a_shape: O2, b: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a_indices.into(), a_values.into(), a_shape.into(), b.into(), scope) + } + fn build_instance_impl(&self, a_indices: crate::Output, a_values: crate::Output, a_shape: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseTensorDenseAdd", |nd| { + nd.add_input(a_indices); + nd.add_input(a_values); + nd.add_input(a_shape); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseTensorDenseAddInst{op}) + } +} +impl SparseTensorDenseAddInst { + /// Returns the 'output' output of this 'SparseTensorDenseAdd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseTensorDenseAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseTensorDenseAdd::new().build(a_indices, a_values, a_shape, b, scope)`. -pub fn sparse_tensor_dense_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - a_indices: O0, - a_values: O1, - a_shape: O2, - b: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_tensor_dense_add, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(a_indices: O0, a_values: O1, a_shape: O2, b: O3, scope: &mut crate::Scope) -> crate::Result { SparseTensorDenseAdd::new().build(a_indices, a_values, a_shape, b, scope) } + /// Builder for the `SparseTensorDenseMatMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseTensorDenseMatMul { @@ -111884,6 +133871,12 @@ pub struct SparseTensorDenseMatMul { adjoint_b: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseTensorDenseMatMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseTensorDenseMatMulInst { + /// An instance of a fully built SparseTensorDenseMatMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseTensorDenseMatMul { /// Creates a new `SparseTensorDenseMatMul`. @@ -111898,10 +133891,7 @@ impl SparseTensorDenseMatMul { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -111925,36 +133915,10 @@ impl SparseTensorDenseMatMul { } /// Builds the `SparseTensorDenseMatMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - a_indices: O0, - a_values: O1, - a_shape: O2, - b: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - a_indices.into(), - a_values.into(), - a_shape.into(), - b.into(), - scope, - ) - } - - fn build_impl( - &self, - a_indices: crate::Output, - a_values: crate::Output, - a_shape: crate::Output, - b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, a_indices: O0, a_values: O1, a_shape: O2, b: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(a_indices.into(), a_values.into(), a_shape.into(), b.into(), scope) + } + fn build_impl(&self, a_indices: crate::Output, a_values: crate::Output, a_shape: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseTensorDenseMatMul", |nd| { nd.add_input(a_indices); nd.add_input(a_values); @@ -111963,44 +133927,83 @@ impl SparseTensorDenseMatMul { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adjoint_a { - nd.set_attr_bool("adjoint_a", *value)?; - } - if let ::std::option::Option::Some(value) = &self.adjoint_b { - nd.set_attr_bool("adjoint_b", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_a { + nd.set_attr_bool("adjoint_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_b { + nd.set_attr_bool("adjoint_b", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseTensorDenseMatMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, a_indices: O0, a_values: O1, a_shape: O2, b: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(a_indices.into(), a_values.into(), a_shape.into(), b.into(), scope) + } + fn build_instance_impl(&self, a_indices: crate::Output, a_values: crate::Output, a_shape: crate::Output, b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseTensorDenseMatMul", |nd| { + nd.add_input(a_indices); + nd.add_input(a_values); + nd.add_input(a_shape); + nd.add_input(b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_a { + nd.set_attr_bool("adjoint_a", *value)?; + } + if let ::std::option::Option::Some(value) = &self.adjoint_b { + nd.set_attr_bool("adjoint_b", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseTensorDenseMatMulInst{op}) + } +} +impl SparseTensorDenseMatMulInst { + /// Returns the 'product' output of this 'SparseTensorDenseMatMul' operation. + pub fn product(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseTensorDenseMatMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseTensorDenseMatMul::new().build(a_indices, a_values, a_shape, b, scope)`. -pub fn sparse_tensor_dense_mat_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - a_indices: O0, - a_values: O1, - a_shape: O2, - b: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_tensor_dense_mat_mul, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(a_indices: O0, a_values: O1, a_shape: O2, b: O3, scope: &mut crate::Scope) -> crate::Result { SparseTensorDenseMatMul::new().build(a_indices, a_values, a_shape, b, scope) } + /// Builder for the `SparseTensorSliceDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseTensorSliceDataset { Tvalues: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseTensorSliceDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseTensorSliceDatasetInst { + /// An instance of a fully built SparseTensorSliceDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseTensorSliceDataset { /// Creates a new `SparseTensorSliceDataset`. @@ -112009,10 +134012,7 @@ impl SparseTensorSliceDataset { } /// Sets the `Tvalues` attribute. - pub fn Tvalues>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tvalues>(mut self, value: ArgType) -> Self { self.Tvalues = ::std::option::Option::Some(value.into()); self } @@ -112024,27 +134024,10 @@ impl SparseTensorSliceDataset { } /// Builds the `SparseTensorSliceDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - indices: O0, - values: O1, - dense_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, indices: O0, values: O1, dense_shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(indices.into(), values.into(), dense_shape.into(), scope) } - - fn build_impl( - &self, - indices: crate::Output, - values: crate::Output, - dense_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, indices: crate::Output, values: crate::Output, dense_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseTensorSliceDataset", |nd| { nd.add_input(indices); nd.add_input(values); @@ -112052,33 +134035,64 @@ impl SparseTensorSliceDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tvalues { - nd.set_attr_type("Tvalues", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseTensorSliceDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, indices: O0, values: O1, dense_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), values.into(), dense_shape.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, values: crate::Output, dense_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseTensorSliceDataset", |nd| { + nd.add_input(indices); + nd.add_input(values); + nd.add_input(dense_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tvalues { + nd.set_attr_type("Tvalues", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseTensorSliceDatasetInst{op}) + } +} +impl SparseTensorSliceDatasetInst { + /// Returns the 'handle' output of this 'SparseTensorSliceDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseTensorSliceDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseTensorSliceDataset::new().build(indices, values, dense_shape, scope)`. -pub fn sparse_tensor_slice_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - indices: O0, - values: O1, - dense_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_tensor_slice_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(indices: O0, values: O1, dense_shape: O2, scope: &mut crate::Scope) -> crate::Result { SparseTensorSliceDataset::new().build(indices, values, dense_shape, scope) } + /// Builder for the `SparseTensorToCSRSparseMatrix` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseTensorToCSRSparseMatrix { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseTensorToCSRSparseMatrix' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseTensorToCSRSparseMatrixInst { + /// An instance of a fully built SparseTensorToCSRSparseMatrix Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseTensorToCSRSparseMatrix { /// Creates a new `SparseTensorToCSRSparseMatrix`. @@ -112099,27 +134113,10 @@ impl SparseTensorToCSRSparseMatrix { } /// Builds the `SparseTensorToCSRSparseMatrix` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - indices: O0, - values: O1, - dense_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, indices: O0, values: O1, dense_shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(indices.into(), values.into(), dense_shape.into(), scope) } - - fn build_impl( - &self, - indices: crate::Output, - values: crate::Output, - dense_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, indices: crate::Output, values: crate::Output, dense_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseTensorToCSRSparseMatrix", |nd| { nd.add_input(indices); nd.add_input(values); @@ -112127,27 +134124,52 @@ impl SparseTensorToCSRSparseMatrix { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseTensorToCSRSparseMatrix` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, indices: O0, values: O1, dense_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), values.into(), dense_shape.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, values: crate::Output, dense_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseTensorToCSRSparseMatrix", |nd| { + nd.add_input(indices); + nd.add_input(values); + nd.add_input(dense_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseTensorToCSRSparseMatrixInst{op}) + } +} +impl SparseTensorToCSRSparseMatrixInst { + /// Returns the 'sparse_matrix' output of this 'SparseTensorToCSRSparseMatrix' operation. + pub fn sparse_matrix(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseTensorToCSRSparseMatrixInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseTensorToCSRSparseMatrix::new().build(indices, values, dense_shape, scope)`. -pub fn sparse_tensor_to_csrsparse_matrix< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - indices: O0, - values: O1, - dense_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sparse_tensor_to_csrsparse_matrix, O1: ::std::convert::Into, O2: ::std::convert::Into>(indices: O0, values: O1, dense_shape: O2, scope: &mut crate::Scope) -> crate::Result { SparseTensorToCSRSparseMatrix::new().build(indices, values, dense_shape, scope) } + /// Builder for the `SparseToDense` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseToDense { @@ -112156,6 +134178,12 @@ pub struct SparseToDense { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseToDense' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseToDenseInst { + /// An instance of a fully built SparseToDense Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseToDense { /// Creates a new `SparseToDense`. @@ -112176,10 +134204,7 @@ impl SparseToDense { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -112191,36 +134216,10 @@ impl SparseToDense { } /// Builds the `SparseToDense` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - sparse_indices: O0, - output_shape: O1, - sparse_values: O2, - default_value: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - sparse_indices.into(), - output_shape.into(), - sparse_values.into(), - default_value.into(), - scope, - ) - } - - fn build_impl( - &self, - sparse_indices: crate::Output, - output_shape: crate::Output, - sparse_values: crate::Output, - default_value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sparse_indices: O0, output_shape: O1, sparse_values: O2, default_value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(sparse_indices.into(), output_shape.into(), sparse_values.into(), default_value.into(), scope) + } + fn build_impl(&self, sparse_indices: crate::Output, output_shape: crate::Output, sparse_values: crate::Output, default_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseToDense", |nd| { nd.add_input(sparse_indices); nd.add_input(output_shape); @@ -112229,41 +134228,65 @@ impl SparseToDense { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.validate_indices { - nd.set_attr_bool("validate_indices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseToDense` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, sparse_indices: O0, output_shape: O1, sparse_values: O2, default_value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_indices.into(), output_shape.into(), sparse_values.into(), default_value.into(), scope) + } + fn build_instance_impl(&self, sparse_indices: crate::Output, output_shape: crate::Output, sparse_values: crate::Output, default_value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseToDense", |nd| { + nd.add_input(sparse_indices); + nd.add_input(output_shape); + nd.add_input(sparse_values); + nd.add_input(default_value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseToDenseInst{op}) + } +} +impl SparseToDenseInst { + /// Returns the 'dense' output of this 'SparseToDense' operation. + pub fn dense(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SparseToDenseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseToDense::new().build(sparse_indices, output_shape, sparse_values, default_value, scope)`. -pub fn sparse_to_dense< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - sparse_indices: O0, - output_shape: O1, - sparse_values: O2, - default_value: O3, - scope: &mut crate::Scope, -) -> crate::Result { - SparseToDense::new().build( - sparse_indices, - output_shape, - sparse_values, - default_value, - scope, - ) +pub fn sparse_to_dense, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(sparse_indices: O0, output_shape: O1, sparse_values: O2, default_value: O3, scope: &mut crate::Scope) -> crate::Result { + SparseToDense::new().build(sparse_indices, output_shape, sparse_values, default_value, scope) } + /// Builder for the `SparseToSparseSetOperation` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SparseToSparseSetOperation { @@ -112272,6 +134295,12 @@ pub struct SparseToSparseSetOperation { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SparseToSparseSetOperation' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SparseToSparseSetOperationInst { + /// An instance of a fully built SparseToSparseSetOperation Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SparseToSparseSetOperation { /// Creates a new `SparseToSparseSetOperation`. @@ -112280,10 +134309,7 @@ impl SparseToSparseSetOperation { } /// Sets the `set_operation` attribute. - pub fn set_operation>( - mut self, - value: ArgType, - ) -> Self { + pub fn set_operation>(mut self, value: ArgType) -> Self { self.set_operation = ::std::option::Option::Some(value.into()); self } @@ -112307,44 +134333,10 @@ impl SparseToSparseSetOperation { } /// Builds the `SparseToSparseSetOperation` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - set1_indices: O0, - set1_values: O1, - set1_shape: O2, - set2_indices: O3, - set2_values: O4, - set2_shape: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - set1_indices.into(), - set1_values.into(), - set1_shape.into(), - set2_indices.into(), - set2_values.into(), - set2_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - set1_indices: crate::Output, - set1_values: crate::Output, - set1_shape: crate::Output, - set2_indices: crate::Output, - set2_values: crate::Output, - set2_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, set1_indices: O0, set1_values: O1, set1_shape: O2, set2_indices: O3, set2_values: O4, set2_shape: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(set1_indices.into(), set1_values.into(), set1_shape.into(), set2_indices.into(), set2_values.into(), set2_shape.into(), scope) + } + fn build_impl(&self, set1_indices: crate::Output, set1_values: crate::Output, set1_shape: crate::Output, set2_indices: crate::Output, set2_values: crate::Output, set2_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SparseToSparseSetOperation", |nd| { nd.add_input(set1_indices); nd.add_input(set1_values); @@ -112355,53 +134347,93 @@ impl SparseToSparseSetOperation { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.set_operation { - nd.set_attr_string("set_operation", value)?; - } - if let ::std::option::Option::Some(value) = &self.validate_indices { - nd.set_attr_bool("validate_indices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.set_operation { + nd.set_attr_string("set_operation", value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SparseToSparseSetOperation` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, set1_indices: O0, set1_values: O1, set1_shape: O2, set2_indices: O3, set2_values: O4, set2_shape: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(set1_indices.into(), set1_values.into(), set1_shape.into(), set2_indices.into(), set2_values.into(), set2_shape.into(), scope) + } + fn build_instance_impl(&self, set1_indices: crate::Output, set1_values: crate::Output, set1_shape: crate::Output, set2_indices: crate::Output, set2_values: crate::Output, set2_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SparseToSparseSetOperation", |nd| { + nd.add_input(set1_indices); + nd.add_input(set1_values); + nd.add_input(set1_shape); + nd.add_input(set2_indices); + nd.add_input(set2_values); + nd.add_input(set2_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.set_operation { + nd.set_attr_string("set_operation", value)?; + } + if let ::std::option::Option::Some(value) = &self.validate_indices { + nd.set_attr_bool("validate_indices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SparseToSparseSetOperationInst{op}) + } +} +impl SparseToSparseSetOperationInst { + /// Returns the 'result_indices' output of this 'SparseToSparseSetOperation' operation. + pub fn result_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'result_values' output of this 'SparseToSparseSetOperation' operation. + pub fn result_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'result_shape' output of this 'SparseToSparseSetOperation' operation. + pub fn result_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SparseToSparseSetOperationInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SparseToSparseSetOperation::new().build(set1_indices, set1_values, set1_shape, set2_indices, set2_values, set2_shape, scope)`. -pub fn sparse_to_sparse_set_operation< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - set1_indices: O0, - set1_values: O1, - set1_shape: O2, - set2_indices: O3, - set2_values: O4, - set2_shape: O5, - scope: &mut crate::Scope, -) -> crate::Result { - SparseToSparseSetOperation::new().build( - set1_indices, - set1_values, - set1_shape, - set2_indices, - set2_values, - set2_shape, - scope, - ) +pub fn sparse_to_sparse_set_operation, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(set1_indices: O0, set1_values: O1, set1_shape: O2, set2_indices: O3, set2_values: O4, set2_shape: O5, scope: &mut crate::Scope) -> crate::Result { + SparseToSparseSetOperation::new().build(set1_indices, set1_values, set1_shape, set2_indices, set2_values, set2_shape, scope) } + /// Builder for the `Spence` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Spence { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Spence' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SpenceInst { + /// An instance of a fully built Spence Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Spence { /// Creates a new `Spence`. @@ -112422,39 +134454,59 @@ impl Spence { } /// Builds the `Spence` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Spence", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Spence` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Spence", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SpenceInst{op}) + } +} +impl SpenceInst { + /// Returns the 'y' output of this 'Spence' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SpenceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Spence::new().build(x, scope)`. -pub fn spence>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn spence>(x: O0, scope: &mut crate::Scope) -> crate::Result { Spence::new().build(x, scope) } + /// Builder for the `Split` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Split { @@ -112462,6 +134514,12 @@ pub struct Split { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Split' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SplitInst { + /// An instance of a fully built Split Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Split { /// Creates a new `Split`. @@ -112488,49 +134546,72 @@ impl Split { } /// Builds the `Split` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - split_dim: O0, - value: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, split_dim: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(split_dim.into(), value.into(), scope) } - - fn build_impl( - &self, - split_dim: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, split_dim: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Split", |nd| { nd.add_input(split_dim); nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_split { - nd.set_attr_int("num_split", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_split { + nd.set_attr_int("num_split", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Split` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, split_dim: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(split_dim.into(), value.into(), scope) + } + fn build_instance_impl(&self, split_dim: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Split", |nd| { + nd.add_input(split_dim); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_split { + nd.set_attr_int("num_split", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SplitInst{op}) + } +} +impl SplitInst { + /// Returns a Vector of Outputs for 'output' output of this Split operation. + pub fn output(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_split")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for SplitInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Split::new().build(split_dim, value, scope)`. -pub fn split, O1: ::std::convert::Into>( - split_dim: O0, - value: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn split, O1: ::std::convert::Into>(split_dim: O0, value: O1, scope: &mut crate::Scope) -> crate::Result { Split::new().build(split_dim, value, scope) } + /// Builder for the `SplitV` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SplitV { @@ -112539,6 +134620,12 @@ pub struct SplitV { Tlen: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SplitV' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SplitVInst { + /// An instance of a fully built SplitV Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SplitV { /// Creates a new `SplitV`. @@ -112571,27 +134658,10 @@ impl SplitV { } /// Builds the `SplitV` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - value: O0, - size_splits: O1, - split_dim: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, value: O0, size_splits: O1, split_dim: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), size_splits.into(), split_dim.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - size_splits: crate::Output, - split_dim: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, size_splits: crate::Output, split_dim: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SplitV", |nd| { nd.add_input(value); nd.add_input(size_splits); @@ -112599,33 +134669,69 @@ impl SplitV { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_split { - nd.set_attr_int("num_split", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tlen { - nd.set_attr_type("Tlen", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_split { + nd.set_attr_int("num_split", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tlen { + nd.set_attr_type("Tlen", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SplitV` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, value: O0, size_splits: O1, split_dim: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), size_splits.into(), split_dim.into(), scope) + } + fn build_instance_impl(&self, value: crate::Output, size_splits: crate::Output, split_dim: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SplitV", |nd| { + nd.add_input(value); + nd.add_input(size_splits); + nd.add_input(split_dim); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_split { + nd.set_attr_int("num_split", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tlen { + nd.set_attr_type("Tlen", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SplitVInst{op}) + } +} +impl SplitVInst { + /// Returns a Vector of Outputs for 'output' output of this SplitV operation. + pub fn output(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_split")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for SplitVInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SplitV::new().build(value, size_splits, split_dim, scope)`. -pub fn split_v< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - value: O0, - size_splits: O1, - split_dim: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn split_v, O1: ::std::convert::Into, O2: ::std::convert::Into>(value: O0, size_splits: O1, split_dim: O2, scope: &mut crate::Scope) -> crate::Result { SplitV::new().build(value, size_splits, split_dim, scope) } + /// Builder for the `SqlDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SqlDataset { @@ -112633,6 +134739,12 @@ pub struct SqlDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SqlDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SqlDatasetInst { + /// An instance of a fully built SqlDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SqlDataset { /// Creates a new `SqlDataset`. @@ -112641,19 +134753,13 @@ impl SqlDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -112665,32 +134771,10 @@ impl SqlDataset { } /// Builds the `SqlDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - driver_name: O0, - data_source_name: O1, - query: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - driver_name.into(), - data_source_name.into(), - query.into(), - scope, - ) - } - - fn build_impl( - &self, - driver_name: crate::Output, - data_source_name: crate::Output, - query: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, driver_name: O0, data_source_name: O1, query: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(driver_name.into(), data_source_name.into(), query.into(), scope) + } + fn build_impl(&self, driver_name: crate::Output, data_source_name: crate::Output, query: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SqlDataset", |nd| { nd.add_input(driver_name); nd.add_input(data_source_name); @@ -112698,36 +134782,70 @@ impl SqlDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SqlDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, driver_name: O0, data_source_name: O1, query: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(driver_name.into(), data_source_name.into(), query.into(), scope) + } + fn build_instance_impl(&self, driver_name: crate::Output, data_source_name: crate::Output, query: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SqlDataset", |nd| { + nd.add_input(driver_name); + nd.add_input(data_source_name); + nd.add_input(query); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SqlDatasetInst{op}) + } +} +impl SqlDatasetInst { + /// Returns the 'handle' output of this 'SqlDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SqlDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SqlDataset::new().build(driver_name, data_source_name, query, scope)`. -pub fn sql_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - driver_name: O0, - data_source_name: O1, - query: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sql_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(driver_name: O0, data_source_name: O1, query: O2, scope: &mut crate::Scope) -> crate::Result { SqlDataset::new().build(driver_name, data_source_name, query, scope) } + /// Builder for the `Sqrt` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Sqrt { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Sqrt' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SqrtInst { + /// An instance of a fully built Sqrt Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Sqrt { /// Creates a new `Sqrt`. @@ -112748,45 +134866,71 @@ impl Sqrt { } /// Builds the `Sqrt` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Sqrt", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Sqrt` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Sqrt", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SqrtInst{op}) + } +} +impl SqrtInst { + /// Returns the 'y' output of this 'Sqrt' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SqrtInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Sqrt::new().build(x, scope)`. -pub fn sqrt>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sqrt>(x: O0, scope: &mut crate::Scope) -> crate::Result { Sqrt::new().build(x, scope) } + /// Builder for the `SqrtGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SqrtGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SqrtGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SqrtGradInst { + /// An instance of a fully built SqrtGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SqrtGrad { /// Creates a new `SqrtGrad`. @@ -112807,55 +134951,73 @@ impl SqrtGrad { } /// Builds the `SqrtGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - y: O0, - dy: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(y.into(), dy.into(), scope) } - - fn build_impl( - &self, - y: crate::Output, - dy: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SqrtGrad", |nd| { nd.add_input(y); nd.add_input(dy); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SqrtGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(y.into(), dy.into(), scope) + } + fn build_instance_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SqrtGrad", |nd| { + nd.add_input(y); + nd.add_input(dy); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SqrtGradInst{op}) + } +} +impl SqrtGradInst { + /// Returns the 'z' output of this 'SqrtGrad' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SqrtGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SqrtGrad::new().build(y, dy, scope)`. -pub fn sqrt_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - y: O0, - dy: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sqrt_grad, O1: ::std::convert::Into>(y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { SqrtGrad::new().build(y, dy, scope) } + /// Builder for the `Square` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Square { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Square' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SquareInst { + /// An instance of a fully built Square Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Square { /// Creates a new `Square`. @@ -112876,45 +135038,71 @@ impl Square { } /// Builds the `Square` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Square", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Square` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Square", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SquareInst{op}) + } +} +impl SquareInst { + /// Returns the 'y' output of this 'Square' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SquareInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Square::new().build(x, scope)`. -pub fn square>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn square>(x: O0, scope: &mut crate::Scope) -> crate::Result { Square::new().build(x, scope) } + /// Builder for the `SquaredDifference` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SquaredDifference { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'SquaredDifference' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SquaredDifferenceInst { + /// An instance of a fully built SquaredDifference Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SquaredDifference { /// Creates a new `SquaredDifference`. @@ -112935,49 +135123,61 @@ impl SquaredDifference { } /// Builds the `SquaredDifference` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SquaredDifference", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SquaredDifference` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SquaredDifference", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SquaredDifferenceInst{op}) + } +} +impl SquaredDifferenceInst { + /// Returns the 'z' output of this 'SquaredDifference' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SquaredDifferenceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SquaredDifference::new().build(x, y, scope)`. -pub fn squared_difference< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn squared_difference, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { SquaredDifference::new().build(x, y, scope) } + /// Builder for the `Squeeze` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Squeeze { @@ -112985,6 +135185,12 @@ pub struct Squeeze { squeeze_dims: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Squeeze' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SqueezeInst { + /// An instance of a fully built Squeeze Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Squeeze { /// Creates a new `Squeeze`. @@ -112999,10 +135205,7 @@ impl Squeeze { } /// Sets the `squeeze_dims` attribute. - pub fn squeeze_dims>>( - mut self, - value: ArgType, - ) -> Self { + pub fn squeeze_dims>>(mut self, value: ArgType) -> Self { self.squeeze_dims = ::std::option::Option::Some(value.into()); self } @@ -113014,42 +135217,65 @@ impl Squeeze { } /// Builds the `Squeeze` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Squeeze", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.squeeze_dims { - nd.set_attr_int_list("squeeze_dims", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.squeeze_dims { + nd.set_attr_int_list("squeeze_dims", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Squeeze` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Squeeze", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.squeeze_dims { + nd.set_attr_int_list("squeeze_dims", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SqueezeInst{op}) + } +} +impl SqueezeInst { + /// Returns the 'output' output of this 'Squeeze' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SqueezeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Squeeze::new().build(input, scope)`. -pub fn squeeze>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn squeeze>(input: O0, scope: &mut crate::Scope) -> crate::Result { Squeeze::new().build(input, scope) } + /// Builder for the `Stack` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Stack { @@ -113057,6 +135283,12 @@ pub struct Stack { stack_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Stack' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StackInst { + /// An instance of a fully built Stack Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Stack { /// Creates a new `Stack`. @@ -113065,19 +135297,13 @@ impl Stack { } /// Sets the `elem_type` attribute. - pub fn elem_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn elem_type>(mut self, value: ArgType) -> Self { self.elem_type = ::std::option::Option::Some(value.into()); self } /// Sets the `stack_name` attribute. - pub fn stack_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn stack_name>(mut self, value: ArgType) -> Self { self.stack_name = ::std::option::Option::Some(value.into()); self } @@ -113089,35 +135315,74 @@ impl Stack { } /// Builds the `Stack` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Stack", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.elem_type { - nd.set_attr_type("elem_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.stack_name { - nd.set_attr_string("stack_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.elem_type { + nd.set_attr_type("elem_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.stack_name { + nd.set_attr_string("stack_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Stack` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Stack", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.elem_type { + nd.set_attr_type("elem_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.stack_name { + nd.set_attr_string("stack_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StackInst{op}) + } +} +impl StackInst { + /// Returns the 'handle' output of this 'Stack' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StackInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Stack::new().build(scope)`. -pub fn stack(scope: &mut crate::Scope) -> crate::Result { +pub fn stack<>(scope: &mut crate::Scope) -> crate::Result { Stack::new().build(scope) } + /// Builder for the `StackClose` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StackClose { control_inputs: ::std::vec::Vec, } +/// An instance of 'StackClose' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StackCloseInst { + /// An instance of a fully built StackClose Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StackClose { /// Creates a new `StackClose`. @@ -113132,19 +135397,10 @@ impl StackClose { } /// Builds the `StackClose` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StackClose", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -113153,20 +135409,45 @@ impl StackClose { ::std::result::Result::Ok(()) }) } -} + /// Builds the `StackClose` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StackClose", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(StackCloseInst{op}) + } +} +impl StackCloseInst { +} +impl Into for StackCloseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StackClose::new().build(handle, scope)`. -pub fn stack_close>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stack_close>(handle: O0, scope: &mut crate::Scope) -> crate::Result { StackClose::new().build(handle, scope) } + /// Builder for the `StackCloseV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StackCloseV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'StackCloseV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StackCloseV2Inst { + /// An instance of a fully built StackCloseV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StackCloseV2 { /// Creates a new `StackCloseV2`. @@ -113181,19 +135462,10 @@ impl StackCloseV2 { } /// Builds the `StackCloseV2` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StackCloseV2", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -113202,21 +135474,46 @@ impl StackCloseV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `StackCloseV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StackCloseV2", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(StackCloseV2Inst{op}) + } +} +impl StackCloseV2Inst { +} +impl Into for StackCloseV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StackCloseV2::new().build(handle, scope)`. -pub fn stack_close_v2>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stack_close_v2>(handle: O0, scope: &mut crate::Scope) -> crate::Result { StackCloseV2::new().build(handle, scope) } + /// Builder for the `StackPop` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StackPop { elem_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StackPop' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StackPopInst { + /// An instance of a fully built StackPop Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StackPop { /// Creates a new `StackPop`. @@ -113225,10 +135522,7 @@ impl StackPop { } /// Sets the `elem_type` attribute. - pub fn elem_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn elem_type>(mut self, value: ArgType) -> Self { self.elem_type = ::std::option::Option::Some(value.into()); self } @@ -113240,45 +135534,71 @@ impl StackPop { } /// Builds the `StackPop` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StackPop", |nd| { nd.add_input(handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.elem_type { - nd.set_attr_type("elem_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.elem_type { + nd.set_attr_type("elem_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StackPop` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StackPop", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.elem_type { + nd.set_attr_type("elem_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StackPopInst{op}) + } +} +impl StackPopInst { + /// Returns the 'elem' output of this 'StackPop' operation. + pub fn elem(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StackPopInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StackPop::new().build(handle, scope)`. -pub fn stack_pop>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stack_pop>(handle: O0, scope: &mut crate::Scope) -> crate::Result { StackPop::new().build(handle, scope) } + /// Builder for the `StackPopV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StackPopV2 { elem_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StackPopV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StackPopV2Inst { + /// An instance of a fully built StackPopV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StackPopV2 { /// Creates a new `StackPopV2`. @@ -113287,10 +135607,7 @@ impl StackPopV2 { } /// Sets the `elem_type` attribute. - pub fn elem_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn elem_type>(mut self, value: ArgType) -> Self { self.elem_type = ::std::option::Option::Some(value.into()); self } @@ -113302,39 +135619,59 @@ impl StackPopV2 { } /// Builds the `StackPopV2` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StackPopV2", |nd| { nd.add_input(handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.elem_type { - nd.set_attr_type("elem_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.elem_type { + nd.set_attr_type("elem_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StackPopV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StackPopV2", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.elem_type { + nd.set_attr_type("elem_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StackPopV2Inst{op}) + } +} +impl StackPopV2Inst { + /// Returns the 'elem' output of this 'StackPopV2' operation. + pub fn elem(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StackPopV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StackPopV2::new().build(handle, scope)`. -pub fn stack_pop_v2>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stack_pop_v2>(handle: O0, scope: &mut crate::Scope) -> crate::Result { StackPopV2::new().build(handle, scope) } + /// Builder for the `StackPush` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StackPush { @@ -113342,6 +135679,12 @@ pub struct StackPush { swap_memory: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StackPush' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StackPushInst { + /// An instance of a fully built StackPush Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StackPush { /// Creates a new `StackPush`. @@ -113368,52 +135711,67 @@ impl StackPush { } /// Builds the `StackPush` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - elem: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, elem: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), elem.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - elem: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, elem: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StackPush", |nd| { nd.add_input(handle); nd.add_input(elem); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.swap_memory { - nd.set_attr_bool("swap_memory", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.swap_memory { + nd.set_attr_bool("swap_memory", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StackPush` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, elem: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), elem.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, elem: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StackPush", |nd| { + nd.add_input(handle); + nd.add_input(elem); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.swap_memory { + nd.set_attr_bool("swap_memory", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StackPushInst{op}) + } +} +impl StackPushInst { + /// Returns the 'output' output of this 'StackPush' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StackPushInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StackPush::new().build(handle, elem, scope)`. -pub fn stack_push< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - elem: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stack_push, O1: ::std::convert::Into>(handle: O0, elem: O1, scope: &mut crate::Scope) -> crate::Result { StackPush::new().build(handle, elem, scope) } + /// Builder for the `StackPushV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StackPushV2 { @@ -113421,6 +135779,12 @@ pub struct StackPushV2 { swap_memory: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StackPushV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StackPushV2Inst { + /// An instance of a fully built StackPushV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StackPushV2 { /// Creates a new `StackPushV2`. @@ -113447,52 +135811,67 @@ impl StackPushV2 { } /// Builds the `StackPushV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - elem: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, elem: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), elem.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - elem: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, elem: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StackPushV2", |nd| { nd.add_input(handle); nd.add_input(elem); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.swap_memory { - nd.set_attr_bool("swap_memory", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.swap_memory { + nd.set_attr_bool("swap_memory", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StackPushV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, elem: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), elem.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, elem: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StackPushV2", |nd| { + nd.add_input(handle); + nd.add_input(elem); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.swap_memory { + nd.set_attr_bool("swap_memory", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StackPushV2Inst{op}) + } +} +impl StackPushV2Inst { + /// Returns the 'output' output of this 'StackPushV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StackPushV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StackPushV2::new().build(handle, elem, scope)`. -pub fn stack_push_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - elem: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stack_push_v2, O1: ::std::convert::Into>(handle: O0, elem: O1, scope: &mut crate::Scope) -> crate::Result { StackPushV2::new().build(handle, elem, scope) } + /// Builder for the `StackV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StackV2 { @@ -113500,6 +135879,12 @@ pub struct StackV2 { stack_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StackV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StackV2Inst { + /// An instance of a fully built StackV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StackV2 { /// Creates a new `StackV2`. @@ -113508,19 +135893,13 @@ impl StackV2 { } /// Sets the `elem_type` attribute. - pub fn elem_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn elem_type>(mut self, value: ArgType) -> Self { self.elem_type = ::std::option::Option::Some(value.into()); self } /// Sets the `stack_name` attribute. - pub fn stack_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn stack_name>(mut self, value: ArgType) -> Self { self.stack_name = ::std::option::Option::Some(value.into()); self } @@ -113532,42 +135911,65 @@ impl StackV2 { } /// Builds the `StackV2` operation. - pub fn build>( - &self, - max_size: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, max_size: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(max_size.into(), scope) } - - fn build_impl( - &self, - max_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, max_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StackV2", |nd| { nd.add_input(max_size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.elem_type { - nd.set_attr_type("elem_type", *value)?; - } - if let ::std::option::Option::Some(value) = &self.stack_name { - nd.set_attr_string("stack_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.elem_type { + nd.set_attr_type("elem_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.stack_name { + nd.set_attr_string("stack_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StackV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, max_size: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(max_size.into(), scope) + } + fn build_instance_impl(&self, max_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StackV2", |nd| { + nd.add_input(max_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.elem_type { + nd.set_attr_type("elem_type", *value)?; + } + if let ::std::option::Option::Some(value) = &self.stack_name { + nd.set_attr_string("stack_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StackV2Inst{op}) + } +} +impl StackV2Inst { + /// Returns the 'handle' output of this 'StackV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StackV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StackV2::new().build(max_size, scope)`. -pub fn stack_v2>( - max_size: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stack_v2>(max_size: O0, scope: &mut crate::Scope) -> crate::Result { StackV2::new().build(max_size, scope) } + /// Builder for the `Stage` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Stage { @@ -113578,6 +135980,12 @@ pub struct Stage { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Stage' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StageInst { + /// An instance of a fully built Stage Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Stage { /// Creates a new `Stage`. @@ -113598,28 +136006,19 @@ impl Stage { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -113631,51 +136030,76 @@ impl Stage { } /// Builds the `Stage` operation. - pub fn build>( - &self, - values: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, values: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(values.into(), scope) } - - fn build_impl( - &self, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Stage", |nd| { nd.add_input(values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Stage` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, values: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(values.into(), scope) + } + fn build_instance_impl(&self, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Stage", |nd| { + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StageInst{op}) + } +} +impl StageInst { +} +impl Into for StageInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Stage::new().build(values, scope)`. -pub fn stage>( - values: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stage>(values: O0, scope: &mut crate::Scope) -> crate::Result { Stage::new().build(values, scope) } + /// Builder for the `StageClear` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StageClear { @@ -113686,6 +136110,12 @@ pub struct StageClear { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StageClear' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StageClearInst { + /// An instance of a fully built StageClear Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StageClear { /// Creates a new `StageClear`. @@ -113706,28 +136136,19 @@ impl StageClear { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -113739,39 +136160,74 @@ impl StageClear { } /// Builds the `StageClear` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StageClear", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StageClear` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StageClear", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StageClearInst{op}) + } +} +impl StageClearInst { +} +impl Into for StageClearInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StageClear::new().build(scope)`. -pub fn stage_clear(scope: &mut crate::Scope) -> crate::Result { +pub fn stage_clear<>(scope: &mut crate::Scope) -> crate::Result { StageClear::new().build(scope) } + /// Builder for the `StagePeek` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StagePeek { @@ -113782,6 +136238,12 @@ pub struct StagePeek { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StagePeek' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StagePeekInst { + /// An instance of a fully built StagePeek Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StagePeek { /// Creates a new `StagePeek`. @@ -113802,28 +136264,19 @@ impl StagePeek { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -113835,51 +136288,83 @@ impl StagePeek { } /// Builds the `StagePeek` operation. - pub fn build>( - &self, - index: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, index: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(index.into(), scope) } - - fn build_impl( - &self, - index: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StagePeek", |nd| { nd.add_input(index); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StagePeek` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, index: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(index.into(), scope) + } + fn build_instance_impl(&self, index: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StagePeek", |nd| { + nd.add_input(index); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StagePeekInst{op}) + } +} +impl StagePeekInst { + /// Returns the 'values' output of this 'StagePeek' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StagePeekInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StagePeek::new().build(index, scope)`. -pub fn stage_peek>( - index: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stage_peek>(index: O0, scope: &mut crate::Scope) -> crate::Result { StagePeek::new().build(index, scope) } + /// Builder for the `StageSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StageSize { @@ -113890,6 +136375,12 @@ pub struct StageSize { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StageSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StageSizeInst { + /// An instance of a fully built StageSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StageSize { /// Creates a new `StageSize`. @@ -113910,28 +136401,19 @@ impl StageSize { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -113943,39 +136425,81 @@ impl StageSize { } /// Builds the `StageSize` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StageSize", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StageSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StageSize", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StageSizeInst{op}) + } +} +impl StageSizeInst { + /// Returns the 'size' output of this 'StageSize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StageSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StageSize::new().build(scope)`. -pub fn stage_size(scope: &mut crate::Scope) -> crate::Result { +pub fn stage_size<>(scope: &mut crate::Scope) -> crate::Result { StageSize::new().build(scope) } + /// Builder for the `StatefulPartitionedCall` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatefulPartitionedCall { @@ -113987,6 +136511,12 @@ pub struct StatefulPartitionedCall { executor_type: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatefulPartitionedCall' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatefulPartitionedCallInst { + /// An instance of a fully built StatefulPartitionedCall Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatefulPartitionedCall { /// Creates a new `StatefulPartitionedCall`. @@ -113995,55 +136525,37 @@ impl StatefulPartitionedCall { } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } /// Sets the `config` attribute. - pub fn config>( - mut self, - value: ArgType, - ) -> Self { + pub fn config>(mut self, value: ArgType) -> Self { self.config = ::std::option::Option::Some(value.into()); self } /// Sets the `config_proto` attribute. - pub fn config_proto>( - mut self, - value: ArgType, - ) -> Self { + pub fn config_proto>(mut self, value: ArgType) -> Self { self.config_proto = ::std::option::Option::Some(value.into()); self } /// Sets the `executor_type` attribute. - pub fn executor_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn executor_type>(mut self, value: ArgType) -> Self { self.executor_type = ::std::option::Option::Some(value.into()); self } @@ -114055,54 +136567,89 @@ impl StatefulPartitionedCall { } /// Builds the `StatefulPartitionedCall` operation. - pub fn build>( - &self, - args: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, args: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(args.into(), scope) } - - fn build_impl( - &self, - args: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, args: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatefulPartitionedCall", |nd| { nd.add_input(args); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.config { - nd.set_attr_string("config", value)?; - } - if let ::std::option::Option::Some(value) = &self.config_proto { - nd.set_attr_string("config_proto", value)?; - } - if let ::std::option::Option::Some(value) = &self.executor_type { - nd.set_attr_string("executor_type", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + if let ::std::option::Option::Some(value) = &self.config_proto { + nd.set_attr_string("config_proto", value)?; + } + if let ::std::option::Option::Some(value) = &self.executor_type { + nd.set_attr_string("executor_type", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatefulPartitionedCall` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, args: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(args.into(), scope) + } + fn build_instance_impl(&self, args: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatefulPartitionedCall", |nd| { + nd.add_input(args); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.config { + nd.set_attr_string("config", value)?; + } + if let ::std::option::Option::Some(value) = &self.config_proto { + nd.set_attr_string("config_proto", value)?; + } + if let ::std::option::Option::Some(value) = &self.executor_type { + nd.set_attr_string("executor_type", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatefulPartitionedCallInst{op}) + } +} +impl StatefulPartitionedCallInst { + /// Returns the 'output' output of this 'StatefulPartitionedCall' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatefulPartitionedCallInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatefulPartitionedCall::new().build(args, scope)`. -pub fn stateful_partitioned_call>( - args: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateful_partitioned_call>(args: O0, scope: &mut crate::Scope) -> crate::Result { StatefulPartitionedCall::new().build(args, scope) } + /// Builder for the `StatefulRandomBinomial` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatefulRandomBinomial { @@ -114111,6 +136658,12 @@ pub struct StatefulRandomBinomial { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatefulRandomBinomial' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatefulRandomBinomialInst { + /// An instance of a fully built StatefulRandomBinomial Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatefulRandomBinomial { /// Creates a new `StatefulRandomBinomial`. @@ -114143,40 +136696,10 @@ impl StatefulRandomBinomial { } /// Builds the `StatefulRandomBinomial` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - resource: O0, - algorithm: O1, - shape: O2, - counts: O3, - probs: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - resource.into(), - algorithm.into(), - shape.into(), - counts.into(), - probs.into(), - scope, - ) - } - - fn build_impl( - &self, - resource: crate::Output, - algorithm: crate::Output, - shape: crate::Output, - counts: crate::Output, - probs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, counts: O3, probs: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(resource.into(), algorithm.into(), shape.into(), counts.into(), probs.into(), scope) + } + fn build_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, counts: crate::Output, probs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatefulRandomBinomial", |nd| { nd.add_input(resource); nd.add_input(algorithm); @@ -114186,37 +136709,66 @@ impl StatefulRandomBinomial { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.S { - nd.set_attr_type("S", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatefulRandomBinomial` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, counts: O3, probs: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), algorithm.into(), shape.into(), counts.into(), probs.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, counts: crate::Output, probs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatefulRandomBinomial", |nd| { + nd.add_input(resource); + nd.add_input(algorithm); + nd.add_input(shape); + nd.add_input(counts); + nd.add_input(probs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatefulRandomBinomialInst{op}) + } +} +impl StatefulRandomBinomialInst { + /// Returns the 'output' output of this 'StatefulRandomBinomial' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatefulRandomBinomialInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatefulRandomBinomial::new().build(resource, algorithm, shape, counts, probs, scope)`. -pub fn stateful_random_binomial< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - resource: O0, - algorithm: O1, - shape: O2, - counts: O3, - probs: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateful_random_binomial, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(resource: O0, algorithm: O1, shape: O2, counts: O3, probs: O4, scope: &mut crate::Scope) -> crate::Result { StatefulRandomBinomial::new().build(resource, algorithm, shape, counts, probs, scope) } + /// Builder for the `StatefulStandardNormal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatefulStandardNormal { @@ -114224,6 +136776,12 @@ pub struct StatefulStandardNormal { shape_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatefulStandardNormal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatefulStandardNormalInst { + /// An instance of a fully built StatefulStandardNormal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatefulStandardNormal { /// Creates a new `StatefulStandardNormal`. @@ -114238,10 +136796,7 @@ impl StatefulStandardNormal { } /// Sets the `shape_dtype` attribute. - pub fn shape_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_dtype>(mut self, value: ArgType) -> Self { self.shape_dtype = ::std::option::Option::Some(value.into()); self } @@ -114253,52 +136808,67 @@ impl StatefulStandardNormal { } /// Builds the `StatefulStandardNormal` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - resource: O0, - shape: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, resource: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), shape.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatefulStandardNormal", |nd| { nd.add_input(resource); nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_dtype { - nd.set_attr_type("shape_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatefulStandardNormal` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, resource: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), shape.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatefulStandardNormal", |nd| { + nd.add_input(resource); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatefulStandardNormalInst{op}) + } +} +impl StatefulStandardNormalInst { + /// Returns the 'output' output of this 'StatefulStandardNormal' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatefulStandardNormalInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatefulStandardNormal::new().build(resource, shape, scope)`. -pub fn stateful_standard_normal< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - resource: O0, - shape: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateful_standard_normal, O1: ::std::convert::Into>(resource: O0, shape: O1, scope: &mut crate::Scope) -> crate::Result { StatefulStandardNormal::new().build(resource, shape, scope) } + /// Builder for the `StatefulStandardNormalV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatefulStandardNormalV2 { @@ -114306,6 +136876,12 @@ pub struct StatefulStandardNormalV2 { shape_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatefulStandardNormalV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatefulStandardNormalV2Inst { + /// An instance of a fully built StatefulStandardNormalV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatefulStandardNormalV2 { /// Creates a new `StatefulStandardNormalV2`. @@ -114320,10 +136896,7 @@ impl StatefulStandardNormalV2 { } /// Sets the `shape_dtype` attribute. - pub fn shape_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_dtype>(mut self, value: ArgType) -> Self { self.shape_dtype = ::std::option::Option::Some(value.into()); self } @@ -114335,27 +136908,10 @@ impl StatefulStandardNormalV2 { } /// Builds the `StatefulStandardNormalV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - algorithm: O1, - shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), algorithm.into(), shape.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - algorithm: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatefulStandardNormalV2", |nd| { nd.add_input(resource); nd.add_input(algorithm); @@ -114363,30 +136919,58 @@ impl StatefulStandardNormalV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_dtype { - nd.set_attr_type("shape_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatefulStandardNormalV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), algorithm.into(), shape.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatefulStandardNormalV2", |nd| { + nd.add_input(resource); + nd.add_input(algorithm); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatefulStandardNormalV2Inst{op}) + } +} +impl StatefulStandardNormalV2Inst { + /// Returns the 'output' output of this 'StatefulStandardNormalV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatefulStandardNormalV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatefulStandardNormalV2::new().build(resource, algorithm, shape, scope)`. -pub fn stateful_standard_normal_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - algorithm: O1, - shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateful_standard_normal_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { StatefulStandardNormalV2::new().build(resource, algorithm, shape, scope) } + /// Builder for the `StatefulTruncatedNormal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatefulTruncatedNormal { @@ -114394,6 +136978,12 @@ pub struct StatefulTruncatedNormal { shape_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatefulTruncatedNormal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatefulTruncatedNormalInst { + /// An instance of a fully built StatefulTruncatedNormal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatefulTruncatedNormal { /// Creates a new `StatefulTruncatedNormal`. @@ -114408,10 +136998,7 @@ impl StatefulTruncatedNormal { } /// Sets the `shape_dtype` attribute. - pub fn shape_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_dtype>(mut self, value: ArgType) -> Self { self.shape_dtype = ::std::option::Option::Some(value.into()); self } @@ -114423,27 +137010,10 @@ impl StatefulTruncatedNormal { } /// Builds the `StatefulTruncatedNormal` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - algorithm: O1, - shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), algorithm.into(), shape.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - algorithm: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatefulTruncatedNormal", |nd| { nd.add_input(resource); nd.add_input(algorithm); @@ -114451,30 +137021,58 @@ impl StatefulTruncatedNormal { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_dtype { - nd.set_attr_type("shape_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatefulTruncatedNormal` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), algorithm.into(), shape.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatefulTruncatedNormal", |nd| { + nd.add_input(resource); + nd.add_input(algorithm); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatefulTruncatedNormalInst{op}) + } +} +impl StatefulTruncatedNormalInst { + /// Returns the 'output' output of this 'StatefulTruncatedNormal' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatefulTruncatedNormalInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatefulTruncatedNormal::new().build(resource, algorithm, shape, scope)`. -pub fn stateful_truncated_normal< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - algorithm: O1, - shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateful_truncated_normal, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { StatefulTruncatedNormal::new().build(resource, algorithm, shape, scope) } + /// Builder for the `StatefulUniform` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatefulUniform { @@ -114482,6 +137080,12 @@ pub struct StatefulUniform { shape_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatefulUniform' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatefulUniformInst { + /// An instance of a fully built StatefulUniform Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatefulUniform { /// Creates a new `StatefulUniform`. @@ -114496,10 +137100,7 @@ impl StatefulUniform { } /// Sets the `shape_dtype` attribute. - pub fn shape_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_dtype>(mut self, value: ArgType) -> Self { self.shape_dtype = ::std::option::Option::Some(value.into()); self } @@ -114511,27 +137112,10 @@ impl StatefulUniform { } /// Builds the `StatefulUniform` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - algorithm: O1, - shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), algorithm.into(), shape.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - algorithm: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatefulUniform", |nd| { nd.add_input(resource); nd.add_input(algorithm); @@ -114539,30 +137123,58 @@ impl StatefulUniform { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_dtype { - nd.set_attr_type("shape_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatefulUniform` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), algorithm.into(), shape.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatefulUniform", |nd| { + nd.add_input(resource); + nd.add_input(algorithm); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatefulUniformInst{op}) + } +} +impl StatefulUniformInst { + /// Returns the 'output' output of this 'StatefulUniform' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatefulUniformInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatefulUniform::new().build(resource, algorithm, shape, scope)`. -pub fn stateful_uniform< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - algorithm: O1, - shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateful_uniform, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { StatefulUniform::new().build(resource, algorithm, shape, scope) } + /// Builder for the `StatefulUniformFullInt` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatefulUniformFullInt { @@ -114570,6 +137182,12 @@ pub struct StatefulUniformFullInt { shape_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatefulUniformFullInt' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatefulUniformFullIntInst { + /// An instance of a fully built StatefulUniformFullInt Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatefulUniformFullInt { /// Creates a new `StatefulUniformFullInt`. @@ -114584,10 +137202,7 @@ impl StatefulUniformFullInt { } /// Sets the `shape_dtype` attribute. - pub fn shape_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_dtype>(mut self, value: ArgType) -> Self { self.shape_dtype = ::std::option::Option::Some(value.into()); self } @@ -114599,27 +137214,10 @@ impl StatefulUniformFullInt { } /// Builds the `StatefulUniformFullInt` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - resource: O0, - algorithm: O1, - shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), algorithm.into(), shape.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - algorithm: crate::Output, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatefulUniformFullInt", |nd| { nd.add_input(resource); nd.add_input(algorithm); @@ -114627,30 +137225,58 @@ impl StatefulUniformFullInt { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_dtype { - nd.set_attr_type("shape_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatefulUniformFullInt` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), algorithm.into(), shape.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatefulUniformFullInt", |nd| { + nd.add_input(resource); + nd.add_input(algorithm); + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatefulUniformFullIntInst{op}) + } +} +impl StatefulUniformFullIntInst { + /// Returns the 'output' output of this 'StatefulUniformFullInt' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatefulUniformFullIntInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatefulUniformFullInt::new().build(resource, algorithm, shape, scope)`. -pub fn stateful_uniform_full_int< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - resource: O0, - algorithm: O1, - shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateful_uniform_full_int, O1: ::std::convert::Into, O2: ::std::convert::Into>(resource: O0, algorithm: O1, shape: O2, scope: &mut crate::Scope) -> crate::Result { StatefulUniformFullInt::new().build(resource, algorithm, shape, scope) } + /// Builder for the `StatefulUniformInt` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatefulUniformInt { @@ -114658,6 +137284,12 @@ pub struct StatefulUniformInt { shape_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatefulUniformInt' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatefulUniformIntInst { + /// An instance of a fully built StatefulUniformInt Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatefulUniformInt { /// Creates a new `StatefulUniformInt`. @@ -114672,10 +137304,7 @@ impl StatefulUniformInt { } /// Sets the `shape_dtype` attribute. - pub fn shape_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_dtype>(mut self, value: ArgType) -> Self { self.shape_dtype = ::std::option::Option::Some(value.into()); self } @@ -114687,40 +137316,10 @@ impl StatefulUniformInt { } /// Builds the `StatefulUniformInt` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - resource: O0, - algorithm: O1, - shape: O2, - minval: O3, - maxval: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - resource.into(), - algorithm.into(), - shape.into(), - minval.into(), - maxval.into(), - scope, - ) - } - - fn build_impl( - &self, - resource: crate::Output, - algorithm: crate::Output, - shape: crate::Output, - minval: crate::Output, - maxval: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, minval: O3, maxval: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(resource.into(), algorithm.into(), shape.into(), minval.into(), maxval.into(), scope) + } + fn build_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, minval: crate::Output, maxval: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatefulUniformInt", |nd| { nd.add_input(resource); nd.add_input(algorithm); @@ -114730,34 +137329,60 @@ impl StatefulUniformInt { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_dtype { - nd.set_attr_type("shape_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatefulUniformInt` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, resource: O0, algorithm: O1, shape: O2, minval: O3, maxval: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), algorithm.into(), shape.into(), minval.into(), maxval.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, algorithm: crate::Output, shape: crate::Output, minval: crate::Output, maxval: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatefulUniformInt", |nd| { + nd.add_input(resource); + nd.add_input(algorithm); + nd.add_input(shape); + nd.add_input(minval); + nd.add_input(maxval); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_dtype { + nd.set_attr_type("shape_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatefulUniformIntInst{op}) + } +} +impl StatefulUniformIntInst { + /// Returns the 'output' output of this 'StatefulUniformInt' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatefulUniformIntInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatefulUniformInt::new().build(resource, algorithm, shape, minval, maxval, scope)`. -pub fn stateful_uniform_int< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - resource: O0, - algorithm: O1, - shape: O2, - minval: O3, - maxval: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateful_uniform_int, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(resource: O0, algorithm: O1, shape: O2, minval: O3, maxval: O4, scope: &mut crate::Scope) -> crate::Result { StatefulUniformInt::new().build(resource, algorithm, shape, minval, maxval, scope) } + /// Builder for the `StatelessCase` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessCase { @@ -114767,6 +137392,12 @@ pub struct StatelessCase { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessCase' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessCaseInst { + /// An instance of a fully built StatelessCase Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessCase { /// Creates a new `StatelessCase`. @@ -114775,37 +137406,25 @@ impl StatelessCase { } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } /// Sets the `branches` attribute. - pub fn branches>>( - mut self, - value: ArgType, - ) -> Self { + pub fn branches>>(mut self, value: ArgType) -> Self { self.branches = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -114817,58 +137436,79 @@ impl StatelessCase { } /// Builds the `StatelessCase` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - branch_index: O0, - input: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, branch_index: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(branch_index.into(), input.into(), scope) } - - fn build_impl( - &self, - branch_index: crate::Output, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, branch_index: crate::Output, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessCase", |nd| { nd.add_input(branch_index); nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } - if let ::std::option::Option::Some(value) = &self.branches { - nd.set_attr_string_list("branches", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.branches { + nd.set_attr_string_list("branches", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessCase` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, branch_index: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(branch_index.into(), input.into(), scope) + } + fn build_instance_impl(&self, branch_index: crate::Output, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessCase", |nd| { + nd.add_input(branch_index); + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.branches { + nd.set_attr_string_list("branches", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessCaseInst{op}) + } +} +impl StatelessCaseInst { + /// Returns the 'output' output of this 'StatelessCase' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessCaseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessCase::new().build(branch_index, input, scope)`. -pub fn stateless_case< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - branch_index: O0, - input: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_case, O1: ::std::convert::Into>(branch_index: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { StatelessCase::new().build(branch_index, input, scope) } + /// Builder for the `StatelessIf` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessIf { @@ -114880,6 +137520,12 @@ pub struct StatelessIf { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessIf' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessIfInst { + /// An instance of a fully built StatelessIf Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessIf { /// Creates a new `StatelessIf`. @@ -114894,46 +137540,31 @@ impl StatelessIf { } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } /// Sets the `then_branch` attribute. - pub fn then_branch>( - mut self, - value: ArgType, - ) -> Self { + pub fn then_branch>(mut self, value: ArgType) -> Self { self.then_branch = ::std::option::Option::Some(value.into()); self } /// Sets the `else_branch` attribute. - pub fn else_branch>( - mut self, - value: ArgType, - ) -> Self { + pub fn else_branch>(mut self, value: ArgType) -> Self { self.else_branch = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -114945,64 +137576,91 @@ impl StatelessIf { } /// Builds the `StatelessIf` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - cond: O0, - input: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, cond: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(cond.into(), input.into(), scope) } - - fn build_impl( - &self, - cond: crate::Output, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, cond: crate::Output, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessIf", |nd| { nd.add_input(cond); nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tcond { - nd.set_attr_type("Tcond", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } - if let ::std::option::Option::Some(value) = &self.then_branch { - nd.set_attr_string("then_branch", value)?; - } - if let ::std::option::Option::Some(value) = &self.else_branch { - nd.set_attr_string("else_branch", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tcond { + nd.set_attr_type("Tcond", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.then_branch { + nd.set_attr_string("then_branch", value)?; + } + if let ::std::option::Option::Some(value) = &self.else_branch { + nd.set_attr_string("else_branch", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessIf` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, cond: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(cond.into(), input.into(), scope) + } + fn build_instance_impl(&self, cond: crate::Output, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessIf", |nd| { + nd.add_input(cond); + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tcond { + nd.set_attr_type("Tcond", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.then_branch { + nd.set_attr_string("then_branch", value)?; + } + if let ::std::option::Option::Some(value) = &self.else_branch { + nd.set_attr_string("else_branch", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessIfInst{op}) + } +} +impl StatelessIfInst { + /// Returns the 'output' output of this 'StatelessIf' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessIfInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessIf::new().build(cond, input, scope)`. -pub fn stateless_if< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - cond: O0, - input: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_if, O1: ::std::convert::Into>(cond: O0, input: O1, scope: &mut crate::Scope) -> crate::Result { StatelessIf::new().build(cond, input, scope) } + /// Builder for the `StatelessMultinomial` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessMultinomial { @@ -115011,6 +137669,12 @@ pub struct StatelessMultinomial { output_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessMultinomial' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessMultinomialInst { + /// An instance of a fully built StatelessMultinomial Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessMultinomial { /// Creates a new `StatelessMultinomial`. @@ -115031,10 +137695,7 @@ impl StatelessMultinomial { } /// Sets the `output_dtype` attribute. - pub fn output_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_dtype>(mut self, value: ArgType) -> Self { self.output_dtype = ::std::option::Option::Some(value.into()); self } @@ -115046,27 +137707,10 @@ impl StatelessMultinomial { } /// Builds the `StatelessMultinomial` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - logits: O0, - num_samples: O1, - seed: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, logits: O0, num_samples: O1, seed: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(logits.into(), num_samples.into(), seed.into(), scope) } - - fn build_impl( - &self, - logits: crate::Output, - num_samples: crate::Output, - seed: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, logits: crate::Output, num_samples: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessMultinomial", |nd| { nd.add_input(logits); nd.add_input(num_samples); @@ -115074,33 +137718,64 @@ impl StatelessMultinomial { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.output_dtype { - nd.set_attr_type("output_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_dtype { + nd.set_attr_type("output_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessMultinomial` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, logits: O0, num_samples: O1, seed: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(logits.into(), num_samples.into(), seed.into(), scope) + } + fn build_instance_impl(&self, logits: crate::Output, num_samples: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessMultinomial", |nd| { + nd.add_input(logits); + nd.add_input(num_samples); + nd.add_input(seed); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.output_dtype { + nd.set_attr_type("output_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessMultinomialInst{op}) + } +} +impl StatelessMultinomialInst { + /// Returns the 'output' output of this 'StatelessMultinomial' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessMultinomialInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessMultinomial::new().build(logits, num_samples, seed, scope)`. -pub fn stateless_multinomial< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - logits: O0, - num_samples: O1, - seed: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_multinomial, O1: ::std::convert::Into, O2: ::std::convert::Into>(logits: O0, num_samples: O1, seed: O2, scope: &mut crate::Scope) -> crate::Result { StatelessMultinomial::new().build(logits, num_samples, seed, scope) } + /// Builder for the `StatelessParameterizedTruncatedNormal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessParameterizedTruncatedNormal { @@ -115109,6 +137784,12 @@ pub struct StatelessParameterizedTruncatedNormal { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessParameterizedTruncatedNormal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessParameterizedTruncatedNormalInst { + /// An instance of a fully built StatelessParameterizedTruncatedNormal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessParameterizedTruncatedNormal { /// Creates a new `StatelessParameterizedTruncatedNormal`. @@ -115141,44 +137822,10 @@ impl StatelessParameterizedTruncatedNormal { } /// Builds the `StatelessParameterizedTruncatedNormal` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - shape: O0, - seed: O1, - means: O2, - stddevs: O3, - minvals: O4, - maxvals: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - shape.into(), - seed.into(), - means.into(), - stddevs.into(), - minvals.into(), - maxvals.into(), - scope, - ) - } - - fn build_impl( - &self, - shape: crate::Output, - seed: crate::Output, - means: crate::Output, - stddevs: crate::Output, - minvals: crate::Output, - maxvals: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, shape: O0, seed: O1, means: O2, stddevs: O3, minvals: O4, maxvals: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(shape.into(), seed.into(), means.into(), stddevs.into(), minvals.into(), maxvals.into(), scope) + } + fn build_impl(&self, shape: crate::Output, seed: crate::Output, means: crate::Output, stddevs: crate::Output, minvals: crate::Output, maxvals: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessParameterizedTruncatedNormal", |nd| { nd.add_input(shape); nd.add_input(seed); @@ -115189,40 +137836,67 @@ impl StatelessParameterizedTruncatedNormal { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.S { - nd.set_attr_type("S", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessParameterizedTruncatedNormal` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, shape: O0, seed: O1, means: O2, stddevs: O3, minvals: O4, maxvals: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), seed.into(), means.into(), stddevs.into(), minvals.into(), maxvals.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, seed: crate::Output, means: crate::Output, stddevs: crate::Output, minvals: crate::Output, maxvals: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessParameterizedTruncatedNormal", |nd| { + nd.add_input(shape); + nd.add_input(seed); + nd.add_input(means); + nd.add_input(stddevs); + nd.add_input(minvals); + nd.add_input(maxvals); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessParameterizedTruncatedNormalInst{op}) + } +} +impl StatelessParameterizedTruncatedNormalInst { + /// Returns the 'output' output of this 'StatelessParameterizedTruncatedNormal' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessParameterizedTruncatedNormalInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessParameterizedTruncatedNormal::new().build(shape, seed, means, stddevs, minvals, maxvals, scope)`. -pub fn stateless_parameterized_truncated_normal< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - shape: O0, - seed: O1, - means: O2, - stddevs: O3, - minvals: O4, - maxvals: O5, - scope: &mut crate::Scope, -) -> crate::Result { - StatelessParameterizedTruncatedNormal::new() - .build(shape, seed, means, stddevs, minvals, maxvals, scope) +pub fn stateless_parameterized_truncated_normal, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(shape: O0, seed: O1, means: O2, stddevs: O3, minvals: O4, maxvals: O5, scope: &mut crate::Scope) -> crate::Result { + StatelessParameterizedTruncatedNormal::new().build(shape, seed, means, stddevs, minvals, maxvals, scope) } + /// Builder for the `StatelessRandomBinomial` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomBinomial { @@ -115232,6 +137906,12 @@ pub struct StatelessRandomBinomial { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomBinomial' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomBinomialInst { + /// An instance of a fully built StatelessRandomBinomial Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomBinomial { /// Creates a new `StatelessRandomBinomial`. @@ -115270,36 +137950,10 @@ impl StatelessRandomBinomial { } /// Builds the `StatelessRandomBinomial` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - shape: O0, - seed: O1, - counts: O2, - probs: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - shape.into(), - seed.into(), - counts.into(), - probs.into(), - scope, - ) - } - - fn build_impl( - &self, - shape: crate::Output, - seed: crate::Output, - counts: crate::Output, - probs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, seed: O1, counts: O2, probs: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(shape.into(), seed.into(), counts.into(), probs.into(), scope) + } + fn build_impl(&self, shape: crate::Output, seed: crate::Output, counts: crate::Output, probs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomBinomial", |nd| { nd.add_input(shape); nd.add_input(seed); @@ -115308,38 +137962,71 @@ impl StatelessRandomBinomial { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.S { - nd.set_attr_type("S", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomBinomial` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, seed: O1, counts: O2, probs: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), seed.into(), counts.into(), probs.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, seed: crate::Output, counts: crate::Output, probs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomBinomial", |nd| { + nd.add_input(shape); + nd.add_input(seed); + nd.add_input(counts); + nd.add_input(probs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.S { + nd.set_attr_type("S", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomBinomialInst{op}) + } +} +impl StatelessRandomBinomialInst { + /// Returns the 'output' output of this 'StatelessRandomBinomial' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomBinomialInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomBinomial::new().build(shape, seed, counts, probs, scope)`. -pub fn stateless_random_binomial< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - shape: O0, - seed: O1, - counts: O2, - probs: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_binomial, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(shape: O0, seed: O1, counts: O2, probs: O3, scope: &mut crate::Scope) -> crate::Result { StatelessRandomBinomial::new().build(shape, seed, counts, probs, scope) } + /// Builder for the `StatelessRandomGammaV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomGammaV2 { @@ -115348,6 +138035,12 @@ pub struct StatelessRandomGammaV2 { Tseed: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomGammaV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomGammaV2Inst { + /// An instance of a fully built StatelessRandomGammaV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomGammaV2 { /// Creates a new `StatelessRandomGammaV2`. @@ -115380,27 +138073,10 @@ impl StatelessRandomGammaV2 { } /// Builds the `StatelessRandomGammaV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - shape: O0, - seed: O1, - alpha: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, shape: O0, seed: O1, alpha: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), seed.into(), alpha.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - seed: crate::Output, - alpha: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, seed: crate::Output, alpha: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomGammaV2", |nd| { nd.add_input(shape); nd.add_input(seed); @@ -115408,38 +138084,75 @@ impl StatelessRandomGammaV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomGammaV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, shape: O0, seed: O1, alpha: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), seed.into(), alpha.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, seed: crate::Output, alpha: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomGammaV2", |nd| { + nd.add_input(shape); + nd.add_input(seed); + nd.add_input(alpha); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomGammaV2Inst{op}) + } +} +impl StatelessRandomGammaV2Inst { + /// Returns the 'output' output of this 'StatelessRandomGammaV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomGammaV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomGammaV2::new().build(shape, seed, alpha, scope)`. -pub fn stateless_random_gamma_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - shape: O0, - seed: O1, - alpha: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_gamma_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(shape: O0, seed: O1, alpha: O2, scope: &mut crate::Scope) -> crate::Result { StatelessRandomGammaV2::new().build(shape, seed, alpha, scope) } + /// Builder for the `StatelessRandomGetAlg` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomGetAlg { control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomGetAlg' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomGetAlgInst { + /// An instance of a fully built StatelessRandomGetAlg Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomGetAlg { /// Creates a new `StatelessRandomGetAlg`. @@ -115454,10 +138167,9 @@ impl StatelessRandomGetAlg { } /// Builds the `StatelessRandomGetAlg` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomGetAlg", |nd| { for op in &self.control_inputs { @@ -115466,18 +138178,52 @@ impl StatelessRandomGetAlg { ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomGetAlg` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomGetAlg", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomGetAlgInst{op}) + } +} +impl StatelessRandomGetAlgInst { + /// Returns the 'alg' output of this 'StatelessRandomGetAlg' operation. + pub fn alg(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomGetAlgInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomGetAlg::new().build(scope)`. -pub fn stateless_random_get_alg(scope: &mut crate::Scope) -> crate::Result { +pub fn stateless_random_get_alg<>(scope: &mut crate::Scope) -> crate::Result { StatelessRandomGetAlg::new().build(scope) } + /// Builder for the `StatelessRandomGetKeyCounter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomGetKeyCounter { Tseed: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomGetKeyCounter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomGetKeyCounterInst { + /// An instance of a fully built StatelessRandomGetKeyCounter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomGetKeyCounter { /// Creates a new `StatelessRandomGetKeyCounter`. @@ -115498,45 +138244,78 @@ impl StatelessRandomGetKeyCounter { } /// Builds the `StatelessRandomGetKeyCounter` operation. - pub fn build>( - &self, - seed: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, seed: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(seed.into(), scope) } - - fn build_impl( - &self, - seed: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomGetKeyCounter", |nd| { nd.add_input(seed); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomGetKeyCounter` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, seed: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(seed.into(), scope) + } + fn build_instance_impl(&self, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomGetKeyCounter", |nd| { + nd.add_input(seed); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomGetKeyCounterInst{op}) + } +} +impl StatelessRandomGetKeyCounterInst { + /// Returns the 'key' output of this 'StatelessRandomGetKeyCounter' operation. + pub fn key(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'counter' output of this 'StatelessRandomGetKeyCounter' operation. + pub fn counter(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for StatelessRandomGetKeyCounterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomGetKeyCounter::new().build(seed, scope)`. -pub fn stateless_random_get_key_counter>( - seed: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_get_key_counter>(seed: O0, scope: &mut crate::Scope) -> crate::Result { StatelessRandomGetKeyCounter::new().build(seed, scope) } + /// Builder for the `StatelessRandomGetKeyCounterAlg` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomGetKeyCounterAlg { Tseed: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomGetKeyCounterAlg' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomGetKeyCounterAlgInst { + /// An instance of a fully built StatelessRandomGetKeyCounterAlg Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomGetKeyCounterAlg { /// Creates a new `StatelessRandomGetKeyCounterAlg`. @@ -115557,39 +138336,73 @@ impl StatelessRandomGetKeyCounterAlg { } /// Builds the `StatelessRandomGetKeyCounterAlg` operation. - pub fn build>( - &self, - seed: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, seed: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(seed.into(), scope) } - - fn build_impl( - &self, - seed: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomGetKeyCounterAlg", |nd| { nd.add_input(seed); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomGetKeyCounterAlg` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, seed: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(seed.into(), scope) + } + fn build_instance_impl(&self, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomGetKeyCounterAlg", |nd| { + nd.add_input(seed); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomGetKeyCounterAlgInst{op}) + } +} +impl StatelessRandomGetKeyCounterAlgInst { + /// Returns the 'key' output of this 'StatelessRandomGetKeyCounterAlg' operation. + pub fn key(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'counter' output of this 'StatelessRandomGetKeyCounterAlg' operation. + pub fn counter(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'alg' output of this 'StatelessRandomGetKeyCounterAlg' operation. + pub fn alg(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for StatelessRandomGetKeyCounterAlgInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomGetKeyCounterAlg::new().build(seed, scope)`. -pub fn stateless_random_get_key_counter_alg>( - seed: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_get_key_counter_alg>(seed: O0, scope: &mut crate::Scope) -> crate::Result { StatelessRandomGetKeyCounterAlg::new().build(seed, scope) } + /// Builder for the `StatelessRandomNormal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomNormal { @@ -115598,6 +138411,12 @@ pub struct StatelessRandomNormal { Tseed: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomNormal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomNormalInst { + /// An instance of a fully built StatelessRandomNormal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomNormal { /// Creates a new `StatelessRandomNormal`. @@ -115630,55 +138449,73 @@ impl StatelessRandomNormal { } /// Builds the `StatelessRandomNormal` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - shape: O0, - seed: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), seed.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - seed: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomNormal", |nd| { nd.add_input(shape); nd.add_input(seed); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomNormal` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), seed.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomNormal", |nd| { + nd.add_input(shape); + nd.add_input(seed); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomNormalInst{op}) + } +} +impl StatelessRandomNormalInst { + /// Returns the 'output' output of this 'StatelessRandomNormal' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomNormalInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomNormal::new().build(shape, seed, scope)`. -pub fn stateless_random_normal< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - shape: O0, - seed: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_normal, O1: ::std::convert::Into>(shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { StatelessRandomNormal::new().build(shape, seed, scope) } + /// Builder for the `StatelessRandomNormalV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomNormalV2 { @@ -115686,6 +138523,12 @@ pub struct StatelessRandomNormalV2 { Tshape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomNormalV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomNormalV2Inst { + /// An instance of a fully built StatelessRandomNormalV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomNormalV2 { /// Creates a new `StatelessRandomNormalV2`. @@ -115700,10 +138543,7 @@ impl StatelessRandomNormalV2 { } /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshape>(mut self, value: ArgType) -> Self { self.Tshape = ::std::option::Option::Some(value.into()); self } @@ -115715,30 +138555,10 @@ impl StatelessRandomNormalV2 { } /// Builds the `StatelessRandomNormalV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - shape: O0, - key: O1, - counter: O2, - alg: O3, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), key.into(), counter.into(), alg.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - key: crate::Output, - counter: crate::Output, - alg: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, key: crate::Output, counter: crate::Output, alg: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomNormalV2", |nd| { nd.add_input(shape); nd.add_input(key); @@ -115747,32 +138567,59 @@ impl StatelessRandomNormalV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomNormalV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), key.into(), counter.into(), alg.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, key: crate::Output, counter: crate::Output, alg: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomNormalV2", |nd| { + nd.add_input(shape); + nd.add_input(key); + nd.add_input(counter); + nd.add_input(alg); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomNormalV2Inst{op}) + } +} +impl StatelessRandomNormalV2Inst { + /// Returns the 'output' output of this 'StatelessRandomNormalV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomNormalV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomNormalV2::new().build(shape, key, counter, alg, scope)`. -pub fn stateless_random_normal_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - shape: O0, - key: O1, - counter: O2, - alg: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_normal_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { StatelessRandomNormalV2::new().build(shape, key, counter, alg, scope) } + /// Builder for the `StatelessRandomPoisson` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomPoisson { @@ -115782,6 +138629,12 @@ pub struct StatelessRandomPoisson { Tseed: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomPoisson' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomPoissonInst { + /// An instance of a fully built StatelessRandomPoisson Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomPoisson { /// Creates a new `StatelessRandomPoisson`. @@ -115820,27 +138673,10 @@ impl StatelessRandomPoisson { } /// Builds the `StatelessRandomPoisson` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - shape: O0, - seed: O1, - lam: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, shape: O0, seed: O1, lam: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), seed.into(), lam.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - seed: crate::Output, - lam: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, seed: crate::Output, lam: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomPoisson", |nd| { nd.add_input(shape); nd.add_input(seed); @@ -115848,36 +138684,70 @@ impl StatelessRandomPoisson { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Rtype { - nd.set_attr_type("Rtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Rtype { + nd.set_attr_type("Rtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomPoisson` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, shape: O0, seed: O1, lam: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), seed.into(), lam.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, seed: crate::Output, lam: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomPoisson", |nd| { + nd.add_input(shape); + nd.add_input(seed); + nd.add_input(lam); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Rtype { + nd.set_attr_type("Rtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomPoissonInst{op}) + } +} +impl StatelessRandomPoissonInst { + /// Returns the 'output' output of this 'StatelessRandomPoisson' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomPoissonInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomPoisson::new().build(shape, seed, lam, scope)`. -pub fn stateless_random_poisson< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - shape: O0, - seed: O1, - lam: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_poisson, O1: ::std::convert::Into, O2: ::std::convert::Into>(shape: O0, seed: O1, lam: O2, scope: &mut crate::Scope) -> crate::Result { StatelessRandomPoisson::new().build(shape, seed, lam, scope) } + /// Builder for the `StatelessRandomUniform` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomUniform { @@ -115886,6 +138756,12 @@ pub struct StatelessRandomUniform { Tseed: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomUniform' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomUniformInst { + /// An instance of a fully built StatelessRandomUniform Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomUniform { /// Creates a new `StatelessRandomUniform`. @@ -115918,55 +138794,73 @@ impl StatelessRandomUniform { } /// Builds the `StatelessRandomUniform` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - shape: O0, - seed: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), seed.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - seed: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomUniform", |nd| { nd.add_input(shape); nd.add_input(seed); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomUniform` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), seed.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomUniform", |nd| { + nd.add_input(shape); + nd.add_input(seed); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomUniformInst{op}) + } +} +impl StatelessRandomUniformInst { + /// Returns the 'output' output of this 'StatelessRandomUniform' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomUniformInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomUniform::new().build(shape, seed, scope)`. -pub fn stateless_random_uniform< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - shape: O0, - seed: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_uniform, O1: ::std::convert::Into>(shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { StatelessRandomUniform::new().build(shape, seed, scope) } + /// Builder for the `StatelessRandomUniformFullInt` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomUniformFullInt { @@ -115975,6 +138869,12 @@ pub struct StatelessRandomUniformFullInt { Tseed: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomUniformFullInt' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomUniformFullIntInst { + /// An instance of a fully built StatelessRandomUniformFullInt Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomUniformFullInt { /// Creates a new `StatelessRandomUniformFullInt`. @@ -116007,55 +138907,73 @@ impl StatelessRandomUniformFullInt { } /// Builds the `StatelessRandomUniformFullInt` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - shape: O0, - seed: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), seed.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - seed: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomUniformFullInt", |nd| { nd.add_input(shape); nd.add_input(seed); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomUniformFullInt` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), seed.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomUniformFullInt", |nd| { + nd.add_input(shape); + nd.add_input(seed); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomUniformFullIntInst{op}) + } +} +impl StatelessRandomUniformFullIntInst { + /// Returns the 'output' output of this 'StatelessRandomUniformFullInt' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomUniformFullIntInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomUniformFullInt::new().build(shape, seed, scope)`. -pub fn stateless_random_uniform_full_int< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - shape: O0, - seed: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_uniform_full_int, O1: ::std::convert::Into>(shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { StatelessRandomUniformFullInt::new().build(shape, seed, scope) } + /// Builder for the `StatelessRandomUniformFullIntV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomUniformFullIntV2 { @@ -116063,6 +138981,12 @@ pub struct StatelessRandomUniformFullIntV2 { Tshape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomUniformFullIntV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomUniformFullIntV2Inst { + /// An instance of a fully built StatelessRandomUniformFullIntV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomUniformFullIntV2 { /// Creates a new `StatelessRandomUniformFullIntV2`. @@ -116077,10 +139001,7 @@ impl StatelessRandomUniformFullIntV2 { } /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshape>(mut self, value: ArgType) -> Self { self.Tshape = ::std::option::Option::Some(value.into()); self } @@ -116092,30 +139013,10 @@ impl StatelessRandomUniformFullIntV2 { } /// Builds the `StatelessRandomUniformFullIntV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - shape: O0, - key: O1, - counter: O2, - alg: O3, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), key.into(), counter.into(), alg.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - key: crate::Output, - counter: crate::Output, - alg: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, key: crate::Output, counter: crate::Output, alg: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomUniformFullIntV2", |nd| { nd.add_input(shape); nd.add_input(key); @@ -116124,32 +139025,59 @@ impl StatelessRandomUniformFullIntV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomUniformFullIntV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), key.into(), counter.into(), alg.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, key: crate::Output, counter: crate::Output, alg: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomUniformFullIntV2", |nd| { + nd.add_input(shape); + nd.add_input(key); + nd.add_input(counter); + nd.add_input(alg); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomUniformFullIntV2Inst{op}) + } +} +impl StatelessRandomUniformFullIntV2Inst { + /// Returns the 'output' output of this 'StatelessRandomUniformFullIntV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomUniformFullIntV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomUniformFullIntV2::new().build(shape, key, counter, alg, scope)`. -pub fn stateless_random_uniform_full_int_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - shape: O0, - key: O1, - counter: O2, - alg: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_uniform_full_int_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { StatelessRandomUniformFullIntV2::new().build(shape, key, counter, alg, scope) } + /// Builder for the `StatelessRandomUniformInt` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomUniformInt { @@ -116158,6 +139086,12 @@ pub struct StatelessRandomUniformInt { Tseed: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomUniformInt' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomUniformIntInst { + /// An instance of a fully built StatelessRandomUniformInt Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomUniformInt { /// Creates a new `StatelessRandomUniformInt`. @@ -116190,36 +139124,10 @@ impl StatelessRandomUniformInt { } /// Builds the `StatelessRandomUniformInt` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - shape: O0, - seed: O1, - minval: O2, - maxval: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - shape.into(), - seed.into(), - minval.into(), - maxval.into(), - scope, - ) - } - - fn build_impl( - &self, - shape: crate::Output, - seed: crate::Output, - minval: crate::Output, - maxval: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, seed: O1, minval: O2, maxval: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(shape.into(), seed.into(), minval.into(), maxval.into(), scope) + } + fn build_impl(&self, shape: crate::Output, seed: crate::Output, minval: crate::Output, maxval: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessRandomUniformInt", |nd| { nd.add_input(shape); nd.add_input(seed); @@ -116228,35 +139136,65 @@ impl StatelessRandomUniformInt { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessRandomUniformInt` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, seed: O1, minval: O2, maxval: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), seed.into(), minval.into(), maxval.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, seed: crate::Output, minval: crate::Output, maxval: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomUniformInt", |nd| { + nd.add_input(shape); + nd.add_input(seed); + nd.add_input(minval); + nd.add_input(maxval); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomUniformIntInst{op}) + } +} +impl StatelessRandomUniformIntInst { + /// Returns the 'output' output of this 'StatelessRandomUniformInt' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomUniformIntInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessRandomUniformInt::new().build(shape, seed, minval, maxval, scope)`. -pub fn stateless_random_uniform_int< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - shape: O0, - seed: O1, - minval: O2, - maxval: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_uniform_int, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(shape: O0, seed: O1, minval: O2, maxval: O3, scope: &mut crate::Scope) -> crate::Result { StatelessRandomUniformInt::new().build(shape, seed, minval, maxval, scope) } + /// Builder for the `StatelessRandomUniformIntV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessRandomUniformIntV2 { @@ -116264,6 +139202,12 @@ pub struct StatelessRandomUniformIntV2 { Tshape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessRandomUniformIntV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomUniformIntV2Inst { + /// An instance of a fully built StatelessRandomUniformIntV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessRandomUniformIntV2 { /// Creates a new `StatelessRandomUniformIntV2`. @@ -116278,10 +139222,115 @@ impl StatelessRandomUniformIntV2 { } /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshape>(mut self, value: ArgType) -> Self { + self.Tshape = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `StatelessRandomUniformIntV2` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, shape: O0, key: O1, counter: O2, alg: O3, minval: O4, maxval: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(shape.into(), key.into(), counter.into(), alg.into(), minval.into(), maxval.into(), scope) + } + fn build_impl(&self, shape: crate::Output, key: crate::Output, counter: crate::Output, alg: crate::Output, minval: crate::Output, maxval: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("StatelessRandomUniformIntV2", |nd| { + nd.add_input(shape); + nd.add_input(key); + nd.add_input(counter); + nd.add_input(alg); + nd.add_input(minval); + nd.add_input(maxval); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `StatelessRandomUniformIntV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(&self, shape: O0, key: O1, counter: O2, alg: O3, minval: O4, maxval: O5, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), key.into(), counter.into(), alg.into(), minval.into(), maxval.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, key: crate::Output, counter: crate::Output, alg: crate::Output, minval: crate::Output, maxval: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomUniformIntV2", |nd| { + nd.add_input(shape); + nd.add_input(key); + nd.add_input(counter); + nd.add_input(alg); + nd.add_input(minval); + nd.add_input(maxval); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessRandomUniformIntV2Inst{op}) + } +} +impl StatelessRandomUniformIntV2Inst { + /// Returns the 'output' output of this 'StatelessRandomUniformIntV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomUniformIntV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `StatelessRandomUniformIntV2::new().build(shape, key, counter, alg, minval, maxval, scope)`. +pub fn stateless_random_uniform_int_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into, O5: ::std::convert::Into>(shape: O0, key: O1, counter: O2, alg: O3, minval: O4, maxval: O5, scope: &mut crate::Scope) -> crate::Result { + StatelessRandomUniformIntV2::new().build(shape, key, counter, alg, minval, maxval, scope) +} + +/// Builder for the `StatelessRandomUniformV2` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct StatelessRandomUniformV2 { + dtype: ::std::option::Option, + Tshape: ::std::option::Option, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'StatelessRandomUniformV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessRandomUniformV2Inst { + /// An instance of a fully built StatelessRandomUniformV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl StatelessRandomUniformV2 { + /// Creates a new `StatelessRandomUniformV2`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `dtype` attribute. + pub fn dtype>(mut self, value: ArgType) -> Self { + self.dtype = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `Tshape` attribute. + pub fn Tshape>(mut self, value: ArgType) -> Self { self.Tshape = ::std::option::Option::Some(value.into()); self } @@ -116292,146 +139341,35 @@ impl StatelessRandomUniformIntV2 { self } - /// Builds the `StatelessRandomUniformIntV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, - >( - &self, - shape: O0, - key: O1, - counter: O2, - alg: O3, - minval: O4, - maxval: O5, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - shape.into(), - key.into(), - counter.into(), - alg.into(), - minval.into(), - maxval.into(), - scope, - ) - } - - fn build_impl( - &self, - shape: crate::Output, - key: crate::Output, - counter: crate::Output, - alg: crate::Output, - minval: crate::Output, - maxval: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("StatelessRandomUniformIntV2", |nd| { + /// Builds the `StatelessRandomUniformV2` operation. + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(shape.into(), key.into(), counter.into(), alg.into(), scope) + } + fn build_impl(&self, shape: crate::Output, key: crate::Output, counter: crate::Output, alg: crate::Output, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("StatelessRandomUniformV2", |nd| { nd.add_input(shape); nd.add_input(key); nd.add_input(counter); nd.add_input(alg); - nd.add_input(minval); - nd.add_input(maxval); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } ::std::result::Result::Ok(()) }) } -} -/// Shorthand for `StatelessRandomUniformIntV2::new().build(shape, key, counter, alg, minval, maxval, scope)`. -pub fn stateless_random_uniform_int_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - O5: ::std::convert::Into, ->( - shape: O0, - key: O1, - counter: O2, - alg: O3, - minval: O4, - maxval: O5, - scope: &mut crate::Scope, -) -> crate::Result { - StatelessRandomUniformIntV2::new().build(shape, key, counter, alg, minval, maxval, scope) -} -/// Builder for the `StatelessRandomUniformV2` operation. -#[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct StatelessRandomUniformV2 { - dtype: ::std::option::Option, - Tshape: ::std::option::Option, - control_inputs: ::std::vec::Vec, -} - -impl StatelessRandomUniformV2 { - /// Creates a new `StatelessRandomUniformV2`. - pub fn new() -> Self { - Self::default() - } - - /// Sets the `dtype` attribute. - pub fn dtype>(mut self, value: ArgType) -> Self { - self.dtype = ::std::option::Option::Some(value.into()); - self + /// Builds the `StatelessRandomUniformV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), key.into(), counter.into(), alg.into(), scope) } - - /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { - self.Tshape = ::std::option::Option::Some(value.into()); - self - } - - /// Adds a control input. - pub fn add_control_input(mut self, op: crate::Operation) -> Self { - self.control_inputs.push(op); - self - } - - /// Builds the `StatelessRandomUniformV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - shape: O0, - key: O1, - counter: O2, - alg: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl(shape.into(), key.into(), counter.into(), alg.into(), scope) - } - - fn build_impl( - &self, - shape: crate::Output, - key: crate::Output, - counter: crate::Output, - alg: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { - scope.new_operation("StatelessRandomUniformV2", |nd| { + fn build_instance_impl(&self, shape: crate::Output, key: crate::Output, counter: crate::Output, alg: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessRandomUniformV2", |nd| { nd.add_input(shape); nd.add_input(key); nd.add_input(counter); @@ -116439,32 +139377,36 @@ impl StatelessRandomUniformV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } ::std::result::Result::Ok(()) - }) + })?; + Ok(StatelessRandomUniformV2Inst{op}) + } +} +impl StatelessRandomUniformV2Inst { + /// Returns the 'output' output of this 'StatelessRandomUniformV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessRandomUniformV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `StatelessRandomUniformV2::new().build(shape, key, counter, alg, scope)`. -pub fn stateless_random_uniform_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - shape: O0, - key: O1, - counter: O2, - alg: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_random_uniform_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { StatelessRandomUniformV2::new().build(shape, key, counter, alg, scope) } + /// Builder for the `StatelessSampleDistortedBoundingBox` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessSampleDistortedBoundingBox { @@ -116476,6 +139418,12 @@ pub struct StatelessSampleDistortedBoundingBox { use_image_if_no_bounding_boxes: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessSampleDistortedBoundingBox' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessSampleDistortedBoundingBoxInst { + /// An instance of a fully built StatelessSampleDistortedBoundingBox Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessSampleDistortedBoundingBox { /// Creates a new `StatelessSampleDistortedBoundingBox`. @@ -116496,19 +139444,13 @@ impl StatelessSampleDistortedBoundingBox { } /// Sets the `aspect_ratio_range` attribute. - pub fn aspect_ratio_range>>( - mut self, - value: ArgType, - ) -> Self { + pub fn aspect_ratio_range>>(mut self, value: ArgType) -> Self { self.aspect_ratio_range = ::std::option::Option::Some(value.into()); self } /// Sets the `area_range` attribute. - pub fn area_range>>( - mut self, - value: ArgType, - ) -> Self { + pub fn area_range>>(mut self, value: ArgType) -> Self { self.area_range = ::std::option::Option::Some(value.into()); self } @@ -116520,10 +139462,7 @@ impl StatelessSampleDistortedBoundingBox { } /// Sets the `use_image_if_no_bounding_boxes` attribute. - pub fn use_image_if_no_bounding_boxes>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_image_if_no_bounding_boxes>(mut self, value: ArgType) -> Self { self.use_image_if_no_bounding_boxes = ::std::option::Option::Some(value.into()); self } @@ -116535,36 +139474,10 @@ impl StatelessSampleDistortedBoundingBox { } /// Builds the `StatelessSampleDistortedBoundingBox` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - image_size: O0, - bounding_boxes: O1, - min_object_covered: O2, - seed: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - image_size.into(), - bounding_boxes.into(), - min_object_covered.into(), - seed.into(), - scope, - ) - } - - fn build_impl( - &self, - image_size: crate::Output, - bounding_boxes: crate::Output, - min_object_covered: crate::Output, - seed: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, image_size: O0, bounding_boxes: O1, min_object_covered: O2, seed: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(image_size.into(), bounding_boxes.into(), min_object_covered.into(), seed.into(), scope) + } + fn build_impl(&self, image_size: crate::Output, bounding_boxes: crate::Output, min_object_covered: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessSampleDistortedBoundingBox", |nd| { nd.add_input(image_size); nd.add_input(bounding_boxes); @@ -116573,50 +139486,97 @@ impl StatelessSampleDistortedBoundingBox { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.aspect_ratio_range { - nd.set_attr_float_list("aspect_ratio_range", value)?; - } - if let ::std::option::Option::Some(value) = &self.area_range { - nd.set_attr_float_list("area_range", value)?; - } - if let ::std::option::Option::Some(value) = &self.max_attempts { - nd.set_attr_int("max_attempts", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_image_if_no_bounding_boxes { - nd.set_attr_bool("use_image_if_no_bounding_boxes", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.aspect_ratio_range { + nd.set_attr_float_list("aspect_ratio_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.area_range { + nd.set_attr_float_list("area_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_attempts { + nd.set_attr_int("max_attempts", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_image_if_no_bounding_boxes { + nd.set_attr_bool("use_image_if_no_bounding_boxes", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessSampleDistortedBoundingBox` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, image_size: O0, bounding_boxes: O1, min_object_covered: O2, seed: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(image_size.into(), bounding_boxes.into(), min_object_covered.into(), seed.into(), scope) + } + fn build_instance_impl(&self, image_size: crate::Output, bounding_boxes: crate::Output, min_object_covered: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessSampleDistortedBoundingBox", |nd| { + nd.add_input(image_size); + nd.add_input(bounding_boxes); + nd.add_input(min_object_covered); + nd.add_input(seed); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.aspect_ratio_range { + nd.set_attr_float_list("aspect_ratio_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.area_range { + nd.set_attr_float_list("area_range", value)?; + } + if let ::std::option::Option::Some(value) = &self.max_attempts { + nd.set_attr_int("max_attempts", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_image_if_no_bounding_boxes { + nd.set_attr_bool("use_image_if_no_bounding_boxes", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessSampleDistortedBoundingBoxInst{op}) + } +} +impl StatelessSampleDistortedBoundingBoxInst { + /// Returns the 'begin' output of this 'StatelessSampleDistortedBoundingBox' operation. + pub fn begin(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'size' output of this 'StatelessSampleDistortedBoundingBox' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'bboxes' output of this 'StatelessSampleDistortedBoundingBox' operation. + pub fn bboxes(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for StatelessSampleDistortedBoundingBoxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessSampleDistortedBoundingBox::new().build(image_size, bounding_boxes, min_object_covered, seed, scope)`. -pub fn stateless_sample_distorted_bounding_box< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - image_size: O0, - bounding_boxes: O1, - min_object_covered: O2, - seed: O3, - scope: &mut crate::Scope, -) -> crate::Result { - StatelessSampleDistortedBoundingBox::new().build( - image_size, - bounding_boxes, - min_object_covered, - seed, - scope, - ) +pub fn stateless_sample_distorted_bounding_box, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(image_size: O0, bounding_boxes: O1, min_object_covered: O2, seed: O3, scope: &mut crate::Scope) -> crate::Result { + StatelessSampleDistortedBoundingBox::new().build(image_size, bounding_boxes, min_object_covered, seed, scope) } + /// Builder for the `StatelessTruncatedNormal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessTruncatedNormal { @@ -116625,6 +139585,12 @@ pub struct StatelessTruncatedNormal { Tseed: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessTruncatedNormal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessTruncatedNormalInst { + /// An instance of a fully built StatelessTruncatedNormal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessTruncatedNormal { /// Creates a new `StatelessTruncatedNormal`. @@ -116657,55 +139623,73 @@ impl StatelessTruncatedNormal { } /// Builds the `StatelessTruncatedNormal` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - shape: O0, - seed: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), seed.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - seed: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessTruncatedNormal", |nd| { nd.add_input(shape); nd.add_input(seed); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tseed { - nd.set_attr_type("Tseed", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessTruncatedNormal` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), seed.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, seed: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessTruncatedNormal", |nd| { + nd.add_input(shape); + nd.add_input(seed); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tseed { + nd.set_attr_type("Tseed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessTruncatedNormalInst{op}) + } +} +impl StatelessTruncatedNormalInst { + /// Returns the 'output' output of this 'StatelessTruncatedNormal' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessTruncatedNormalInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessTruncatedNormal::new().build(shape, seed, scope)`. -pub fn stateless_truncated_normal< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - shape: O0, - seed: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_truncated_normal, O1: ::std::convert::Into>(shape: O0, seed: O1, scope: &mut crate::Scope) -> crate::Result { StatelessTruncatedNormal::new().build(shape, seed, scope) } + /// Builder for the `StatelessTruncatedNormalV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessTruncatedNormalV2 { @@ -116713,6 +139697,12 @@ pub struct StatelessTruncatedNormalV2 { Tshape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessTruncatedNormalV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessTruncatedNormalV2Inst { + /// An instance of a fully built StatelessTruncatedNormalV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessTruncatedNormalV2 { /// Creates a new `StatelessTruncatedNormalV2`. @@ -116727,10 +139717,7 @@ impl StatelessTruncatedNormalV2 { } /// Sets the `Tshape` attribute. - pub fn Tshape>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tshape>(mut self, value: ArgType) -> Self { self.Tshape = ::std::option::Option::Some(value.into()); self } @@ -116742,30 +139729,10 @@ impl StatelessTruncatedNormalV2 { } /// Builds the `StatelessTruncatedNormalV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - shape: O0, - key: O1, - counter: O2, - alg: O3, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), key.into(), counter.into(), alg.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - key: crate::Output, - counter: crate::Output, - alg: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, key: crate::Output, counter: crate::Output, alg: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessTruncatedNormalV2", |nd| { nd.add_input(shape); nd.add_input(key); @@ -116774,32 +139741,59 @@ impl StatelessTruncatedNormalV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tshape { - nd.set_attr_type("Tshape", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessTruncatedNormalV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), key.into(), counter.into(), alg.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, key: crate::Output, counter: crate::Output, alg: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessTruncatedNormalV2", |nd| { + nd.add_input(shape); + nd.add_input(key); + nd.add_input(counter); + nd.add_input(alg); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tshape { + nd.set_attr_type("Tshape", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessTruncatedNormalV2Inst{op}) + } +} +impl StatelessTruncatedNormalV2Inst { + /// Returns the 'output' output of this 'StatelessTruncatedNormalV2' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessTruncatedNormalV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessTruncatedNormalV2::new().build(shape, key, counter, alg, scope)`. -pub fn stateless_truncated_normal_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - shape: O0, - key: O1, - counter: O2, - alg: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_truncated_normal_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(shape: O0, key: O1, counter: O2, alg: O3, scope: &mut crate::Scope) -> crate::Result { StatelessTruncatedNormalV2::new().build(shape, key, counter, alg, scope) } + /// Builder for the `StatelessWhile` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatelessWhile { @@ -116810,6 +139804,12 @@ pub struct StatelessWhile { parallel_iterations: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatelessWhile' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatelessWhileInst { + /// An instance of a fully built StatelessWhile Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatelessWhile { /// Creates a new `StatelessWhile`. @@ -116818,46 +139818,31 @@ impl StatelessWhile { } /// Sets the `T` attribute. - pub fn T>>( - mut self, - value: ArgType, - ) -> Self { + pub fn T>>(mut self, value: ArgType) -> Self { self.T = ::std::option::Option::Some(value.into()); self } /// Sets the `cond` attribute. - pub fn cond>( - mut self, - value: ArgType, - ) -> Self { + pub fn cond>(mut self, value: ArgType) -> Self { self.cond = ::std::option::Option::Some(value.into()); self } /// Sets the `body` attribute. - pub fn body>( - mut self, - value: ArgType, - ) -> Self { + pub fn body>(mut self, value: ArgType) -> Self { self.body = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `parallel_iterations` attribute. - pub fn parallel_iterations>( - mut self, - value: ArgType, - ) -> Self { + pub fn parallel_iterations>(mut self, value: ArgType) -> Self { self.parallel_iterations = ::std::option::Option::Some(value.into()); self } @@ -116869,57 +139854,95 @@ impl StatelessWhile { } /// Builds the `StatelessWhile` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatelessWhile", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type_list("T", value)?; - } - if let ::std::option::Option::Some(value) = &self.cond { - nd.set_attr_string("cond", value)?; - } - if let ::std::option::Option::Some(value) = &self.body { - nd.set_attr_string("body", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.parallel_iterations { - nd.set_attr_int("parallel_iterations", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.cond { + nd.set_attr_string("cond", value)?; + } + if let ::std::option::Option::Some(value) = &self.body { + nd.set_attr_string("body", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.parallel_iterations { + nd.set_attr_int("parallel_iterations", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatelessWhile` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatelessWhile", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.cond { + nd.set_attr_string("cond", value)?; + } + if let ::std::option::Option::Some(value) = &self.body { + nd.set_attr_string("body", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.parallel_iterations { + nd.set_attr_int("parallel_iterations", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatelessWhileInst{op}) + } +} +impl StatelessWhileInst { + /// Returns the 'output' output of this 'StatelessWhile' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatelessWhileInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatelessWhile::new().build(input, scope)`. -pub fn stateless_while>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stateless_while>(input: O0, scope: &mut crate::Scope) -> crate::Result { StatelessWhile::new().build(input, scope) } + /// Builder for the `StaticRegexFullMatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StaticRegexFullMatch { pattern: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StaticRegexFullMatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StaticRegexFullMatchInst { + /// An instance of a fully built StaticRegexFullMatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StaticRegexFullMatch { /// Creates a new `StaticRegexFullMatch`. @@ -116928,10 +139951,7 @@ impl StaticRegexFullMatch { } /// Sets the `pattern` attribute. - pub fn pattern>( - mut self, - value: ArgType, - ) -> Self { + pub fn pattern>(mut self, value: ArgType) -> Self { self.pattern = ::std::option::Option::Some(value.into()); self } @@ -116943,39 +139963,59 @@ impl StaticRegexFullMatch { } /// Builds the `StaticRegexFullMatch` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StaticRegexFullMatch", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.pattern { - nd.set_attr_string("pattern", value)?; - } + if let ::std::option::Option::Some(value) = &self.pattern { + nd.set_attr_string("pattern", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StaticRegexFullMatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StaticRegexFullMatch", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.pattern { + nd.set_attr_string("pattern", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StaticRegexFullMatchInst{op}) + } +} +impl StaticRegexFullMatchInst { + /// Returns the 'output' output of this 'StaticRegexFullMatch' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StaticRegexFullMatchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StaticRegexFullMatch::new().build(input, scope)`. -pub fn static_regex_full_match>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn static_regex_full_match>(input: O0, scope: &mut crate::Scope) -> crate::Result { StaticRegexFullMatch::new().build(input, scope) } + /// Builder for the `StaticRegexReplace` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StaticRegexReplace { @@ -116984,6 +140024,12 @@ pub struct StaticRegexReplace { replace_global: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StaticRegexReplace' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StaticRegexReplaceInst { + /// An instance of a fully built StaticRegexReplace Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StaticRegexReplace { /// Creates a new `StaticRegexReplace`. @@ -116992,19 +140038,13 @@ impl StaticRegexReplace { } /// Sets the `pattern` attribute. - pub fn pattern>( - mut self, - value: ArgType, - ) -> Self { + pub fn pattern>(mut self, value: ArgType) -> Self { self.pattern = ::std::option::Option::Some(value.into()); self } /// Sets the `rewrite` attribute. - pub fn rewrite>( - mut self, - value: ArgType, - ) -> Self { + pub fn rewrite>(mut self, value: ArgType) -> Self { self.rewrite = ::std::option::Option::Some(value.into()); self } @@ -117022,45 +140062,71 @@ impl StaticRegexReplace { } /// Builds the `StaticRegexReplace` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StaticRegexReplace", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.pattern { - nd.set_attr_string("pattern", value)?; - } - if let ::std::option::Option::Some(value) = &self.rewrite { - nd.set_attr_string("rewrite", value)?; - } - if let ::std::option::Option::Some(value) = &self.replace_global { - nd.set_attr_bool("replace_global", *value)?; - } + if let ::std::option::Option::Some(value) = &self.pattern { + nd.set_attr_string("pattern", value)?; + } + if let ::std::option::Option::Some(value) = &self.rewrite { + nd.set_attr_string("rewrite", value)?; + } + if let ::std::option::Option::Some(value) = &self.replace_global { + nd.set_attr_bool("replace_global", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StaticRegexReplace` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StaticRegexReplace", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.pattern { + nd.set_attr_string("pattern", value)?; + } + if let ::std::option::Option::Some(value) = &self.rewrite { + nd.set_attr_string("rewrite", value)?; + } + if let ::std::option::Option::Some(value) = &self.replace_global { + nd.set_attr_bool("replace_global", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StaticRegexReplaceInst{op}) + } +} +impl StaticRegexReplaceInst { + /// Returns the 'output' output of this 'StaticRegexReplace' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StaticRegexReplaceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StaticRegexReplace::new().build(input, scope)`. -pub fn static_regex_replace>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn static_regex_replace>(input: O0, scope: &mut crate::Scope) -> crate::Result { StaticRegexReplace::new().build(input, scope) } + /// Builder for the `StatsAggregatorHandle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatsAggregatorHandle { @@ -117068,6 +140134,12 @@ pub struct StatsAggregatorHandle { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatsAggregatorHandle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatsAggregatorHandleInst { + /// An instance of a fully built StatsAggregatorHandle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatsAggregatorHandle { /// Creates a new `StatsAggregatorHandle`. @@ -117076,19 +140148,13 @@ impl StatsAggregatorHandle { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -117100,30 +140166,63 @@ impl StatsAggregatorHandle { } /// Builds the `StatsAggregatorHandle` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatsAggregatorHandle", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatsAggregatorHandle` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatsAggregatorHandle", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatsAggregatorHandleInst{op}) + } +} +impl StatsAggregatorHandleInst { + /// Returns the 'handle' output of this 'StatsAggregatorHandle' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatsAggregatorHandleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatsAggregatorHandle::new().build(scope)`. -pub fn stats_aggregator_handle(scope: &mut crate::Scope) -> crate::Result { +pub fn stats_aggregator_handle<>(scope: &mut crate::Scope) -> crate::Result { StatsAggregatorHandle::new().build(scope) } + /// Builder for the `StatsAggregatorHandleV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatsAggregatorHandleV2 { @@ -117131,6 +140230,12 @@ pub struct StatsAggregatorHandleV2 { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StatsAggregatorHandleV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatsAggregatorHandleV2Inst { + /// An instance of a fully built StatsAggregatorHandleV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatsAggregatorHandleV2 { /// Creates a new `StatsAggregatorHandleV2`. @@ -117139,19 +140244,13 @@ impl StatsAggregatorHandleV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -117163,35 +140262,74 @@ impl StatsAggregatorHandleV2 { } /// Builds the `StatsAggregatorHandleV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatsAggregatorHandleV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatsAggregatorHandleV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatsAggregatorHandleV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StatsAggregatorHandleV2Inst{op}) + } +} +impl StatsAggregatorHandleV2Inst { + /// Returns the 'handle' output of this 'StatsAggregatorHandleV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatsAggregatorHandleV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatsAggregatorHandleV2::new().build(scope)`. -pub fn stats_aggregator_handle_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn stats_aggregator_handle_v2<>(scope: &mut crate::Scope) -> crate::Result { StatsAggregatorHandleV2::new().build(scope) } + /// Builder for the `StatsAggregatorSetSummaryWriter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatsAggregatorSetSummaryWriter { control_inputs: ::std::vec::Vec, } +/// An instance of 'StatsAggregatorSetSummaryWriter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatsAggregatorSetSummaryWriterInst { + /// An instance of a fully built StatsAggregatorSetSummaryWriter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatsAggregatorSetSummaryWriter { /// Creates a new `StatsAggregatorSetSummaryWriter`. @@ -117206,24 +140344,10 @@ impl StatsAggregatorSetSummaryWriter { } /// Builds the `StatsAggregatorSetSummaryWriter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - stats_aggregator: O0, - summary: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, stats_aggregator: O0, summary: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(stats_aggregator.into(), summary.into(), scope) } - - fn build_impl( - &self, - stats_aggregator: crate::Output, - summary: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, stats_aggregator: crate::Output, summary: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatsAggregatorSetSummaryWriter", |nd| { nd.add_input(stats_aggregator); nd.add_input(summary); @@ -117233,24 +140357,46 @@ impl StatsAggregatorSetSummaryWriter { ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatsAggregatorSetSummaryWriter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, stats_aggregator: O0, summary: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(stats_aggregator.into(), summary.into(), scope) + } + fn build_instance_impl(&self, stats_aggregator: crate::Output, summary: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatsAggregatorSetSummaryWriter", |nd| { + nd.add_input(stats_aggregator); + nd.add_input(summary); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(StatsAggregatorSetSummaryWriterInst{op}) + } +} +impl StatsAggregatorSetSummaryWriterInst { +} +impl Into for StatsAggregatorSetSummaryWriterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatsAggregatorSetSummaryWriter::new().build(stats_aggregator, summary, scope)`. -pub fn stats_aggregator_set_summary_writer< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - stats_aggregator: O0, - summary: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stats_aggregator_set_summary_writer, O1: ::std::convert::Into>(stats_aggregator: O0, summary: O1, scope: &mut crate::Scope) -> crate::Result { StatsAggregatorSetSummaryWriter::new().build(stats_aggregator, summary, scope) } + /// Builder for the `StatsAggregatorSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StatsAggregatorSummary { control_inputs: ::std::vec::Vec, } +/// An instance of 'StatsAggregatorSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StatsAggregatorSummaryInst { + /// An instance of a fully built StatsAggregatorSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StatsAggregatorSummary { /// Creates a new `StatsAggregatorSummary`. @@ -117265,19 +140411,10 @@ impl StatsAggregatorSummary { } /// Builds the `StatsAggregatorSummary` operation. - pub fn build>( - &self, - iterator: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, iterator: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(iterator.into(), scope) } - - fn build_impl( - &self, - iterator: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StatsAggregatorSummary", |nd| { nd.add_input(iterator); for op in &self.control_inputs { @@ -117286,21 +140423,53 @@ impl StatsAggregatorSummary { ::std::result::Result::Ok(()) }) } -} + /// Builds the `StatsAggregatorSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, iterator: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(iterator.into(), scope) + } + fn build_instance_impl(&self, iterator: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StatsAggregatorSummary", |nd| { + nd.add_input(iterator); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(StatsAggregatorSummaryInst{op}) + } +} +impl StatsAggregatorSummaryInst { + /// Returns the 'summary' output of this 'StatsAggregatorSummary' operation. + pub fn summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StatsAggregatorSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StatsAggregatorSummary::new().build(iterator, scope)`. -pub fn stats_aggregator_summary>( - iterator: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stats_aggregator_summary>(iterator: O0, scope: &mut crate::Scope) -> crate::Result { StatsAggregatorSummary::new().build(iterator, scope) } + /// Builder for the `StopGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StopGradient { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StopGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StopGradientInst { + /// An instance of a fully built StopGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StopGradient { /// Creates a new `StopGradient`. @@ -117321,39 +140490,59 @@ impl StopGradient { } /// Builds the `StopGradient` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StopGradient", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StopGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StopGradient", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StopGradientInst{op}) + } +} +impl StopGradientInst { + /// Returns the 'output' output of this 'StopGradient' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StopGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StopGradient::new().build(input, scope)`. -pub fn stop_gradient>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn stop_gradient>(input: O0, scope: &mut crate::Scope) -> crate::Result { StopGradient::new().build(input, scope) } + /// Builder for the `StridedSlice` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StridedSlice { @@ -117366,6 +140555,12 @@ pub struct StridedSlice { shrink_axis_mask: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StridedSlice' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StridedSliceInst { + /// An instance of a fully built StridedSlice Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StridedSlice { /// Creates a new `StridedSlice`. @@ -117422,36 +140617,10 @@ impl StridedSlice { } /// Builds the `StridedSlice` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - input: O0, - begin: O1, - end: O2, - strides: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - begin.into(), - end.into(), - strides.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - begin: crate::Output, - end: crate::Output, - strides: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, begin: O1, end: O2, strides: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), begin.into(), end.into(), strides.into(), scope) + } + fn build_impl(&self, input: crate::Output, begin: crate::Output, end: crate::Output, strides: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StridedSlice", |nd| { nd.add_input(input); nd.add_input(begin); @@ -117460,47 +140629,89 @@ impl StridedSlice { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Index { - nd.set_attr_type("Index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.begin_mask { - nd.set_attr_int("begin_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.end_mask { - nd.set_attr_int("end_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ellipsis_mask { - nd.set_attr_int("ellipsis_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.new_axis_mask { - nd.set_attr_int("new_axis_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { - nd.set_attr_int("shrink_axis_mask", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.begin_mask { + nd.set_attr_int("begin_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.end_mask { + nd.set_attr_int("end_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ellipsis_mask { + nd.set_attr_int("ellipsis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.new_axis_mask { + nd.set_attr_int("new_axis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { + nd.set_attr_int("shrink_axis_mask", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StridedSlice` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, input: O0, begin: O1, end: O2, strides: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), begin.into(), end.into(), strides.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, begin: crate::Output, end: crate::Output, strides: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StridedSlice", |nd| { + nd.add_input(input); + nd.add_input(begin); + nd.add_input(end); + nd.add_input(strides); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.begin_mask { + nd.set_attr_int("begin_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.end_mask { + nd.set_attr_int("end_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ellipsis_mask { + nd.set_attr_int("ellipsis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.new_axis_mask { + nd.set_attr_int("new_axis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { + nd.set_attr_int("shrink_axis_mask", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StridedSliceInst{op}) + } +} +impl StridedSliceInst { + /// Returns the 'output' output of this 'StridedSlice' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StridedSliceInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StridedSlice::new().build(input, begin, end, strides, scope)`. -pub fn strided_slice< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - input: O0, - begin: O1, - end: O2, - strides: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn strided_slice, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(input: O0, begin: O1, end: O2, strides: O3, scope: &mut crate::Scope) -> crate::Result { StridedSlice::new().build(input, begin, end, strides, scope) } + /// Builder for the `StridedSliceAssign` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StridedSliceAssign { @@ -117513,6 +140724,12 @@ pub struct StridedSliceAssign { shrink_axis_mask: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StridedSliceAssign' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StridedSliceAssignInst { + /// An instance of a fully built StridedSliceAssign Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StridedSliceAssign { /// Creates a new `StridedSliceAssign`. @@ -117569,40 +140786,10 @@ impl StridedSliceAssign { } /// Builds the `StridedSliceAssign` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - ref_: O0, - begin: O1, - end: O2, - strides: O3, - value: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - ref_.into(), - begin.into(), - end.into(), - strides.into(), - value.into(), - scope, - ) - } - - fn build_impl( - &self, - ref_: crate::Output, - begin: crate::Output, - end: crate::Output, - strides: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, ref_: O0, begin: O1, end: O2, strides: O3, value: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(ref_.into(), begin.into(), end.into(), strides.into(), value.into(), scope) + } + fn build_impl(&self, ref_: crate::Output, begin: crate::Output, end: crate::Output, strides: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StridedSliceAssign", |nd| { nd.add_input(ref_); nd.add_input(begin); @@ -117612,49 +140799,90 @@ impl StridedSliceAssign { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Index { - nd.set_attr_type("Index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.begin_mask { - nd.set_attr_int("begin_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.end_mask { - nd.set_attr_int("end_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ellipsis_mask { - nd.set_attr_int("ellipsis_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.new_axis_mask { - nd.set_attr_int("new_axis_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { - nd.set_attr_int("shrink_axis_mask", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.begin_mask { + nd.set_attr_int("begin_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.end_mask { + nd.set_attr_int("end_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ellipsis_mask { + nd.set_attr_int("ellipsis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.new_axis_mask { + nd.set_attr_int("new_axis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { + nd.set_attr_int("shrink_axis_mask", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StridedSliceAssign` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, ref_: O0, begin: O1, end: O2, strides: O3, value: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(ref_.into(), begin.into(), end.into(), strides.into(), value.into(), scope) + } + fn build_instance_impl(&self, ref_: crate::Output, begin: crate::Output, end: crate::Output, strides: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StridedSliceAssign", |nd| { + nd.add_input(ref_); + nd.add_input(begin); + nd.add_input(end); + nd.add_input(strides); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.begin_mask { + nd.set_attr_int("begin_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.end_mask { + nd.set_attr_int("end_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ellipsis_mask { + nd.set_attr_int("ellipsis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.new_axis_mask { + nd.set_attr_int("new_axis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { + nd.set_attr_int("shrink_axis_mask", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StridedSliceAssignInst{op}) + } +} +impl StridedSliceAssignInst { + /// Returns the 'output_ref' output of this 'StridedSliceAssign' operation. + pub fn output_ref(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StridedSliceAssignInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StridedSliceAssign::new().build(ref_, begin, end, strides, value, scope)`. -pub fn strided_slice_assign< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - ref_: O0, - begin: O1, - end: O2, - strides: O3, - value: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn strided_slice_assign, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(ref_: O0, begin: O1, end: O2, strides: O3, value: O4, scope: &mut crate::Scope) -> crate::Result { StridedSliceAssign::new().build(ref_, begin, end, strides, value, scope) } + /// Builder for the `StridedSliceGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StridedSliceGrad { @@ -117667,6 +140895,12 @@ pub struct StridedSliceGrad { shrink_axis_mask: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StridedSliceGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StridedSliceGradInst { + /// An instance of a fully built StridedSliceGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StridedSliceGrad { /// Creates a new `StridedSliceGrad`. @@ -117723,40 +140957,10 @@ impl StridedSliceGrad { } /// Builds the `StridedSliceGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - shape: O0, - begin: O1, - end: O2, - strides: O3, - dy: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - shape.into(), - begin.into(), - end.into(), - strides.into(), - dy.into(), - scope, - ) - } - - fn build_impl( - &self, - shape: crate::Output, - begin: crate::Output, - end: crate::Output, - strides: crate::Output, - dy: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, shape: O0, begin: O1, end: O2, strides: O3, dy: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(shape.into(), begin.into(), end.into(), strides.into(), dy.into(), scope) + } + fn build_impl(&self, shape: crate::Output, begin: crate::Output, end: crate::Output, strides: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StridedSliceGrad", |nd| { nd.add_input(shape); nd.add_input(begin); @@ -117766,49 +140970,90 @@ impl StridedSliceGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Index { - nd.set_attr_type("Index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.begin_mask { - nd.set_attr_int("begin_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.end_mask { - nd.set_attr_int("end_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ellipsis_mask { - nd.set_attr_int("ellipsis_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.new_axis_mask { - nd.set_attr_int("new_axis_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { - nd.set_attr_int("shrink_axis_mask", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.begin_mask { + nd.set_attr_int("begin_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.end_mask { + nd.set_attr_int("end_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ellipsis_mask { + nd.set_attr_int("ellipsis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.new_axis_mask { + nd.set_attr_int("new_axis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { + nd.set_attr_int("shrink_axis_mask", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StridedSliceGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, shape: O0, begin: O1, end: O2, strides: O3, dy: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), begin.into(), end.into(), strides.into(), dy.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, begin: crate::Output, end: crate::Output, strides: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StridedSliceGrad", |nd| { + nd.add_input(shape); + nd.add_input(begin); + nd.add_input(end); + nd.add_input(strides); + nd.add_input(dy); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.begin_mask { + nd.set_attr_int("begin_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.end_mask { + nd.set_attr_int("end_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ellipsis_mask { + nd.set_attr_int("ellipsis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.new_axis_mask { + nd.set_attr_int("new_axis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { + nd.set_attr_int("shrink_axis_mask", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StridedSliceGradInst{op}) + } +} +impl StridedSliceGradInst { + /// Returns the 'output' output of this 'StridedSliceGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StridedSliceGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StridedSliceGrad::new().build(shape, begin, end, strides, dy, scope)`. -pub fn strided_slice_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - shape: O0, - begin: O1, - end: O2, - strides: O3, - dy: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn strided_slice_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(shape: O0, begin: O1, end: O2, strides: O3, dy: O4, scope: &mut crate::Scope) -> crate::Result { StridedSliceGrad::new().build(shape, begin, end, strides, dy, scope) } + /// Builder for the `StringFormat` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringFormat { @@ -117818,6 +141063,12 @@ pub struct StringFormat { summarize: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringFormat' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringFormatInst { + /// An instance of a fully built StringFormat Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringFormat { /// Creates a new `StringFormat`. @@ -117826,28 +141077,19 @@ impl StringFormat { } /// Sets the `T` attribute. - pub fn T>>( - mut self, - value: ArgType, - ) -> Self { + pub fn T>>(mut self, value: ArgType) -> Self { self.T = ::std::option::Option::Some(value.into()); self } /// Sets the `template` attribute. - pub fn template>( - mut self, - value: ArgType, - ) -> Self { + pub fn template>(mut self, value: ArgType) -> Self { self.template = ::std::option::Option::Some(value.into()); self } /// Sets the `placeholder` attribute. - pub fn placeholder>( - mut self, - value: ArgType, - ) -> Self { + pub fn placeholder>(mut self, value: ArgType) -> Self { self.placeholder = ::std::option::Option::Some(value.into()); self } @@ -117865,48 +141107,77 @@ impl StringFormat { } /// Builds the `StringFormat` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringFormat", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type_list("T", value)?; - } - if let ::std::option::Option::Some(value) = &self.template { - nd.set_attr_string("template", value)?; - } - if let ::std::option::Option::Some(value) = &self.placeholder { - nd.set_attr_string("placeholder", value)?; - } - if let ::std::option::Option::Some(value) = &self.summarize { - nd.set_attr_int("summarize", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.template { + nd.set_attr_string("template", value)?; + } + if let ::std::option::Option::Some(value) = &self.placeholder { + nd.set_attr_string("placeholder", value)?; + } + if let ::std::option::Option::Some(value) = &self.summarize { + nd.set_attr_int("summarize", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringFormat` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringFormat", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.template { + nd.set_attr_string("template", value)?; + } + if let ::std::option::Option::Some(value) = &self.placeholder { + nd.set_attr_string("placeholder", value)?; + } + if let ::std::option::Option::Some(value) = &self.summarize { + nd.set_attr_int("summarize", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringFormatInst{op}) + } +} +impl StringFormatInst { + /// Returns the 'output' output of this 'StringFormat' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StringFormatInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringFormat::new().build(inputs, scope)`. -pub fn string_format>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_format>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { StringFormat::new().build(inputs, scope) } + /// Builder for the `StringJoin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringJoin { @@ -117914,6 +141185,12 @@ pub struct StringJoin { separator: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringJoin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringJoinInst { + /// An instance of a fully built StringJoin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringJoin { /// Creates a new `StringJoin`. @@ -117928,10 +141205,7 @@ impl StringJoin { } /// Sets the `separator` attribute. - pub fn separator>( - mut self, - value: ArgType, - ) -> Self { + pub fn separator>(mut self, value: ArgType) -> Self { self.separator = ::std::option::Option::Some(value.into()); self } @@ -117943,48 +141217,77 @@ impl StringJoin { } /// Builds the `StringJoin` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringJoin", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.separator { - nd.set_attr_string("separator", value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.separator { + nd.set_attr_string("separator", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringJoin` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringJoin", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.separator { + nd.set_attr_string("separator", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringJoinInst{op}) + } +} +impl StringJoinInst { + /// Returns the 'output' output of this 'StringJoin' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StringJoinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringJoin::new().build(inputs, scope)`. -pub fn string_join>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_join>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { StringJoin::new().build(inputs, scope) } + /// Builder for the `StringLength` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringLength { unit: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringLength' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringLengthInst { + /// An instance of a fully built StringLength Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringLength { /// Creates a new `StringLength`. @@ -117993,10 +141296,7 @@ impl StringLength { } /// Sets the `unit` attribute. - pub fn unit>( - mut self, - value: ArgType, - ) -> Self { + pub fn unit>(mut self, value: ArgType) -> Self { self.unit = ::std::option::Option::Some(value.into()); self } @@ -118008,45 +141308,71 @@ impl StringLength { } /// Builds the `StringLength` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringLength", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.unit { - nd.set_attr_string("unit", value)?; - } + if let ::std::option::Option::Some(value) = &self.unit { + nd.set_attr_string("unit", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringLength` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringLength", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.unit { + nd.set_attr_string("unit", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringLengthInst{op}) + } +} +impl StringLengthInst { + /// Returns the 'output' output of this 'StringLength' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StringLengthInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringLength::new().build(input, scope)`. -pub fn string_length>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_length>(input: O0, scope: &mut crate::Scope) -> crate::Result { StringLength::new().build(input, scope) } + /// Builder for the `StringLower` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringLower { encoding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringLower' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringLowerInst { + /// An instance of a fully built StringLower Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringLower { /// Creates a new `StringLower`. @@ -118055,10 +141381,7 @@ impl StringLower { } /// Sets the `encoding` attribute. - pub fn encoding>( - mut self, - value: ArgType, - ) -> Self { + pub fn encoding>(mut self, value: ArgType) -> Self { self.encoding = ::std::option::Option::Some(value.into()); self } @@ -118070,39 +141393,59 @@ impl StringLower { } /// Builds the `StringLower` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringLower", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.encoding { - nd.set_attr_string("encoding", value)?; - } + if let ::std::option::Option::Some(value) = &self.encoding { + nd.set_attr_string("encoding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringLower` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringLower", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.encoding { + nd.set_attr_string("encoding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringLowerInst{op}) + } +} +impl StringLowerInst { + /// Returns the 'output' output of this 'StringLower' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StringLowerInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringLower::new().build(input, scope)`. -pub fn string_lower>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_lower>(input: O0, scope: &mut crate::Scope) -> crate::Result { StringLower::new().build(input, scope) } + /// Builder for the `StringNGrams` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringNGrams { @@ -118115,6 +141458,12 @@ pub struct StringNGrams { Tsplits: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringNGrams' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringNGramsInst { + /// An instance of a fully built StringNGrams Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringNGrams { /// Creates a new `StringNGrams`. @@ -118123,37 +141472,25 @@ impl StringNGrams { } /// Sets the `separator` attribute. - pub fn separator>( - mut self, - value: ArgType, - ) -> Self { + pub fn separator>(mut self, value: ArgType) -> Self { self.separator = ::std::option::Option::Some(value.into()); self } /// Sets the `ngram_widths` attribute. - pub fn ngram_widths>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ngram_widths>>(mut self, value: ArgType) -> Self { self.ngram_widths = ::std::option::Option::Some(value.into()); self } /// Sets the `left_pad` attribute. - pub fn left_pad>( - mut self, - value: ArgType, - ) -> Self { + pub fn left_pad>(mut self, value: ArgType) -> Self { self.left_pad = ::std::option::Option::Some(value.into()); self } /// Sets the `right_pad` attribute. - pub fn right_pad>( - mut self, - value: ArgType, - ) -> Self { + pub fn right_pad>(mut self, value: ArgType) -> Self { self.right_pad = ::std::option::Option::Some(value.into()); self } @@ -118165,19 +141502,13 @@ impl StringNGrams { } /// Sets the `preserve_short_sequences` attribute. - pub fn preserve_short_sequences>( - mut self, - value: ArgType, - ) -> Self { + pub fn preserve_short_sequences>(mut self, value: ArgType) -> Self { self.preserve_short_sequences = ::std::option::Option::Some(value.into()); self } /// Sets the `Tsplits` attribute. - pub fn Tsplits>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsplits>(mut self, value: ArgType) -> Self { self.Tsplits = ::std::option::Option::Some(value.into()); self } @@ -118189,73 +141520,116 @@ impl StringNGrams { } /// Builds the `StringNGrams` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - data: O0, - data_splits: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, data: O0, data_splits: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), data_splits.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - data_splits: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, data_splits: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringNGrams", |nd| { nd.add_input(data); nd.add_input(data_splits); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.separator { - nd.set_attr_string("separator", value)?; - } - if let ::std::option::Option::Some(value) = &self.ngram_widths { - nd.set_attr_int_list("ngram_widths", value)?; - } - if let ::std::option::Option::Some(value) = &self.left_pad { - nd.set_attr_string("left_pad", value)?; - } - if let ::std::option::Option::Some(value) = &self.right_pad { - nd.set_attr_string("right_pad", value)?; - } - if let ::std::option::Option::Some(value) = &self.pad_width { - nd.set_attr_int("pad_width", *value)?; - } - if let ::std::option::Option::Some(value) = &self.preserve_short_sequences { - nd.set_attr_bool("preserve_short_sequences", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsplits { - nd.set_attr_type("Tsplits", *value)?; - } + if let ::std::option::Option::Some(value) = &self.separator { + nd.set_attr_string("separator", value)?; + } + if let ::std::option::Option::Some(value) = &self.ngram_widths { + nd.set_attr_int_list("ngram_widths", value)?; + } + if let ::std::option::Option::Some(value) = &self.left_pad { + nd.set_attr_string("left_pad", value)?; + } + if let ::std::option::Option::Some(value) = &self.right_pad { + nd.set_attr_string("right_pad", value)?; + } + if let ::std::option::Option::Some(value) = &self.pad_width { + nd.set_attr_int("pad_width", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_short_sequences { + nd.set_attr_bool("preserve_short_sequences", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringNGrams` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, data: O0, data_splits: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), data_splits.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, data_splits: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringNGrams", |nd| { + nd.add_input(data); + nd.add_input(data_splits); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.separator { + nd.set_attr_string("separator", value)?; + } + if let ::std::option::Option::Some(value) = &self.ngram_widths { + nd.set_attr_int_list("ngram_widths", value)?; + } + if let ::std::option::Option::Some(value) = &self.left_pad { + nd.set_attr_string("left_pad", value)?; + } + if let ::std::option::Option::Some(value) = &self.right_pad { + nd.set_attr_string("right_pad", value)?; + } + if let ::std::option::Option::Some(value) = &self.pad_width { + nd.set_attr_int("pad_width", *value)?; + } + if let ::std::option::Option::Some(value) = &self.preserve_short_sequences { + nd.set_attr_bool("preserve_short_sequences", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringNGramsInst{op}) + } +} +impl StringNGramsInst { + /// Returns the 'ngrams' output of this 'StringNGrams' operation. + pub fn ngrams(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'ngrams_splits' output of this 'StringNGrams' operation. + pub fn ngrams_splits(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for StringNGramsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringNGrams::new().build(data, data_splits, scope)`. -pub fn string_ngrams< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - data: O0, - data_splits: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_ngrams, O1: ::std::convert::Into>(data: O0, data_splits: O1, scope: &mut crate::Scope) -> crate::Result { StringNGrams::new().build(data, data_splits, scope) } + /// Builder for the `StringSplit` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringSplit { skip_empty: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringSplit' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringSplitInst { + /// An instance of a fully built StringSplit Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringSplit { /// Creates a new `StringSplit`. @@ -118276,55 +141650,87 @@ impl StringSplit { } /// Builds the `StringSplit` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - delimiter: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, delimiter: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), delimiter.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - delimiter: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, delimiter: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringSplit", |nd| { nd.add_input(input); nd.add_input(delimiter); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.skip_empty { - nd.set_attr_bool("skip_empty", *value)?; - } + if let ::std::option::Option::Some(value) = &self.skip_empty { + nd.set_attr_bool("skip_empty", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringSplit` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, delimiter: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), delimiter.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, delimiter: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringSplit", |nd| { + nd.add_input(input); + nd.add_input(delimiter); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.skip_empty { + nd.set_attr_bool("skip_empty", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringSplitInst{op}) + } +} +impl StringSplitInst { + /// Returns the 'indices' output of this 'StringSplit' operation. + pub fn indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'StringSplit' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'shape' output of this 'StringSplit' operation. + pub fn shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for StringSplitInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringSplit::new().build(input, delimiter, scope)`. -pub fn string_split< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - delimiter: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_split, O1: ::std::convert::Into>(input: O0, delimiter: O1, scope: &mut crate::Scope) -> crate::Result { StringSplit::new().build(input, delimiter, scope) } + /// Builder for the `StringSplitV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringSplitV2 { maxsplit: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringSplitV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringSplitV2Inst { + /// An instance of a fully built StringSplitV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringSplitV2 { /// Creates a new `StringSplitV2`. @@ -118345,54 +141751,86 @@ impl StringSplitV2 { } /// Builds the `StringSplitV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - sep: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, sep: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), sep.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - sep: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, sep: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringSplitV2", |nd| { nd.add_input(input); nd.add_input(sep); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.maxsplit { - nd.set_attr_int("maxsplit", *value)?; - } + if let ::std::option::Option::Some(value) = &self.maxsplit { + nd.set_attr_int("maxsplit", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringSplitV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, sep: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), sep.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, sep: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringSplitV2", |nd| { + nd.add_input(input); + nd.add_input(sep); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.maxsplit { + nd.set_attr_int("maxsplit", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringSplitV2Inst{op}) + } +} +impl StringSplitV2Inst { + /// Returns the 'indices' output of this 'StringSplitV2' operation. + pub fn indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'values' output of this 'StringSplitV2' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'shape' output of this 'StringSplitV2' operation. + pub fn shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for StringSplitV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringSplitV2::new().build(input, sep, scope)`. -pub fn string_split_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - sep: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_split_v2, O1: ::std::convert::Into>(input: O0, sep: O1, scope: &mut crate::Scope) -> crate::Result { StringSplitV2::new().build(input, sep, scope) } + /// Builder for the `StringStrip` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringStrip { control_inputs: ::std::vec::Vec, } +/// An instance of 'StringStrip' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringStripInst { + /// An instance of a fully built StringStrip Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringStrip { /// Creates a new `StringStrip`. @@ -118407,19 +141845,10 @@ impl StringStrip { } /// Builds the `StringStrip` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringStrip", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -118428,21 +141857,53 @@ impl StringStrip { ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringStrip` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringStrip", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(StringStripInst{op}) + } +} +impl StringStripInst { + /// Returns the 'output' output of this 'StringStrip' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StringStripInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringStrip::new().build(input, scope)`. -pub fn string_strip>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_strip>(input: O0, scope: &mut crate::Scope) -> crate::Result { StringStrip::new().build(input, scope) } + /// Builder for the `StringToHashBucket` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringToHashBucket { num_buckets: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringToHashBucket' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringToHashBucketInst { + /// An instance of a fully built StringToHashBucket Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringToHashBucket { /// Creates a new `StringToHashBucket`. @@ -118463,45 +141924,71 @@ impl StringToHashBucket { } /// Builds the `StringToHashBucket` operation. - pub fn build>( - &self, - string_tensor: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, string_tensor: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(string_tensor.into(), scope) } - - fn build_impl( - &self, - string_tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, string_tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringToHashBucket", |nd| { nd.add_input(string_tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_buckets { - nd.set_attr_int("num_buckets", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringToHashBucket` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, string_tensor: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(string_tensor.into(), scope) + } + fn build_instance_impl(&self, string_tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringToHashBucket", |nd| { + nd.add_input(string_tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringToHashBucketInst{op}) + } +} +impl StringToHashBucketInst { + /// Returns the 'output' output of this 'StringToHashBucket' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StringToHashBucketInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringToHashBucket::new().build(string_tensor, scope)`. -pub fn string_to_hash_bucket>( - string_tensor: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_to_hash_bucket>(string_tensor: O0, scope: &mut crate::Scope) -> crate::Result { StringToHashBucket::new().build(string_tensor, scope) } + /// Builder for the `StringToHashBucketFast` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringToHashBucketFast { num_buckets: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringToHashBucketFast' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringToHashBucketFastInst { + /// An instance of a fully built StringToHashBucketFast Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringToHashBucketFast { /// Creates a new `StringToHashBucketFast`. @@ -118522,39 +142009,59 @@ impl StringToHashBucketFast { } /// Builds the `StringToHashBucketFast` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringToHashBucketFast", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_buckets { - nd.set_attr_int("num_buckets", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringToHashBucketFast` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringToHashBucketFast", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringToHashBucketFastInst{op}) + } +} +impl StringToHashBucketFastInst { + /// Returns the 'output' output of this 'StringToHashBucketFast' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StringToHashBucketFastInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringToHashBucketFast::new().build(input, scope)`. -pub fn string_to_hash_bucket_fast>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_to_hash_bucket_fast>(input: O0, scope: &mut crate::Scope) -> crate::Result { StringToHashBucketFast::new().build(input, scope) } + /// Builder for the `StringToHashBucketStrong` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringToHashBucketStrong { @@ -118562,6 +142069,12 @@ pub struct StringToHashBucketStrong { key: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringToHashBucketStrong' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringToHashBucketStrongInst { + /// An instance of a fully built StringToHashBucketStrong Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringToHashBucketStrong { /// Creates a new `StringToHashBucketStrong`. @@ -118576,10 +142089,7 @@ impl StringToHashBucketStrong { } /// Sets the `key` attribute. - pub fn key>>( - mut self, - value: ArgType, - ) -> Self { + pub fn key>>(mut self, value: ArgType) -> Self { self.key = ::std::option::Option::Some(value.into()); self } @@ -118591,48 +142101,77 @@ impl StringToHashBucketStrong { } /// Builds the `StringToHashBucketStrong` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringToHashBucketStrong", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_buckets { - nd.set_attr_int("num_buckets", *value)?; - } - if let ::std::option::Option::Some(value) = &self.key { - nd.set_attr_int_list("key", value)?; - } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key { + nd.set_attr_int_list("key", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringToHashBucketStrong` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringToHashBucketStrong", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_buckets { + nd.set_attr_int("num_buckets", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key { + nd.set_attr_int_list("key", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringToHashBucketStrongInst{op}) + } +} +impl StringToHashBucketStrongInst { + /// Returns the 'output' output of this 'StringToHashBucketStrong' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StringToHashBucketStrongInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringToHashBucketStrong::new().build(input, scope)`. -pub fn string_to_hash_bucket_strong>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_to_hash_bucket_strong>(input: O0, scope: &mut crate::Scope) -> crate::Result { StringToHashBucketStrong::new().build(input, scope) } + /// Builder for the `StringToNumber` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringToNumber { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringToNumber' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringToNumberInst { + /// An instance of a fully built StringToNumber Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringToNumber { /// Creates a new `StringToNumber`. @@ -118641,10 +142180,7 @@ impl StringToNumber { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -118656,45 +142192,71 @@ impl StringToNumber { } /// Builds the `StringToNumber` operation. - pub fn build>( - &self, - string_tensor: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, string_tensor: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(string_tensor.into(), scope) } - - fn build_impl( - &self, - string_tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, string_tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringToNumber", |nd| { nd.add_input(string_tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringToNumber` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, string_tensor: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(string_tensor.into(), scope) + } + fn build_instance_impl(&self, string_tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringToNumber", |nd| { + nd.add_input(string_tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringToNumberInst{op}) + } +} +impl StringToNumberInst { + /// Returns the 'output' output of this 'StringToNumber' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StringToNumberInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringToNumber::new().build(string_tensor, scope)`. -pub fn string_to_number>( - string_tensor: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_to_number>(string_tensor: O0, scope: &mut crate::Scope) -> crate::Result { StringToNumber::new().build(string_tensor, scope) } + /// Builder for the `StringUpper` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct StringUpper { encoding: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'StringUpper' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct StringUpperInst { + /// An instance of a fully built StringUpper Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl StringUpper { /// Creates a new `StringUpper`. @@ -118703,10 +142265,7 @@ impl StringUpper { } /// Sets the `encoding` attribute. - pub fn encoding>( - mut self, - value: ArgType, - ) -> Self { + pub fn encoding>(mut self, value: ArgType) -> Self { self.encoding = ::std::option::Option::Some(value.into()); self } @@ -118718,45 +142277,71 @@ impl StringUpper { } /// Builds the `StringUpper` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("StringUpper", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.encoding { - nd.set_attr_string("encoding", value)?; - } + if let ::std::option::Option::Some(value) = &self.encoding { + nd.set_attr_string("encoding", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `StringUpper` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("StringUpper", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.encoding { + nd.set_attr_string("encoding", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(StringUpperInst{op}) + } +} +impl StringUpperInst { + /// Returns the 'output' output of this 'StringUpper' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for StringUpperInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `StringUpper::new().build(input, scope)`. -pub fn string_upper>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn string_upper>(input: O0, scope: &mut crate::Scope) -> crate::Result { StringUpper::new().build(input, scope) } + /// Builder for the `Sub` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Sub { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Sub' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SubInst { + /// An instance of a fully built Sub Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Sub { /// Creates a new `Sub`. @@ -118777,46 +142362,61 @@ impl Sub { } /// Builds the `Sub` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Sub", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Sub` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Sub", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SubInst{op}) + } +} +impl SubInst { + /// Returns the 'z' output of this 'Sub' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SubInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Sub::new().build(x, y, scope)`. -pub fn sub, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sub, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Sub::new().build(x, y, scope) } + /// Builder for the `Substr` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Substr { @@ -118824,6 +142424,12 @@ pub struct Substr { unit: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Substr' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SubstrInst { + /// An instance of a fully built Substr Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Substr { /// Creates a new `Substr`. @@ -118838,10 +142444,7 @@ impl Substr { } /// Sets the `unit` attribute. - pub fn unit>( - mut self, - value: ArgType, - ) -> Self { + pub fn unit>(mut self, value: ArgType) -> Self { self.unit = ::std::option::Option::Some(value.into()); self } @@ -118853,27 +142456,10 @@ impl Substr { } /// Builds the `Substr` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input: O0, - pos: O1, - len: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, pos: O1, len: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), pos.into(), len.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - pos: crate::Output, - len: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, pos: crate::Output, len: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Substr", |nd| { nd.add_input(input); nd.add_input(pos); @@ -118881,30 +142467,58 @@ impl Substr { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.unit { - nd.set_attr_string("unit", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unit { + nd.set_attr_string("unit", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Substr` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input: O0, pos: O1, len: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), pos.into(), len.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, pos: crate::Output, len: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Substr", |nd| { + nd.add_input(input); + nd.add_input(pos); + nd.add_input(len); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unit { + nd.set_attr_string("unit", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SubstrInst{op}) + } +} +impl SubstrInst { + /// Returns the 'output' output of this 'Substr' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SubstrInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Substr::new().build(input, pos, len, scope)`. -pub fn substr< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input: O0, - pos: O1, - len: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn substr, O1: ::std::convert::Into, O2: ::std::convert::Into>(input: O0, pos: O1, len: O2, scope: &mut crate::Scope) -> crate::Result { Substr::new().build(input, pos, len, scope) } + /// Builder for the `Sum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Sum { @@ -118913,6 +142527,12 @@ pub struct Sum { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Sum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SumInst { + /// An instance of a fully built Sum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Sum { /// Creates a new `Sum`. @@ -118945,52 +142565,73 @@ impl Sum { } /// Builds the `Sum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), reduction_indices.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - reduction_indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Sum", |nd| { nd.add_input(input); nd.add_input(reduction_indices); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.keep_dims { - nd.set_attr_bool("keep_dims", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Sum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), reduction_indices.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, reduction_indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Sum", |nd| { + nd.add_input(input); + nd.add_input(reduction_indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.keep_dims { + nd.set_attr_bool("keep_dims", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SumInst{op}) + } +} +impl SumInst { + /// Returns the 'output' output of this 'Sum' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Sum::new().build(input, reduction_indices, scope)`. -pub fn sum, O1: ::std::convert::Into>( - input: O0, - reduction_indices: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn sum, O1: ::std::convert::Into>(input: O0, reduction_indices: O1, scope: &mut crate::Scope) -> crate::Result { Sum::new().build(input, reduction_indices, scope) } + /// Builder for the `SummaryWriter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SummaryWriter { @@ -118998,6 +142639,12 @@ pub struct SummaryWriter { container: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SummaryWriter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SummaryWriterInst { + /// An instance of a fully built SummaryWriter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SummaryWriter { /// Creates a new `SummaryWriter`. @@ -119006,19 +142653,13 @@ impl SummaryWriter { } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } @@ -119030,30 +142671,63 @@ impl SummaryWriter { } /// Builds the `SummaryWriter` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SummaryWriter", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SummaryWriter` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SummaryWriter", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SummaryWriterInst{op}) + } +} +impl SummaryWriterInst { + /// Returns the 'writer' output of this 'SummaryWriter' operation. + pub fn writer(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SummaryWriterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SummaryWriter::new().build(scope)`. -pub fn summary_writer(scope: &mut crate::Scope) -> crate::Result { +pub fn summary_writer<>(scope: &mut crate::Scope) -> crate::Result { SummaryWriter::new().build(scope) } + /// Builder for the `Svd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Svd { @@ -119062,6 +142736,12 @@ pub struct Svd { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Svd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SvdInst { + /// An instance of a fully built Svd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Svd { /// Creates a new `Svd`. @@ -119094,51 +142774,97 @@ impl Svd { } /// Builds the `Svd` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Svd", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.compute_uv { - nd.set_attr_bool("compute_uv", *value)?; - } - if let ::std::option::Option::Some(value) = &self.full_matrices { - nd.set_attr_bool("full_matrices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.compute_uv { + nd.set_attr_bool("compute_uv", *value)?; + } + if let ::std::option::Option::Some(value) = &self.full_matrices { + nd.set_attr_bool("full_matrices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Svd` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Svd", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.compute_uv { + nd.set_attr_bool("compute_uv", *value)?; + } + if let ::std::option::Option::Some(value) = &self.full_matrices { + nd.set_attr_bool("full_matrices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SvdInst{op}) + } +} +impl SvdInst { + /// Returns the 's' output of this 'Svd' operation. + pub fn s(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'u' output of this 'Svd' operation. + pub fn u(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'v' output of this 'Svd' operation. + pub fn v(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for SvdInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Svd::new().build(input, scope)`. -pub fn svd>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn svd>(input: O0, scope: &mut crate::Scope) -> crate::Result { Svd::new().build(input, scope) } + /// Builder for the `Switch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Switch { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Switch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SwitchInst { + /// An instance of a fully built Switch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Switch { /// Creates a new `Switch`. @@ -119159,46 +142885,68 @@ impl Switch { } /// Builds the `Switch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - data: O0, - pred: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, data: O0, pred: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), pred.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - pred: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, pred: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Switch", |nd| { nd.add_input(data); nd.add_input(pred); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Switch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, data: O0, pred: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), pred.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, pred: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Switch", |nd| { + nd.add_input(data); + nd.add_input(pred); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SwitchInst{op}) + } +} +impl SwitchInst { + /// Returns the 'output_false' output of this 'Switch' operation. + pub fn output_false(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'output_true' output of this 'Switch' operation. + pub fn output_true(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for SwitchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Switch::new().build(data, pred, scope)`. -pub fn switch, O1: ::std::convert::Into>( - data: O0, - pred: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn switch, O1: ::std::convert::Into>(data: O0, pred: O1, scope: &mut crate::Scope) -> crate::Result { Switch::new().build(data, pred, scope) } + /// Builder for the `SymbolicGradient` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct SymbolicGradient { @@ -119207,6 +142955,12 @@ pub struct SymbolicGradient { f: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'SymbolicGradient' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct SymbolicGradientInst { + /// An instance of a fully built SymbolicGradient Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl SymbolicGradient { /// Creates a new `SymbolicGradient`. @@ -119215,28 +142969,19 @@ impl SymbolicGradient { } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } @@ -119248,51 +142993,83 @@ impl SymbolicGradient { } /// Builds the `SymbolicGradient` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("SymbolicGradient", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `SymbolicGradient` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("SymbolicGradient", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(SymbolicGradientInst{op}) + } +} +impl SymbolicGradientInst { + /// Returns the 'output' output of this 'SymbolicGradient' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for SymbolicGradientInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `SymbolicGradient::new().build(input, scope)`. -pub fn symbolic_gradient>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn symbolic_gradient>(input: O0, scope: &mut crate::Scope) -> crate::Result { SymbolicGradient::new().build(input, scope) } + /// Builder for the `TFRecordDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TFRecordDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TFRecordDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TFRecordDatasetInst { + /// An instance of a fully built TFRecordDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TFRecordDataset { /// Creates a new `TFRecordDataset`. @@ -119301,10 +143078,7 @@ impl TFRecordDataset { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -119316,32 +143090,10 @@ impl TFRecordDataset { } /// Builds the `TFRecordDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - filenames: O0, - compression_type: O1, - buffer_size: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - filenames.into(), - compression_type.into(), - buffer_size.into(), - scope, - ) - } - - fn build_impl( - &self, - filenames: crate::Output, - compression_type: crate::Output, - buffer_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, filenames: O0, compression_type: O1, buffer_size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(filenames.into(), compression_type.into(), buffer_size.into(), scope) + } + fn build_impl(&self, filenames: crate::Output, compression_type: crate::Output, buffer_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TFRecordDataset", |nd| { nd.add_input(filenames); nd.add_input(compression_type); @@ -119349,27 +143101,52 @@ impl TFRecordDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TFRecordDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, filenames: O0, compression_type: O1, buffer_size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filenames.into(), compression_type.into(), buffer_size.into(), scope) + } + fn build_instance_impl(&self, filenames: crate::Output, compression_type: crate::Output, buffer_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TFRecordDataset", |nd| { + nd.add_input(filenames); + nd.add_input(compression_type); + nd.add_input(buffer_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TFRecordDatasetInst{op}) + } +} +impl TFRecordDatasetInst { + /// Returns the 'handle' output of this 'TFRecordDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TFRecordDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TFRecordDataset::new().build(filenames, compression_type, buffer_size, scope)`. -pub fn tfrecord_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - filenames: O0, - compression_type: O1, - buffer_size: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tfrecord_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(filenames: O0, compression_type: O1, buffer_size: O2, scope: &mut crate::Scope) -> crate::Result { TFRecordDataset::new().build(filenames, compression_type, buffer_size, scope) } + /// Builder for the `TFRecordReader` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TFRecordReader { @@ -119378,6 +143155,12 @@ pub struct TFRecordReader { compression_type: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TFRecordReader' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TFRecordReaderInst { + /// An instance of a fully built TFRecordReader Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TFRecordReader { /// Creates a new `TFRecordReader`. @@ -119386,28 +143169,128 @@ impl TFRecordReader { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { + self.container = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `shared_name` attribute. + pub fn shared_name>(mut self, value: ArgType) -> Self { + self.shared_name = ::std::option::Option::Some(value.into()); + self + } + + /// Sets the `compression_type` attribute. + pub fn compression_type>(mut self, value: ArgType) -> Self { + self.compression_type = ::std::option::Option::Some(value.into()); + self + } + + /// Adds a control input. + pub fn add_control_input(mut self, op: crate::Operation) -> Self { + self.control_inputs.push(op); + self + } + + /// Builds the `TFRecordReader` operation. + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(scope) + } + fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { + scope.new_operation("TFRecordReader", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression_type { + nd.set_attr_string("compression_type", value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `TFRecordReader` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TFRecordReader", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression_type { + nd.set_attr_string("compression_type", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TFRecordReaderInst{op}) + } +} +impl TFRecordReaderInst { + /// Returns the 'reader_handle' output of this 'TFRecordReader' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TFRecordReaderInst{ + fn into(self) -> crate::Operation { + self.op + } +} +/// Shorthand for `TFRecordReader::new().build(scope)`. +pub fn tfrecord_reader<>(scope: &mut crate::Scope) -> crate::Result { + TFRecordReader::new().build(scope) +} + +/// Builder for the `TFRecordReaderV2` operation. +#[derive(::std::fmt::Debug, ::std::default::Default)] +pub struct TFRecordReaderV2 { + container: ::std::option::Option<::std::string::String>, + shared_name: ::std::option::Option<::std::string::String>, + compression_type: ::std::option::Option<::std::string::String>, + control_inputs: ::std::vec::Vec, +} +/// An instance of 'TFRecordReaderV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TFRecordReaderV2Inst { + /// An instance of a fully built TFRecordReaderV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} + +impl TFRecordReaderV2 { + /// Creates a new `TFRecordReaderV2`. + pub fn new() -> Self { + Self::default() + } + + /// Sets the `container` attribute. + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } /// Sets the `compression_type` attribute. - pub fn compression_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn compression_type>(mut self, value: ArgType) -> Self { self.compression_type = ::std::option::Option::Some(value.into()); self } @@ -119418,115 +143301,81 @@ impl TFRecordReader { self } - /// Builds the `TFRecordReader` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + /// Builds the `TFRecordReaderV2` operation. + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { - scope.new_operation("TFRecordReader", |nd| { + scope.new_operation("TFRecordReaderV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.compression_type { - nd.set_attr_string("compression_type", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression_type { + nd.set_attr_string("compression_type", value)?; + } ::std::result::Result::Ok(()) }) } -} - -/// Shorthand for `TFRecordReader::new().build(scope)`. -pub fn tfrecord_reader(scope: &mut crate::Scope) -> crate::Result { - TFRecordReader::new().build(scope) -} -/// Builder for the `TFRecordReaderV2` operation. -#[derive(::std::fmt::Debug, ::std::default::Default)] -pub struct TFRecordReaderV2 { - container: ::std::option::Option<::std::string::String>, - shared_name: ::std::option::Option<::std::string::String>, - compression_type: ::std::option::Option<::std::string::String>, - control_inputs: ::std::vec::Vec, -} - -impl TFRecordReaderV2 { - /// Creates a new `TFRecordReaderV2`. - pub fn new() -> Self { - Self::default() - } - - /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { - self.container = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { - self.shared_name = ::std::option::Option::Some(value.into()); - self - } - - /// Sets the `compression_type` attribute. - pub fn compression_type>( - mut self, - value: ArgType, - ) -> Self { - self.compression_type = ::std::option::Option::Some(value.into()); - self - } - /// Adds a control input. - pub fn add_control_input(mut self, op: crate::Operation) -> Self { - self.control_inputs.push(op); - self - } - - /// Builds the `TFRecordReaderV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { - self.build_impl(scope) + /// Builds the `TFRecordReaderV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) } - - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { - scope.new_operation("TFRecordReaderV2", |nd| { + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TFRecordReaderV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.compression_type { - nd.set_attr_string("compression_type", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.compression_type { + nd.set_attr_string("compression_type", value)?; + } ::std::result::Result::Ok(()) - }) + })?; + Ok(TFRecordReaderV2Inst{op}) + } +} +impl TFRecordReaderV2Inst { + /// Returns the 'reader_handle' output of this 'TFRecordReaderV2' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TFRecordReaderV2Inst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `TFRecordReaderV2::new().build(scope)`. -pub fn tfrecord_reader_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn tfrecord_reader_v2<>(scope: &mut crate::Scope) -> crate::Result { TFRecordReaderV2::new().build(scope) } + /// Builder for the `TPUCompilationResult` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUCompilationResult { control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUCompilationResult' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUCompilationResultInst { + /// An instance of a fully built TPUCompilationResult Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUCompilationResult { /// Creates a new `TPUCompilationResult`. @@ -119541,10 +143390,9 @@ impl TPUCompilationResult { } /// Builds the `TPUCompilationResult` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUCompilationResult", |nd| { for op in &self.control_inputs { @@ -119553,12 +143401,40 @@ impl TPUCompilationResult { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUCompilationResult` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUCompilationResult", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUCompilationResultInst{op}) + } +} +impl TPUCompilationResultInst { + /// Returns the 'output' output of this 'TPUCompilationResult' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TPUCompilationResultInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUCompilationResult::new().build(scope)`. -pub fn tpucompilation_result(scope: &mut crate::Scope) -> crate::Result { +pub fn tpucompilation_result<>(scope: &mut crate::Scope) -> crate::Result { TPUCompilationResult::new().build(scope) } + /// Builder for the `TPUCompile` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUCompile { @@ -119569,6 +143445,12 @@ pub struct TPUCompile { Tguaranteed_constants: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUCompile' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUCompileInst { + /// An instance of a fully built TPUCompile Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUCompile { /// Creates a new `TPUCompile`. @@ -119583,19 +143465,13 @@ impl TPUCompile { } /// Sets the `function` attribute. - pub fn function>( - mut self, - value: ArgType, - ) -> Self { + pub fn function>(mut self, value: ArgType) -> Self { self.function = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -119607,12 +143483,7 @@ impl TPUCompile { } /// Sets the `Tguaranteed_constants` attribute. - pub fn Tguaranteed_constants< - ArgType: ::std::convert::Into<::std::vec::Vec>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn Tguaranteed_constants>>(mut self, value: ArgType) -> Self { self.Tguaranteed_constants = ::std::option::Option::Some(value.into()); self } @@ -119624,66 +143495,120 @@ impl TPUCompile { } /// Builds the `TPUCompile` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - dynamic_shapes: O0, - guaranteed_constants: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, dynamic_shapes: O0, guaranteed_constants: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(dynamic_shapes.into(), guaranteed_constants.into(), scope) } - - fn build_impl( - &self, - dynamic_shapes: crate::Output, - guaranteed_constants: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, dynamic_shapes: crate::Output, guaranteed_constants: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUCompile", |nd| { nd.add_input(dynamic_shapes); nd.add_input(guaranteed_constants); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_computations { - nd.set_attr_int("num_computations", *value)?; - } - if let ::std::option::Option::Some(value) = &self.function { - nd.set_attr_string("function", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } - if let ::std::option::Option::Some(value) = &self.NumDynamicShapes { - nd.set_attr_int("NumDynamicShapes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tguaranteed_constants { - nd.set_attr_type_list("Tguaranteed_constants", value)?; - } + if let ::std::option::Option::Some(value) = &self.num_computations { + nd.set_attr_int("num_computations", *value)?; + } + if let ::std::option::Option::Some(value) = &self.function { + nd.set_attr_string("function", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + if let ::std::option::Option::Some(value) = &self.NumDynamicShapes { + nd.set_attr_int("NumDynamicShapes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tguaranteed_constants { + nd.set_attr_type_list("Tguaranteed_constants", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUCompile` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, dynamic_shapes: O0, guaranteed_constants: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(dynamic_shapes.into(), guaranteed_constants.into(), scope) + } + fn build_instance_impl(&self, dynamic_shapes: crate::Output, guaranteed_constants: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUCompile", |nd| { + nd.add_input(dynamic_shapes); + nd.add_input(guaranteed_constants); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_computations { + nd.set_attr_int("num_computations", *value)?; + } + if let ::std::option::Option::Some(value) = &self.function { + nd.set_attr_string("function", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + if let ::std::option::Option::Some(value) = &self.NumDynamicShapes { + nd.set_attr_int("NumDynamicShapes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tguaranteed_constants { + nd.set_attr_type_list("Tguaranteed_constants", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUCompileInst{op}) + } +} +impl TPUCompileInst { + /// Returns the 'compilation_status' output of this 'TPUCompile' operation. + pub fn compilation_status(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns a Vector of Outputs for 'program' output of this TPUCompile operation. + pub fn program(&self) -> crate::Result>{ + let dynamic_offset = (1) as i32; + let mut Outputs = vec![]; + for i in 1..self.op.get_attr_int("num_computations")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } + /// Returns a Vector of Outputs for 'may_modify_variables' output of this TPUCompile operation. + pub fn may_modify_variables(&self) -> crate::Result>{ + let dynamic_offset = (self.op.get_attr_int("num_computations")?+2) as i32; + let mut Outputs = vec![]; + for i in dynamic_offset..dynamic_offset+self.op.get_attr_int("num_computations")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for TPUCompileInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUCompile::new().build(dynamic_shapes, guaranteed_constants, scope)`. -pub fn tpucompile< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - dynamic_shapes: O0, - guaranteed_constants: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpucompile, O1: ::std::convert::Into>(dynamic_shapes: O0, guaranteed_constants: O1, scope: &mut crate::Scope) -> crate::Result { TPUCompile::new().build(dynamic_shapes, guaranteed_constants, scope) } + /// Builder for the `TPUCompileSucceededAssert` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUCompileSucceededAssert { control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUCompileSucceededAssert' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUCompileSucceededAssertInst { + /// An instance of a fully built TPUCompileSucceededAssert Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUCompileSucceededAssert { /// Creates a new `TPUCompileSucceededAssert`. @@ -119698,19 +143623,10 @@ impl TPUCompileSucceededAssert { } /// Builds the `TPUCompileSucceededAssert` operation. - pub fn build>( - &self, - compilation_status: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, compilation_status: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(compilation_status.into(), scope) } - - fn build_impl( - &self, - compilation_status: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, compilation_status: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUCompileSucceededAssert", |nd| { nd.add_input(compilation_status); for op in &self.control_inputs { @@ -119719,15 +143635,34 @@ impl TPUCompileSucceededAssert { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUCompileSucceededAssert` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, compilation_status: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(compilation_status.into(), scope) + } + fn build_instance_impl(&self, compilation_status: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUCompileSucceededAssert", |nd| { + nd.add_input(compilation_status); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUCompileSucceededAssertInst{op}) + } +} +impl TPUCompileSucceededAssertInst { +} +impl Into for TPUCompileSucceededAssertInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUCompileSucceededAssert::new().build(compilation_status, scope)`. -pub fn tpucompile_succeeded_assert>( - compilation_status: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpucompile_succeeded_assert>(compilation_status: O0, scope: &mut crate::Scope) -> crate::Result { TPUCompileSucceededAssert::new().build(compilation_status, scope) } + /// Builder for the `TPUEmbeddingActivations` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUEmbeddingActivations { @@ -119735,6 +143670,12 @@ pub struct TPUEmbeddingActivations { lookup_id: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUEmbeddingActivations' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUEmbeddingActivationsInst { + /// An instance of a fully built TPUEmbeddingActivations Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUEmbeddingActivations { /// Creates a new `TPUEmbeddingActivations`. @@ -119761,52 +143702,67 @@ impl TPUEmbeddingActivations { } /// Builds the `TPUEmbeddingActivations` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - embedding_variable: O0, - sliced_activations: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, embedding_variable: O0, sliced_activations: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(embedding_variable.into(), sliced_activations.into(), scope) } - - fn build_impl( - &self, - embedding_variable: crate::Output, - sliced_activations: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, embedding_variable: crate::Output, sliced_activations: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUEmbeddingActivations", |nd| { nd.add_input(embedding_variable); nd.add_input(sliced_activations); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.table_id { - nd.set_attr_int("table_id", *value)?; - } - if let ::std::option::Option::Some(value) = &self.lookup_id { - nd.set_attr_int("lookup_id", *value)?; - } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.lookup_id { + nd.set_attr_int("lookup_id", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUEmbeddingActivations` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, embedding_variable: O0, sliced_activations: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(embedding_variable.into(), sliced_activations.into(), scope) + } + fn build_instance_impl(&self, embedding_variable: crate::Output, sliced_activations: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUEmbeddingActivations", |nd| { + nd.add_input(embedding_variable); + nd.add_input(sliced_activations); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.table_id { + nd.set_attr_int("table_id", *value)?; + } + if let ::std::option::Option::Some(value) = &self.lookup_id { + nd.set_attr_int("lookup_id", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUEmbeddingActivationsInst{op}) + } +} +impl TPUEmbeddingActivationsInst { + /// Returns the 'output' output of this 'TPUEmbeddingActivations' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TPUEmbeddingActivationsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUEmbeddingActivations::new().build(embedding_variable, sliced_activations, scope)`. -pub fn tpuembedding_activations< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - embedding_variable: O0, - sliced_activations: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpuembedding_activations, O1: ::std::convert::Into>(embedding_variable: O0, sliced_activations: O1, scope: &mut crate::Scope) -> crate::Result { TPUEmbeddingActivations::new().build(embedding_variable, sliced_activations, scope) } + /// Builder for the `TPUExecute` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUExecute { @@ -119814,6 +143770,12 @@ pub struct TPUExecute { Tresults: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUExecute' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUExecuteInst { + /// An instance of a fully built TPUExecute Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUExecute { /// Creates a new `TPUExecute`. @@ -119822,19 +143784,13 @@ impl TPUExecute { } /// Sets the `Targs` attribute. - pub fn Targs>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targs>>(mut self, value: ArgType) -> Self { self.Targs = ::std::option::Option::Some(value.into()); self } /// Sets the `Tresults` attribute. - pub fn Tresults>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tresults>>(mut self, value: ArgType) -> Self { self.Tresults = ::std::option::Option::Some(value.into()); self } @@ -119846,52 +143802,67 @@ impl TPUExecute { } /// Builds the `TPUExecute` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - args: O0, - key: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, args: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(args.into(), key.into(), scope) } - - fn build_impl( - &self, - args: crate::Output, - key: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, args: crate::Output, key: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUExecute", |nd| { nd.add_input(args); nd.add_input(key); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Targs { - nd.set_attr_type_list("Targs", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tresults { - nd.set_attr_type_list("Tresults", value)?; - } + if let ::std::option::Option::Some(value) = &self.Targs { + nd.set_attr_type_list("Targs", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tresults { + nd.set_attr_type_list("Tresults", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUExecute` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, args: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(args.into(), key.into(), scope) + } + fn build_instance_impl(&self, args: crate::Output, key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUExecute", |nd| { + nd.add_input(args); + nd.add_input(key); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Targs { + nd.set_attr_type_list("Targs", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tresults { + nd.set_attr_type_list("Tresults", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUExecuteInst{op}) + } +} +impl TPUExecuteInst { + /// Returns the 'results' output of this 'TPUExecute' operation. + pub fn results(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TPUExecuteInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUExecute::new().build(args, key, scope)`. -pub fn tpuexecute< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - args: O0, - key: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpuexecute, O1: ::std::convert::Into>(args: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { TPUExecute::new().build(args, key, scope) } + /// Builder for the `TPUExecuteAndUpdateVariables` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUExecuteAndUpdateVariables { @@ -119901,6 +143872,12 @@ pub struct TPUExecuteAndUpdateVariables { device_var_updates_indices: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUExecuteAndUpdateVariables' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUExecuteAndUpdateVariablesInst { + /// An instance of a fully built TPUExecuteAndUpdateVariables Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUExecuteAndUpdateVariables { /// Creates a new `TPUExecuteAndUpdateVariables`. @@ -119909,37 +143886,25 @@ impl TPUExecuteAndUpdateVariables { } /// Sets the `Targs` attribute. - pub fn Targs>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targs>>(mut self, value: ArgType) -> Self { self.Targs = ::std::option::Option::Some(value.into()); self } /// Sets the `Tresults` attribute. - pub fn Tresults>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tresults>>(mut self, value: ArgType) -> Self { self.Tresults = ::std::option::Option::Some(value.into()); self } /// Sets the `device_var_reads_indices` attribute. - pub fn device_var_reads_indices>>( - mut self, - value: ArgType, - ) -> Self { + pub fn device_var_reads_indices>>(mut self, value: ArgType) -> Self { self.device_var_reads_indices = ::std::option::Option::Some(value.into()); self } /// Sets the `device_var_updates_indices` attribute. - pub fn device_var_updates_indices>>( - mut self, - value: ArgType, - ) -> Self { + pub fn device_var_updates_indices>>(mut self, value: ArgType) -> Self { self.device_var_updates_indices = ::std::option::Option::Some(value.into()); self } @@ -119951,63 +143916,90 @@ impl TPUExecuteAndUpdateVariables { } /// Builds the `TPUExecuteAndUpdateVariables` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - args: O0, - key: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, args: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(args.into(), key.into(), scope) } - - fn build_impl( - &self, - args: crate::Output, - key: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, args: crate::Output, key: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUExecuteAndUpdateVariables", |nd| { nd.add_input(args); nd.add_input(key); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Targs { - nd.set_attr_type_list("Targs", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tresults { - nd.set_attr_type_list("Tresults", value)?; - } - if let ::std::option::Option::Some(value) = &self.device_var_reads_indices { - nd.set_attr_int_list("device_var_reads_indices", value)?; - } - if let ::std::option::Option::Some(value) = &self.device_var_updates_indices { - nd.set_attr_int_list("device_var_updates_indices", value)?; - } + if let ::std::option::Option::Some(value) = &self.Targs { + nd.set_attr_type_list("Targs", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tresults { + nd.set_attr_type_list("Tresults", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_var_reads_indices { + nd.set_attr_int_list("device_var_reads_indices", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_var_updates_indices { + nd.set_attr_int_list("device_var_updates_indices", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUExecuteAndUpdateVariables` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, args: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(args.into(), key.into(), scope) + } + fn build_instance_impl(&self, args: crate::Output, key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUExecuteAndUpdateVariables", |nd| { + nd.add_input(args); + nd.add_input(key); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Targs { + nd.set_attr_type_list("Targs", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tresults { + nd.set_attr_type_list("Tresults", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_var_reads_indices { + nd.set_attr_int_list("device_var_reads_indices", value)?; + } + if let ::std::option::Option::Some(value) = &self.device_var_updates_indices { + nd.set_attr_int_list("device_var_updates_indices", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUExecuteAndUpdateVariablesInst{op}) + } +} +impl TPUExecuteAndUpdateVariablesInst { + /// Returns the 'results' output of this 'TPUExecuteAndUpdateVariables' operation. + pub fn results(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TPUExecuteAndUpdateVariablesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUExecuteAndUpdateVariables::new().build(args, key, scope)`. -pub fn tpuexecute_and_update_variables< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - args: O0, - key: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpuexecute_and_update_variables, O1: ::std::convert::Into>(args: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { TPUExecuteAndUpdateVariables::new().build(args, key, scope) } + /// Builder for the `TPUOrdinalSelector` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUOrdinalSelector { control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUOrdinalSelector' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUOrdinalSelectorInst { + /// An instance of a fully built TPUOrdinalSelector Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUOrdinalSelector { /// Creates a new `TPUOrdinalSelector`. @@ -120022,10 +144014,9 @@ impl TPUOrdinalSelector { } /// Builds the `TPUOrdinalSelector` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUOrdinalSelector", |nd| { for op in &self.control_inputs { @@ -120034,12 +144025,40 @@ impl TPUOrdinalSelector { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUOrdinalSelector` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUOrdinalSelector", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUOrdinalSelectorInst{op}) + } +} +impl TPUOrdinalSelectorInst { + /// Returns the 'device_ordinals' output of this 'TPUOrdinalSelector' operation. + pub fn device_ordinals(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TPUOrdinalSelectorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUOrdinalSelector::new().build(scope)`. -pub fn tpuordinal_selector(scope: &mut crate::Scope) -> crate::Result { +pub fn tpuordinal_selector<>(scope: &mut crate::Scope) -> crate::Result { TPUOrdinalSelector::new().build(scope) } + /// Builder for the `TPUPartitionedCall` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUPartitionedCall { @@ -120049,6 +144068,12 @@ pub struct TPUPartitionedCall { autotuner_thresh: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUPartitionedCall' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUPartitionedCallInst { + /// An instance of a fully built TPUPartitionedCall Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUPartitionedCall { /// Creates a new `TPUPartitionedCall`. @@ -120057,28 +144082,19 @@ impl TPUPartitionedCall { } /// Sets the `Tin` attribute. - pub fn Tin>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tin>>(mut self, value: ArgType) -> Self { self.Tin = ::std::option::Option::Some(value.into()); self } /// Sets the `Tout` attribute. - pub fn Tout>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tout>>(mut self, value: ArgType) -> Self { self.Tout = ::std::option::Option::Some(value.into()); self } /// Sets the `f` attribute. - pub fn f>( - mut self, - value: ArgType, - ) -> Self { + pub fn f>(mut self, value: ArgType) -> Self { self.f = ::std::option::Option::Some(value.into()); self } @@ -120096,58 +144112,79 @@ impl TPUPartitionedCall { } /// Builds the `TPUPartitionedCall` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - args: O0, - device_ordinal: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, args: O0, device_ordinal: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(args.into(), device_ordinal.into(), scope) } - - fn build_impl( - &self, - args: crate::Output, - device_ordinal: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, args: crate::Output, device_ordinal: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUPartitionedCall", |nd| { nd.add_input(args); nd.add_input(device_ordinal); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tin { - nd.set_attr_type_list("Tin", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tout { - nd.set_attr_type_list("Tout", value)?; - } - if let ::std::option::Option::Some(value) = &self.f { - nd.set_attr_string("f", value)?; - } - if let ::std::option::Option::Some(value) = &self.autotuner_thresh { - nd.set_attr_int("autotuner_thresh", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.autotuner_thresh { + nd.set_attr_int("autotuner_thresh", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUPartitionedCall` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, args: O0, device_ordinal: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(args.into(), device_ordinal.into(), scope) + } + fn build_instance_impl(&self, args: crate::Output, device_ordinal: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUPartitionedCall", |nd| { + nd.add_input(args); + nd.add_input(device_ordinal); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tin { + nd.set_attr_type_list("Tin", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tout { + nd.set_attr_type_list("Tout", value)?; + } + if let ::std::option::Option::Some(value) = &self.f { + nd.set_attr_string("f", value)?; + } + if let ::std::option::Option::Some(value) = &self.autotuner_thresh { + nd.set_attr_int("autotuner_thresh", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUPartitionedCallInst{op}) + } +} +impl TPUPartitionedCallInst { + /// Returns the 'output' output of this 'TPUPartitionedCall' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TPUPartitionedCallInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUPartitionedCall::new().build(args, device_ordinal, scope)`. -pub fn tpupartitioned_call< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - args: O0, - device_ordinal: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpupartitioned_call, O1: ::std::convert::Into>(args: O0, device_ordinal: O1, scope: &mut crate::Scope) -> crate::Result { TPUPartitionedCall::new().build(args, device_ordinal, scope) } + /// Builder for the `TPUPartitionedInput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUPartitionedInput { @@ -120156,6 +144193,12 @@ pub struct TPUPartitionedInput { partition_dim: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUPartitionedInput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUPartitionedInputInst { + /// An instance of a fully built TPUPartitionedInput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUPartitionedInput { /// Creates a new `TPUPartitionedInput`. @@ -120188,45 +144231,71 @@ impl TPUPartitionedInput { } /// Builds the `TPUPartitionedInput` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUPartitionedInput", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.partition_dim { - nd.set_attr_int("partition_dim", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.partition_dim { + nd.set_attr_int("partition_dim", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUPartitionedInput` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUPartitionedInput", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.partition_dim { + nd.set_attr_int("partition_dim", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUPartitionedInputInst{op}) + } +} +impl TPUPartitionedInputInst { + /// Returns the 'output' output of this 'TPUPartitionedInput' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TPUPartitionedInputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUPartitionedInput::new().build(inputs, scope)`. -pub fn tpupartitioned_input>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpupartitioned_input>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { TPUPartitionedInput::new().build(inputs, scope) } + /// Builder for the `TPUPartitionedOutput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUPartitionedOutput { @@ -120235,6 +144304,12 @@ pub struct TPUPartitionedOutput { partition_dim: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUPartitionedOutput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUPartitionedOutputInst { + /// An instance of a fully built TPUPartitionedOutput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUPartitionedOutput { /// Creates a new `TPUPartitionedOutput`. @@ -120267,45 +144342,76 @@ impl TPUPartitionedOutput { } /// Builds the `TPUPartitionedOutput` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUPartitionedOutput", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_splits { - nd.set_attr_int("num_splits", *value)?; - } - if let ::std::option::Option::Some(value) = &self.partition_dim { - nd.set_attr_int("partition_dim", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_splits { + nd.set_attr_int("num_splits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.partition_dim { + nd.set_attr_int("partition_dim", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUPartitionedOutput` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUPartitionedOutput", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_splits { + nd.set_attr_int("num_splits", *value)?; + } + if let ::std::option::Option::Some(value) = &self.partition_dim { + nd.set_attr_int("partition_dim", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUPartitionedOutputInst{op}) + } +} +impl TPUPartitionedOutputInst { + /// Returns a Vector of Outputs for 'output' output of this TPUPartitionedOutput operation. + pub fn output(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_splits")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for TPUPartitionedOutputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUPartitionedOutput::new().build(inputs, scope)`. -pub fn tpupartitioned_output>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpupartitioned_output>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { TPUPartitionedOutput::new().build(inputs, scope) } + /// Builder for the `TPUReplicateMetadata` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUReplicateMetadata { @@ -120322,6 +144428,12 @@ pub struct TPUReplicateMetadata { use_spmd_for_xla_partitioning: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUReplicateMetadata' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUReplicateMetadataInst { + /// An instance of a fully built TPUReplicateMetadata Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUReplicateMetadata { /// Creates a new `TPUReplicateMetadata`. @@ -120336,19 +144448,13 @@ impl TPUReplicateMetadata { } /// Sets the `num_cores_per_replica` attribute. - pub fn num_cores_per_replica>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_cores_per_replica>(mut self, value: ArgType) -> Self { self.num_cores_per_replica = ::std::option::Option::Some(value.into()); self } /// Sets the `topology` attribute. - pub fn topology>( - mut self, - value: ArgType, - ) -> Self { + pub fn topology>(mut self, value: ArgType) -> Self { self.topology = ::std::option::Option::Some(value.into()); self } @@ -120360,66 +144466,43 @@ impl TPUReplicateMetadata { } /// Sets the `device_assignment` attribute. - pub fn device_assignment>>( - mut self, - value: ArgType, - ) -> Self { + pub fn device_assignment>>(mut self, value: ArgType) -> Self { self.device_assignment = ::std::option::Option::Some(value.into()); self } /// Sets the `computation_shape` attribute. - pub fn computation_shape>>( - mut self, - value: ArgType, - ) -> Self { + pub fn computation_shape>>(mut self, value: ArgType) -> Self { self.computation_shape = ::std::option::Option::Some(value.into()); self } /// Sets the `host_compute_core` attribute. - pub fn host_compute_core< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn host_compute_core>>(mut self, value: ArgType) -> Self { self.host_compute_core = ::std::option::Option::Some(value.into()); self } /// Sets the `padding_map` attribute. - pub fn padding_map>>( - mut self, - value: ArgType, - ) -> Self { + pub fn padding_map>>(mut self, value: ArgType) -> Self { self.padding_map = ::std::option::Option::Some(value.into()); self } /// Sets the `step_marker_location` attribute. - pub fn step_marker_location>( - mut self, - value: ArgType, - ) -> Self { + pub fn step_marker_location>(mut self, value: ArgType) -> Self { self.step_marker_location = ::std::option::Option::Some(value.into()); self } /// Sets the `allow_soft_placement` attribute. - pub fn allow_soft_placement>( - mut self, - value: ArgType, - ) -> Self { + pub fn allow_soft_placement>(mut self, value: ArgType) -> Self { self.allow_soft_placement = ::std::option::Option::Some(value.into()); self } /// Sets the `use_spmd_for_xla_partitioning` attribute. - pub fn use_spmd_for_xla_partitioning>( - mut self, - value: ArgType, - ) -> Self { + pub fn use_spmd_for_xla_partitioning>(mut self, value: ArgType) -> Self { self.use_spmd_for_xla_partitioning = ::std::option::Option::Some(value.into()); self } @@ -120431,57 +144514,110 @@ impl TPUReplicateMetadata { } /// Builds the `TPUReplicateMetadata` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUReplicateMetadata", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_replicas { - nd.set_attr_int("num_replicas", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_cores_per_replica { - nd.set_attr_int("num_cores_per_replica", *value)?; - } - if let ::std::option::Option::Some(value) = &self.topology { - nd.set_attr_string("topology", value)?; - } - if let ::std::option::Option::Some(value) = &self.use_tpu { - nd.set_attr_bool("use_tpu", *value)?; - } - if let ::std::option::Option::Some(value) = &self.device_assignment { - nd.set_attr_int_list("device_assignment", value)?; - } - if let ::std::option::Option::Some(value) = &self.computation_shape { - nd.set_attr_int_list("computation_shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.host_compute_core { - nd.set_attr_string_list("host_compute_core", value)?; - } - if let ::std::option::Option::Some(value) = &self.padding_map { - nd.set_attr_string_list("padding_map", value)?; - } - if let ::std::option::Option::Some(value) = &self.step_marker_location { - nd.set_attr_string("step_marker_location", value)?; - } - if let ::std::option::Option::Some(value) = &self.allow_soft_placement { - nd.set_attr_bool("allow_soft_placement", *value)?; - } - if let ::std::option::Option::Some(value) = &self.use_spmd_for_xla_partitioning { - nd.set_attr_bool("use_spmd_for_xla_partitioning", *value)?; - } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.num_replicas { + nd.set_attr_int("num_replicas", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_cores_per_replica { + nd.set_attr_int("num_cores_per_replica", *value)?; + } + if let ::std::option::Option::Some(value) = &self.topology { + nd.set_attr_string("topology", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_tpu { + nd.set_attr_bool("use_tpu", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_assignment { + nd.set_attr_int_list("device_assignment", value)?; + } + if let ::std::option::Option::Some(value) = &self.computation_shape { + nd.set_attr_int_list("computation_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.host_compute_core { + nd.set_attr_string_list("host_compute_core", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_map { + nd.set_attr_string_list("padding_map", value)?; + } + if let ::std::option::Option::Some(value) = &self.step_marker_location { + nd.set_attr_string("step_marker_location", value)?; + } + if let ::std::option::Option::Some(value) = &self.allow_soft_placement { + nd.set_attr_bool("allow_soft_placement", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_spmd_for_xla_partitioning { + nd.set_attr_bool("use_spmd_for_xla_partitioning", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `TPUReplicateMetadata` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUReplicateMetadata", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_replicas { + nd.set_attr_int("num_replicas", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_cores_per_replica { + nd.set_attr_int("num_cores_per_replica", *value)?; + } + if let ::std::option::Option::Some(value) = &self.topology { + nd.set_attr_string("topology", value)?; + } + if let ::std::option::Option::Some(value) = &self.use_tpu { + nd.set_attr_bool("use_tpu", *value)?; + } + if let ::std::option::Option::Some(value) = &self.device_assignment { + nd.set_attr_int_list("device_assignment", value)?; + } + if let ::std::option::Option::Some(value) = &self.computation_shape { + nd.set_attr_int_list("computation_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.host_compute_core { + nd.set_attr_string_list("host_compute_core", value)?; + } + if let ::std::option::Option::Some(value) = &self.padding_map { + nd.set_attr_string_list("padding_map", value)?; + } + if let ::std::option::Option::Some(value) = &self.step_marker_location { + nd.set_attr_string("step_marker_location", value)?; + } + if let ::std::option::Option::Some(value) = &self.allow_soft_placement { + nd.set_attr_bool("allow_soft_placement", *value)?; + } + if let ::std::option::Option::Some(value) = &self.use_spmd_for_xla_partitioning { + nd.set_attr_bool("use_spmd_for_xla_partitioning", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUReplicateMetadataInst{op}) + } +} +impl TPUReplicateMetadataInst { +} +impl Into for TPUReplicateMetadataInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `TPUReplicateMetadata::new().build(scope)`. -pub fn tpureplicate_metadata(scope: &mut crate::Scope) -> crate::Result { +pub fn tpureplicate_metadata<>(scope: &mut crate::Scope) -> crate::Result { TPUReplicateMetadata::new().build(scope) } + /// Builder for the `TPUReplicatedInput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUReplicatedInput { @@ -120492,6 +144628,12 @@ pub struct TPUReplicatedInput { is_packed: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUReplicatedInput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUReplicatedInputInst { + /// An instance of a fully built TPUReplicatedInput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUReplicatedInput { /// Creates a new `TPUReplicatedInput`. @@ -120512,10 +144654,7 @@ impl TPUReplicatedInput { } /// Sets the `is_mirrored_variable` attribute. - pub fn is_mirrored_variable>( - mut self, - value: ArgType, - ) -> Self { + pub fn is_mirrored_variable>(mut self, value: ArgType) -> Self { self.is_mirrored_variable = ::std::option::Option::Some(value.into()); self } @@ -120539,51 +144678,83 @@ impl TPUReplicatedInput { } /// Builds the `TPUReplicatedInput` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUReplicatedInput", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.is_mirrored_variable { - nd.set_attr_bool("is_mirrored_variable", *value)?; - } - if let ::std::option::Option::Some(value) = &self.index { - nd.set_attr_int("index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.is_packed { - nd.set_attr_bool("is_packed", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_mirrored_variable { + nd.set_attr_bool("is_mirrored_variable", *value)?; + } + if let ::std::option::Option::Some(value) = &self.index { + nd.set_attr_int("index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_packed { + nd.set_attr_bool("is_packed", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUReplicatedInput` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUReplicatedInput", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_mirrored_variable { + nd.set_attr_bool("is_mirrored_variable", *value)?; + } + if let ::std::option::Option::Some(value) = &self.index { + nd.set_attr_int("index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.is_packed { + nd.set_attr_bool("is_packed", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUReplicatedInputInst{op}) + } +} +impl TPUReplicatedInputInst { + /// Returns the 'output' output of this 'TPUReplicatedInput' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TPUReplicatedInputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUReplicatedInput::new().build(inputs, scope)`. -pub fn tpureplicated_input>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpureplicated_input>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { TPUReplicatedInput::new().build(inputs, scope) } + /// Builder for the `TPUReplicatedOutput` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUReplicatedOutput { @@ -120591,6 +144762,12 @@ pub struct TPUReplicatedOutput { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUReplicatedOutput' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUReplicatedOutputInst { + /// An instance of a fully built TPUReplicatedOutput Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUReplicatedOutput { /// Creates a new `TPUReplicatedOutput`. @@ -120617,48 +144794,82 @@ impl TPUReplicatedOutput { } /// Builds the `TPUReplicatedOutput` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUReplicatedOutput", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_replicas { - nd.set_attr_int("num_replicas", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_replicas { + nd.set_attr_int("num_replicas", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUReplicatedOutput` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUReplicatedOutput", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_replicas { + nd.set_attr_int("num_replicas", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUReplicatedOutputInst{op}) + } +} +impl TPUReplicatedOutputInst { + /// Returns a Vector of Outputs for 'outputs' output of this TPUReplicatedOutput operation. + pub fn outputs(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num_replicas")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for TPUReplicatedOutputInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUReplicatedOutput::new().build(input, scope)`. -pub fn tpureplicated_output>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpureplicated_output>(input: O0, scope: &mut crate::Scope) -> crate::Result { TPUReplicatedOutput::new().build(input, scope) } + /// Builder for the `TPUReshardVariables` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TPUReshardVariables { N: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TPUReshardVariables' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TPUReshardVariablesInst { + /// An instance of a fully built TPUReshardVariables Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TPUReshardVariables { /// Creates a new `TPUReshardVariables`. @@ -120679,32 +144890,10 @@ impl TPUReshardVariables { } /// Builds the `TPUReshardVariables` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - vars: O0, - new_format_key: O1, - format_state_var: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - vars.into(), - new_format_key.into(), - format_state_var.into(), - scope, - ) - } - - fn build_impl( - &self, - vars: crate::Output, - new_format_key: crate::Output, - format_state_var: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, vars: O0, new_format_key: O1, format_state_var: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(vars.into(), new_format_key.into(), format_state_var.into(), scope) + } + fn build_impl(&self, vars: crate::Output, new_format_key: crate::Output, format_state_var: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TPUReshardVariables", |nd| { nd.add_input(vars); nd.add_input(new_format_key); @@ -120712,27 +144901,45 @@ impl TPUReshardVariables { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TPUReshardVariables` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, vars: O0, new_format_key: O1, format_state_var: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(vars.into(), new_format_key.into(), format_state_var.into(), scope) + } + fn build_instance_impl(&self, vars: crate::Output, new_format_key: crate::Output, format_state_var: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TPUReshardVariables", |nd| { + nd.add_input(vars); + nd.add_input(new_format_key); + nd.add_input(format_state_var); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TPUReshardVariablesInst{op}) + } +} +impl TPUReshardVariablesInst { +} +impl Into for TPUReshardVariablesInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TPUReshardVariables::new().build(vars, new_format_key, format_state_var, scope)`. -pub fn tpureshard_variables< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - vars: O0, - new_format_key: O1, - format_state_var: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tpureshard_variables, O1: ::std::convert::Into, O2: ::std::convert::Into>(vars: O0, new_format_key: O1, format_state_var: O2, scope: &mut crate::Scope) -> crate::Result { TPUReshardVariables::new().build(vars, new_format_key, format_state_var, scope) } + /// Builder for the `TakeDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TakeDataset { @@ -120741,6 +144948,12 @@ pub struct TakeDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TakeDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TakeDatasetInst { + /// An instance of a fully built TakeDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TakeDataset { /// Creates a new `TakeDataset`. @@ -120749,28 +144962,19 @@ impl TakeDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -120782,55 +144986,73 @@ impl TakeDataset { } /// Builds the `TakeDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - count: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, count: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), count.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - count: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, count: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TakeDataset", |nd| { nd.add_input(input_dataset); nd.add_input(count); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TakeDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, count: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), count.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, count: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TakeDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(count); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TakeDatasetInst{op}) + } +} +impl TakeDatasetInst { + /// Returns the 'handle' output of this 'TakeDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TakeDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TakeDataset::new().build(input_dataset, count, scope)`. -pub fn take_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - count: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn take_dataset, O1: ::std::convert::Into>(input_dataset: O0, count: O1, scope: &mut crate::Scope) -> crate::Result { TakeDataset::new().build(input_dataset, count, scope) } + /// Builder for the `TakeManySparseFromTensorsMap` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TakeManySparseFromTensorsMap { @@ -120839,6 +145061,12 @@ pub struct TakeManySparseFromTensorsMap { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TakeManySparseFromTensorsMap' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TakeManySparseFromTensorsMapInst { + /// An instance of a fully built TakeManySparseFromTensorsMap Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TakeManySparseFromTensorsMap { /// Creates a new `TakeManySparseFromTensorsMap`. @@ -120853,19 +145081,13 @@ impl TakeManySparseFromTensorsMap { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -120877,45 +145099,85 @@ impl TakeManySparseFromTensorsMap { } /// Builds the `TakeManySparseFromTensorsMap` operation. - pub fn build>( - &self, - sparse_handles: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, sparse_handles: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(sparse_handles.into(), scope) } - - fn build_impl( - &self, - sparse_handles: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, sparse_handles: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TakeManySparseFromTensorsMap", |nd| { nd.add_input(sparse_handles); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TakeManySparseFromTensorsMap` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, sparse_handles: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sparse_handles.into(), scope) + } + fn build_instance_impl(&self, sparse_handles: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TakeManySparseFromTensorsMap", |nd| { + nd.add_input(sparse_handles); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TakeManySparseFromTensorsMapInst{op}) + } +} +impl TakeManySparseFromTensorsMapInst { + /// Returns the 'sparse_indices' output of this 'TakeManySparseFromTensorsMap' operation. + pub fn sparse_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'sparse_values' output of this 'TakeManySparseFromTensorsMap' operation. + pub fn sparse_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sparse_shape' output of this 'TakeManySparseFromTensorsMap' operation. + pub fn sparse_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for TakeManySparseFromTensorsMapInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TakeManySparseFromTensorsMap::new().build(sparse_handles, scope)`. -pub fn take_many_sparse_from_tensors_map>( - sparse_handles: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn take_many_sparse_from_tensors_map>(sparse_handles: O0, scope: &mut crate::Scope) -> crate::Result { TakeManySparseFromTensorsMap::new().build(sparse_handles, scope) } + /// Builder for the `TakeWhileDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TakeWhileDataset { @@ -120926,6 +145188,12 @@ pub struct TakeWhileDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TakeWhileDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TakeWhileDatasetInst { + /// An instance of a fully built TakeWhileDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TakeWhileDataset { /// Creates a new `TakeWhileDataset`. @@ -120934,46 +145202,31 @@ impl TakeWhileDataset { } /// Sets the `predicate` attribute. - pub fn predicate>( - mut self, - value: ArgType, - ) -> Self { + pub fn predicate>(mut self, value: ArgType) -> Self { self.predicate = ::std::option::Option::Some(value.into()); self } /// Sets the `Targuments` attribute. - pub fn Targuments>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Targuments>>(mut self, value: ArgType) -> Self { self.Targuments = ::std::option::Option::Some(value.into()); self } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -120985,67 +145238,97 @@ impl TakeWhileDataset { } /// Builds the `TakeWhileDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), other_arguments.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - other_arguments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TakeWhileDataset", |nd| { nd.add_input(input_dataset); nd.add_input(other_arguments); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.predicate { - nd.set_attr_string("predicate", value)?; - } - if let ::std::option::Option::Some(value) = &self.Targuments { - nd.set_attr_type_list("Targuments", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.predicate { + nd.set_attr_string("predicate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TakeWhileDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), other_arguments.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, other_arguments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TakeWhileDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(other_arguments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.predicate { + nd.set_attr_string("predicate", value)?; + } + if let ::std::option::Option::Some(value) = &self.Targuments { + nd.set_attr_type_list("Targuments", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TakeWhileDatasetInst{op}) + } +} +impl TakeWhileDatasetInst { + /// Returns the 'handle' output of this 'TakeWhileDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TakeWhileDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TakeWhileDataset::new().build(input_dataset, other_arguments, scope)`. -pub fn take_while_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - other_arguments: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn take_while_dataset, O1: ::std::convert::Into>(input_dataset: O0, other_arguments: O1, scope: &mut crate::Scope) -> crate::Result { TakeWhileDataset::new().build(input_dataset, other_arguments, scope) } + /// Builder for the `Tan` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Tan { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Tan' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TanInst { + /// An instance of a fully built Tan Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Tan { /// Creates a new `Tan`. @@ -121066,45 +145349,71 @@ impl Tan { } /// Builds the `Tan` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Tan", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Tan` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Tan", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TanInst{op}) + } +} +impl TanInst { + /// Returns the 'y' output of this 'Tan' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TanInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Tan::new().build(x, scope)`. -pub fn tan>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tan>(x: O0, scope: &mut crate::Scope) -> crate::Result { Tan::new().build(x, scope) } + /// Builder for the `Tanh` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Tanh { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Tanh' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TanhInst { + /// An instance of a fully built Tanh Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Tanh { /// Creates a new `Tanh`. @@ -121125,45 +145434,71 @@ impl Tanh { } /// Builds the `Tanh` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Tanh", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Tanh` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Tanh", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TanhInst{op}) + } +} +impl TanhInst { + /// Returns the 'y' output of this 'Tanh' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TanhInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Tanh::new().build(x, scope)`. -pub fn tanh>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tanh>(x: O0, scope: &mut crate::Scope) -> crate::Result { Tanh::new().build(x, scope) } + /// Builder for the `TanhGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TanhGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TanhGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TanhGradInst { + /// An instance of a fully built TanhGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TanhGrad { /// Creates a new `TanhGrad`. @@ -121184,49 +145519,61 @@ impl TanhGrad { } /// Builds the `TanhGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - y: O0, - dy: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(y.into(), dy.into(), scope) } - - fn build_impl( - &self, - y: crate::Output, - dy: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TanhGrad", |nd| { nd.add_input(y); nd.add_input(dy); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TanhGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(y.into(), dy.into(), scope) + } + fn build_instance_impl(&self, y: crate::Output, dy: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TanhGrad", |nd| { + nd.add_input(y); + nd.add_input(dy); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TanhGradInst{op}) + } +} +impl TanhGradInst { + /// Returns the 'z' output of this 'TanhGrad' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TanhGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TanhGrad::new().build(y, dy, scope)`. -pub fn tanh_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - y: O0, - dy: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tanh_grad, O1: ::std::convert::Into>(y: O0, dy: O1, scope: &mut crate::Scope) -> crate::Result { TanhGrad::new().build(y, dy, scope) } + /// Builder for the `TemporaryVariable` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TemporaryVariable { @@ -121235,6 +145582,12 @@ pub struct TemporaryVariable { var_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TemporaryVariable' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TemporaryVariableInst { + /// An instance of a fully built TemporaryVariable Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TemporaryVariable { /// Creates a new `TemporaryVariable`. @@ -121255,10 +145608,7 @@ impl TemporaryVariable { } /// Sets the `var_name` attribute. - pub fn var_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn var_name>(mut self, value: ArgType) -> Self { self.var_name = ::std::option::Option::Some(value.into()); self } @@ -121270,33 +145620,69 @@ impl TemporaryVariable { } /// Builds the `TemporaryVariable` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TemporaryVariable", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.var_name { - nd.set_attr_string("var_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.var_name { + nd.set_attr_string("var_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TemporaryVariable` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TemporaryVariable", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.var_name { + nd.set_attr_string("var_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TemporaryVariableInst{op}) + } +} +impl TemporaryVariableInst { + /// Returns the 'ref_' output of this 'TemporaryVariable' operation. + pub fn ref_(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TemporaryVariableInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TemporaryVariable::new().build(scope)`. -pub fn temporary_variable(scope: &mut crate::Scope) -> crate::Result { +pub fn temporary_variable<>(scope: &mut crate::Scope) -> crate::Result { TemporaryVariable::new().build(scope) } + /// Builder for the `TensorArray` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArray { @@ -121307,6 +145693,12 @@ pub struct TensorArray { element_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArray' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayInst { + /// An instance of a fully built TensorArray Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArray { /// Creates a new `TensorArray`. @@ -121333,19 +145725,13 @@ impl TensorArray { } /// Sets the `tensor_array_name` attribute. - pub fn tensor_array_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_array_name>(mut self, value: ArgType) -> Self { self.tensor_array_name = ::std::option::Option::Some(value.into()); self } /// Sets the `element_shape` attribute. - pub fn element_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape>(mut self, value: ArgType) -> Self { self.element_shape = ::std::option::Option::Some(value.into()); self } @@ -121357,56 +145743,94 @@ impl TensorArray { } /// Builds the `TensorArray` operation. - pub fn build>( - &self, - size: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, size: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(size.into(), scope) } - - fn build_impl( - &self, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArray", |nd| { nd.add_input(size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dynamic_size { - nd.set_attr_bool("dynamic_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.clear_after_read { - nd.set_attr_bool("clear_after_read", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_array_name { - nd.set_attr_string("tensor_array_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape { - nd.set_attr_shape("element_shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dynamic_size { + nd.set_attr_bool("dynamic_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.clear_after_read { + nd.set_attr_bool("clear_after_read", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_array_name { + nd.set_attr_string("tensor_array_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArray` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, size: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(size.into(), scope) + } + fn build_instance_impl(&self, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArray", |nd| { + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dynamic_size { + nd.set_attr_bool("dynamic_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.clear_after_read { + nd.set_attr_bool("clear_after_read", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_array_name { + nd.set_attr_string("tensor_array_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayInst{op}) + } +} +impl TensorArrayInst { + /// Returns the 'handle' output of this 'TensorArray' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArray::new().build(size, scope)`. -pub fn tensor_array>( - size: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array>(size: O0, scope: &mut crate::Scope) -> crate::Result { TensorArray::new().build(size, scope) } + /// Builder for the `TensorArrayClose` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayClose { control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayClose' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayCloseInst { + /// An instance of a fully built TensorArrayClose Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayClose { /// Creates a new `TensorArrayClose`. @@ -121421,19 +145845,10 @@ impl TensorArrayClose { } /// Builds the `TensorArrayClose` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayClose", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -121442,20 +145857,45 @@ impl TensorArrayClose { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayClose` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayClose", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayCloseInst{op}) + } +} +impl TensorArrayCloseInst { +} +impl Into for TensorArrayCloseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayClose::new().build(handle, scope)`. -pub fn tensor_array_close>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_close>(handle: O0, scope: &mut crate::Scope) -> crate::Result { TensorArrayClose::new().build(handle, scope) } + /// Builder for the `TensorArrayCloseV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayCloseV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayCloseV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayCloseV2Inst { + /// An instance of a fully built TensorArrayCloseV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayCloseV2 { /// Creates a new `TensorArrayCloseV2`. @@ -121470,19 +145910,10 @@ impl TensorArrayCloseV2 { } /// Builds the `TensorArrayCloseV2` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayCloseV2", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -121491,20 +145922,45 @@ impl TensorArrayCloseV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayCloseV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayCloseV2", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayCloseV2Inst{op}) + } +} +impl TensorArrayCloseV2Inst { +} +impl Into for TensorArrayCloseV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayCloseV2::new().build(handle, scope)`. -pub fn tensor_array_close_v2>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_close_v2>(handle: O0, scope: &mut crate::Scope) -> crate::Result { TensorArrayCloseV2::new().build(handle, scope) } + /// Builder for the `TensorArrayCloseV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayCloseV3 { control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayCloseV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayCloseV3Inst { + /// An instance of a fully built TensorArrayCloseV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayCloseV3 { /// Creates a new `TensorArrayCloseV3`. @@ -121519,19 +145975,10 @@ impl TensorArrayCloseV3 { } /// Builds the `TensorArrayCloseV3` operation. - pub fn build>( - &self, - handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayCloseV3", |nd| { nd.add_input(handle); for op in &self.control_inputs { @@ -121540,15 +145987,34 @@ impl TensorArrayCloseV3 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayCloseV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayCloseV3", |nd| { + nd.add_input(handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayCloseV3Inst{op}) + } +} +impl TensorArrayCloseV3Inst { +} +impl Into for TensorArrayCloseV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayCloseV3::new().build(handle, scope)`. -pub fn tensor_array_close_v3>( - handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_close_v3>(handle: O0, scope: &mut crate::Scope) -> crate::Result { TensorArrayCloseV3::new().build(handle, scope) } + /// Builder for the `TensorArrayConcat` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayConcat { @@ -121556,6 +146022,12 @@ pub struct TensorArrayConcat { element_shape_except0: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayConcat' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayConcatInst { + /// An instance of a fully built TensorArrayConcat Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayConcat { /// Creates a new `TensorArrayConcat`. @@ -121570,10 +146042,7 @@ impl TensorArrayConcat { } /// Sets the `element_shape_except0` attribute. - pub fn element_shape_except0>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape_except0>(mut self, value: ArgType) -> Self { self.element_shape_except0 = ::std::option::Option::Some(value.into()); self } @@ -121585,52 +146054,74 @@ impl TensorArrayConcat { } /// Builds the `TensorArrayConcat` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayConcat", |nd| { nd.add_input(handle); nd.add_input(flow_in); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape_except0 { - nd.set_attr_shape("element_shape_except0", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape_except0 { + nd.set_attr_shape("element_shape_except0", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayConcat` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayConcat", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape_except0 { + nd.set_attr_shape("element_shape_except0", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayConcatInst{op}) + } +} +impl TensorArrayConcatInst { + /// Returns the 'value' output of this 'TensorArrayConcat' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'lengths' output of this 'TensorArrayConcat' operation. + pub fn lengths(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TensorArrayConcatInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayConcat::new().build(handle, flow_in, scope)`. -pub fn tensor_array_concat< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_concat, O1: ::std::convert::Into>(handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { TensorArrayConcat::new().build(handle, flow_in, scope) } + /// Builder for the `TensorArrayConcatV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayConcatV2 { @@ -121638,6 +146129,12 @@ pub struct TensorArrayConcatV2 { element_shape_except0: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayConcatV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayConcatV2Inst { + /// An instance of a fully built TensorArrayConcatV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayConcatV2 { /// Creates a new `TensorArrayConcatV2`. @@ -121652,10 +146149,7 @@ impl TensorArrayConcatV2 { } /// Sets the `element_shape_except0` attribute. - pub fn element_shape_except0>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape_except0>(mut self, value: ArgType) -> Self { self.element_shape_except0 = ::std::option::Option::Some(value.into()); self } @@ -121667,52 +146161,74 @@ impl TensorArrayConcatV2 { } /// Builds the `TensorArrayConcatV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayConcatV2", |nd| { nd.add_input(handle); nd.add_input(flow_in); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape_except0 { - nd.set_attr_shape("element_shape_except0", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape_except0 { + nd.set_attr_shape("element_shape_except0", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayConcatV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayConcatV2", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape_except0 { + nd.set_attr_shape("element_shape_except0", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayConcatV2Inst{op}) + } +} +impl TensorArrayConcatV2Inst { + /// Returns the 'value' output of this 'TensorArrayConcatV2' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'lengths' output of this 'TensorArrayConcatV2' operation. + pub fn lengths(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TensorArrayConcatV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayConcatV2::new().build(handle, flow_in, scope)`. -pub fn tensor_array_concat_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_concat_v2, O1: ::std::convert::Into>(handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { TensorArrayConcatV2::new().build(handle, flow_in, scope) } + /// Builder for the `TensorArrayConcatV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayConcatV3 { @@ -121720,6 +146236,12 @@ pub struct TensorArrayConcatV3 { element_shape_except0: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayConcatV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayConcatV3Inst { + /// An instance of a fully built TensorArrayConcatV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayConcatV3 { /// Creates a new `TensorArrayConcatV3`. @@ -121734,10 +146256,7 @@ impl TensorArrayConcatV3 { } /// Sets the `element_shape_except0` attribute. - pub fn element_shape_except0>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape_except0>(mut self, value: ArgType) -> Self { self.element_shape_except0 = ::std::option::Option::Some(value.into()); self } @@ -121749,52 +146268,74 @@ impl TensorArrayConcatV3 { } /// Builds the `TensorArrayConcatV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayConcatV3", |nd| { nd.add_input(handle); nd.add_input(flow_in); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape_except0 { - nd.set_attr_shape("element_shape_except0", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape_except0 { + nd.set_attr_shape("element_shape_except0", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayConcatV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayConcatV3", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape_except0 { + nd.set_attr_shape("element_shape_except0", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayConcatV3Inst{op}) + } +} +impl TensorArrayConcatV3Inst { + /// Returns the 'value' output of this 'TensorArrayConcatV3' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'lengths' output of this 'TensorArrayConcatV3' operation. + pub fn lengths(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TensorArrayConcatV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayConcatV3::new().build(handle, flow_in, scope)`. -pub fn tensor_array_concat_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_concat_v3, O1: ::std::convert::Into>(handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { TensorArrayConcatV3::new().build(handle, flow_in, scope) } + /// Builder for the `TensorArrayGather` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayGather { @@ -121802,6 +146343,12 @@ pub struct TensorArrayGather { element_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayGather' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayGatherInst { + /// An instance of a fully built TensorArrayGather Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayGather { /// Creates a new `TensorArrayGather`. @@ -121816,10 +146363,7 @@ impl TensorArrayGather { } /// Sets the `element_shape` attribute. - pub fn element_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape>(mut self, value: ArgType) -> Self { self.element_shape = ::std::option::Option::Some(value.into()); self } @@ -121831,27 +146375,10 @@ impl TensorArrayGather { } /// Builds the `TensorArrayGather` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - indices: O1, - flow_in: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, indices: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), indices.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - indices: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, indices: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayGather", |nd| { nd.add_input(handle); nd.add_input(indices); @@ -121859,30 +146386,58 @@ impl TensorArrayGather { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape { - nd.set_attr_shape("element_shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayGather` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, indices: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), indices.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, indices: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayGather", |nd| { + nd.add_input(handle); + nd.add_input(indices); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayGatherInst{op}) + } +} +impl TensorArrayGatherInst { + /// Returns the 'value' output of this 'TensorArrayGather' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayGatherInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayGather::new().build(handle, indices, flow_in, scope)`. -pub fn tensor_array_gather< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - indices: O1, - flow_in: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_gather, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, indices: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { TensorArrayGather::new().build(handle, indices, flow_in, scope) } + /// Builder for the `TensorArrayGatherV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayGatherV2 { @@ -121890,6 +146445,12 @@ pub struct TensorArrayGatherV2 { element_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayGatherV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayGatherV2Inst { + /// An instance of a fully built TensorArrayGatherV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayGatherV2 { /// Creates a new `TensorArrayGatherV2`. @@ -121904,10 +146465,7 @@ impl TensorArrayGatherV2 { } /// Sets the `element_shape` attribute. - pub fn element_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape>(mut self, value: ArgType) -> Self { self.element_shape = ::std::option::Option::Some(value.into()); self } @@ -121919,27 +146477,10 @@ impl TensorArrayGatherV2 { } /// Builds the `TensorArrayGatherV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - indices: O1, - flow_in: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, indices: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), indices.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - indices: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, indices: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayGatherV2", |nd| { nd.add_input(handle); nd.add_input(indices); @@ -121947,30 +146488,58 @@ impl TensorArrayGatherV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape { - nd.set_attr_shape("element_shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayGatherV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, indices: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), indices.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, indices: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayGatherV2", |nd| { + nd.add_input(handle); + nd.add_input(indices); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayGatherV2Inst{op}) + } +} +impl TensorArrayGatherV2Inst { + /// Returns the 'value' output of this 'TensorArrayGatherV2' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayGatherV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayGatherV2::new().build(handle, indices, flow_in, scope)`. -pub fn tensor_array_gather_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - indices: O1, - flow_in: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_gather_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, indices: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { TensorArrayGatherV2::new().build(handle, indices, flow_in, scope) } + /// Builder for the `TensorArrayGatherV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayGatherV3 { @@ -121978,6 +146547,12 @@ pub struct TensorArrayGatherV3 { element_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayGatherV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayGatherV3Inst { + /// An instance of a fully built TensorArrayGatherV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayGatherV3 { /// Creates a new `TensorArrayGatherV3`. @@ -121992,10 +146567,7 @@ impl TensorArrayGatherV3 { } /// Sets the `element_shape` attribute. - pub fn element_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape>(mut self, value: ArgType) -> Self { self.element_shape = ::std::option::Option::Some(value.into()); self } @@ -122007,27 +146579,10 @@ impl TensorArrayGatherV3 { } /// Builds the `TensorArrayGatherV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - indices: O1, - flow_in: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, indices: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), indices.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - indices: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, indices: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayGatherV3", |nd| { nd.add_input(handle); nd.add_input(indices); @@ -122035,36 +146590,70 @@ impl TensorArrayGatherV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape { - nd.set_attr_shape("element_shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayGatherV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, indices: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), indices.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, indices: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayGatherV3", |nd| { + nd.add_input(handle); + nd.add_input(indices); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayGatherV3Inst{op}) + } +} +impl TensorArrayGatherV3Inst { + /// Returns the 'value' output of this 'TensorArrayGatherV3' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayGatherV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayGatherV3::new().build(handle, indices, flow_in, scope)`. -pub fn tensor_array_gather_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - indices: O1, - flow_in: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_gather_v3, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, indices: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { TensorArrayGatherV3::new().build(handle, indices, flow_in, scope) } + /// Builder for the `TensorArrayGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayGrad { source: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayGradInst { + /// An instance of a fully built TensorArrayGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayGrad { /// Creates a new `TensorArrayGrad`. @@ -122073,10 +146662,7 @@ impl TensorArrayGrad { } /// Sets the `source` attribute. - pub fn source>( - mut self, - value: ArgType, - ) -> Self { + pub fn source>(mut self, value: ArgType) -> Self { self.source = ::std::option::Option::Some(value.into()); self } @@ -122088,55 +146674,73 @@ impl TensorArrayGrad { } /// Builds the `TensorArrayGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayGrad", |nd| { nd.add_input(handle); nd.add_input(flow_in); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.source { - nd.set_attr_string("source", value)?; - } + if let ::std::option::Option::Some(value) = &self.source { + nd.set_attr_string("source", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayGrad", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.source { + nd.set_attr_string("source", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayGradInst{op}) + } +} +impl TensorArrayGradInst { + /// Returns the 'grad_handle' output of this 'TensorArrayGrad' operation. + pub fn grad_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayGrad::new().build(handle, flow_in, scope)`. -pub fn tensor_array_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_grad, O1: ::std::convert::Into>(handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { TensorArrayGrad::new().build(handle, flow_in, scope) } + /// Builder for the `TensorArrayGradV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayGradV2 { source: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayGradV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayGradV2Inst { + /// An instance of a fully built TensorArrayGradV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayGradV2 { /// Creates a new `TensorArrayGradV2`. @@ -122145,10 +146749,7 @@ impl TensorArrayGradV2 { } /// Sets the `source` attribute. - pub fn source>( - mut self, - value: ArgType, - ) -> Self { + pub fn source>(mut self, value: ArgType) -> Self { self.source = ::std::option::Option::Some(value.into()); self } @@ -122160,55 +146761,73 @@ impl TensorArrayGradV2 { } /// Builds the `TensorArrayGradV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayGradV2", |nd| { nd.add_input(handle); nd.add_input(flow_in); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.source { - nd.set_attr_string("source", value)?; - } + if let ::std::option::Option::Some(value) = &self.source { + nd.set_attr_string("source", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayGradV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayGradV2", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.source { + nd.set_attr_string("source", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayGradV2Inst{op}) + } +} +impl TensorArrayGradV2Inst { + /// Returns the 'grad_handle' output of this 'TensorArrayGradV2' operation. + pub fn grad_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayGradV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayGradV2::new().build(handle, flow_in, scope)`. -pub fn tensor_array_grad_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_grad_v2, O1: ::std::convert::Into>(handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { TensorArrayGradV2::new().build(handle, flow_in, scope) } + /// Builder for the `TensorArrayGradV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayGradV3 { source: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayGradV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayGradV3Inst { + /// An instance of a fully built TensorArrayGradV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayGradV3 { /// Creates a new `TensorArrayGradV3`. @@ -122217,10 +146836,7 @@ impl TensorArrayGradV3 { } /// Sets the `source` attribute. - pub fn source>( - mut self, - value: ArgType, - ) -> Self { + pub fn source>(mut self, value: ArgType) -> Self { self.source = ::std::option::Option::Some(value.into()); self } @@ -122232,55 +146848,80 @@ impl TensorArrayGradV3 { } /// Builds the `TensorArrayGradV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayGradV3", |nd| { nd.add_input(handle); nd.add_input(flow_in); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.source { - nd.set_attr_string("source", value)?; - } + if let ::std::option::Option::Some(value) = &self.source { + nd.set_attr_string("source", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayGradV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayGradV3", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.source { + nd.set_attr_string("source", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayGradV3Inst{op}) + } +} +impl TensorArrayGradV3Inst { + /// Returns the 'grad_handle' output of this 'TensorArrayGradV3' operation. + pub fn grad_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'flow_out' output of this 'TensorArrayGradV3' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TensorArrayGradV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayGradV3::new().build(handle, flow_in, scope)`. -pub fn tensor_array_grad_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_grad_v3, O1: ::std::convert::Into>(handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { TensorArrayGradV3::new().build(handle, flow_in, scope) } + /// Builder for the `TensorArrayGradWithShape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayGradWithShape { source: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayGradWithShape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayGradWithShapeInst { + /// An instance of a fully built TensorArrayGradWithShape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayGradWithShape { /// Creates a new `TensorArrayGradWithShape`. @@ -122289,10 +146930,7 @@ impl TensorArrayGradWithShape { } /// Sets the `source` attribute. - pub fn source>( - mut self, - value: ArgType, - ) -> Self { + pub fn source>(mut self, value: ArgType) -> Self { self.source = ::std::option::Option::Some(value.into()); self } @@ -122304,32 +146942,10 @@ impl TensorArrayGradWithShape { } /// Builds the `TensorArrayGradWithShape` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - shape_to_prepend: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - flow_in.into(), - shape_to_prepend.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - shape_to_prepend: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, flow_in: O1, shape_to_prepend: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), flow_in.into(), shape_to_prepend.into(), scope) + } + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, shape_to_prepend: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayGradWithShape", |nd| { nd.add_input(handle); nd.add_input(flow_in); @@ -122337,27 +146953,59 @@ impl TensorArrayGradWithShape { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.source { - nd.set_attr_string("source", value)?; - } + if let ::std::option::Option::Some(value) = &self.source { + nd.set_attr_string("source", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayGradWithShape` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, flow_in: O1, shape_to_prepend: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), shape_to_prepend.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, shape_to_prepend: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayGradWithShape", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + nd.add_input(shape_to_prepend); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.source { + nd.set_attr_string("source", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayGradWithShapeInst{op}) + } +} +impl TensorArrayGradWithShapeInst { + /// Returns the 'grad_handle' output of this 'TensorArrayGradWithShape' operation. + pub fn grad_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'flow_out' output of this 'TensorArrayGradWithShape' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TensorArrayGradWithShapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayGradWithShape::new().build(handle, flow_in, shape_to_prepend, scope)`. -pub fn tensor_array_grad_with_shape< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - shape_to_prepend: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_grad_with_shape, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, flow_in: O1, shape_to_prepend: O2, scope: &mut crate::Scope) -> crate::Result { TensorArrayGradWithShape::new().build(handle, flow_in, shape_to_prepend, scope) } + /// Builder for the `TensorArrayPack` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayPack { @@ -122365,6 +147013,12 @@ pub struct TensorArrayPack { element_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayPack' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayPackInst { + /// An instance of a fully built TensorArrayPack Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayPack { /// Creates a new `TensorArrayPack`. @@ -122379,10 +147033,7 @@ impl TensorArrayPack { } /// Sets the `element_shape` attribute. - pub fn element_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape>(mut self, value: ArgType) -> Self { self.element_shape = ::std::option::Option::Some(value.into()); self } @@ -122394,58 +147045,79 @@ impl TensorArrayPack { } /// Builds the `TensorArrayPack` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayPack", |nd| { nd.add_input(handle); nd.add_input(flow_in); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape { - nd.set_attr_shape("element_shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayPack` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayPack", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayPackInst{op}) + } +} +impl TensorArrayPackInst { + /// Returns the 'value' output of this 'TensorArrayPack' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayPackInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayPack::new().build(handle, flow_in, scope)`. -pub fn tensor_array_pack< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_pack, O1: ::std::convert::Into>(handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { TensorArrayPack::new().build(handle, flow_in, scope) } + /// Builder for the `TensorArrayRead` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayRead { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayRead' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayReadInst { + /// An instance of a fully built TensorArrayRead Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayRead { /// Creates a new `TensorArrayRead`. @@ -122466,27 +147138,10 @@ impl TensorArrayRead { } /// Builds the `TensorArrayRead` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - index: O1, - flow_in: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, index: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), index.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - index: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, index: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayRead", |nd| { nd.add_input(handle); nd.add_input(index); @@ -122494,33 +147149,64 @@ impl TensorArrayRead { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayRead` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, index: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), index.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, index: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayRead", |nd| { + nd.add_input(handle); + nd.add_input(index); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayReadInst{op}) + } +} +impl TensorArrayReadInst { + /// Returns the 'value' output of this 'TensorArrayRead' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayReadInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayRead::new().build(handle, index, flow_in, scope)`. -pub fn tensor_array_read< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - index: O1, - flow_in: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_read, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, index: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { TensorArrayRead::new().build(handle, index, flow_in, scope) } + /// Builder for the `TensorArrayReadV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayReadV2 { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayReadV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayReadV2Inst { + /// An instance of a fully built TensorArrayReadV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayReadV2 { /// Creates a new `TensorArrayReadV2`. @@ -122541,27 +147227,10 @@ impl TensorArrayReadV2 { } /// Builds the `TensorArrayReadV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - index: O1, - flow_in: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, index: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), index.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - index: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, index: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayReadV2", |nd| { nd.add_input(handle); nd.add_input(index); @@ -122569,33 +147238,64 @@ impl TensorArrayReadV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayReadV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, index: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), index.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, index: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayReadV2", |nd| { + nd.add_input(handle); + nd.add_input(index); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayReadV2Inst{op}) + } +} +impl TensorArrayReadV2Inst { + /// Returns the 'value' output of this 'TensorArrayReadV2' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayReadV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayReadV2::new().build(handle, index, flow_in, scope)`. -pub fn tensor_array_read_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - index: O1, - flow_in: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_read_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, index: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { TensorArrayReadV2::new().build(handle, index, flow_in, scope) } + /// Builder for the `TensorArrayReadV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayReadV3 { dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayReadV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayReadV3Inst { + /// An instance of a fully built TensorArrayReadV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayReadV3 { /// Creates a new `TensorArrayReadV3`. @@ -122616,27 +147316,10 @@ impl TensorArrayReadV3 { } /// Builds the `TensorArrayReadV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - index: O1, - flow_in: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, index: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), index.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - index: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, index: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayReadV3", |nd| { nd.add_input(handle); nd.add_input(index); @@ -122644,33 +147327,64 @@ impl TensorArrayReadV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayReadV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, index: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), index.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, index: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayReadV3", |nd| { + nd.add_input(handle); + nd.add_input(index); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayReadV3Inst{op}) + } +} +impl TensorArrayReadV3Inst { + /// Returns the 'value' output of this 'TensorArrayReadV3' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayReadV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayReadV3::new().build(handle, index, flow_in, scope)`. -pub fn tensor_array_read_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - index: O1, - flow_in: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_read_v3, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, index: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { TensorArrayReadV3::new().build(handle, index, flow_in, scope) } + /// Builder for the `TensorArrayScatter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayScatter { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayScatter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayScatterInst { + /// An instance of a fully built TensorArrayScatter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayScatter { /// Creates a new `TensorArrayScatter`. @@ -122691,36 +147405,10 @@ impl TensorArrayScatter { } /// Builds the `TensorArrayScatter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - handle: O0, - indices: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - indices.into(), - value.into(), - flow_in.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - indices: crate::Output, - value: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, indices: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), indices.into(), value.into(), flow_in.into(), scope) + } + fn build_impl(&self, handle: crate::Output, indices: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayScatter", |nd| { nd.add_input(handle); nd.add_input(indices); @@ -122729,35 +147417,65 @@ impl TensorArrayScatter { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayScatter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, indices: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), indices.into(), value.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, indices: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayScatter", |nd| { + nd.add_input(handle); + nd.add_input(indices); + nd.add_input(value); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayScatterInst{op}) + } +} +impl TensorArrayScatterInst { + /// Returns the 'flow_out' output of this 'TensorArrayScatter' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayScatterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayScatter::new().build(handle, indices, value, flow_in, scope)`. -pub fn tensor_array_scatter< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - handle: O0, - indices: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_scatter, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(handle: O0, indices: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { TensorArrayScatter::new().build(handle, indices, value, flow_in, scope) } + /// Builder for the `TensorArrayScatterV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayScatterV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayScatterV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayScatterV2Inst { + /// An instance of a fully built TensorArrayScatterV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayScatterV2 { /// Creates a new `TensorArrayScatterV2`. @@ -122778,36 +147496,10 @@ impl TensorArrayScatterV2 { } /// Builds the `TensorArrayScatterV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - handle: O0, - indices: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - indices.into(), - value.into(), - flow_in.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - indices: crate::Output, - value: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, indices: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), indices.into(), value.into(), flow_in.into(), scope) + } + fn build_impl(&self, handle: crate::Output, indices: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayScatterV2", |nd| { nd.add_input(handle); nd.add_input(indices); @@ -122816,35 +147508,65 @@ impl TensorArrayScatterV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayScatterV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, indices: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), indices.into(), value.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, indices: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayScatterV2", |nd| { + nd.add_input(handle); + nd.add_input(indices); + nd.add_input(value); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayScatterV2Inst{op}) + } +} +impl TensorArrayScatterV2Inst { + /// Returns the 'flow_out' output of this 'TensorArrayScatterV2' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayScatterV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayScatterV2::new().build(handle, indices, value, flow_in, scope)`. -pub fn tensor_array_scatter_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - handle: O0, - indices: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_scatter_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(handle: O0, indices: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { TensorArrayScatterV2::new().build(handle, indices, value, flow_in, scope) } + /// Builder for the `TensorArrayScatterV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayScatterV3 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayScatterV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayScatterV3Inst { + /// An instance of a fully built TensorArrayScatterV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayScatterV3 { /// Creates a new `TensorArrayScatterV3`. @@ -122865,36 +147587,10 @@ impl TensorArrayScatterV3 { } /// Builds the `TensorArrayScatterV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - handle: O0, - indices: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - indices.into(), - value.into(), - flow_in.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - indices: crate::Output, - value: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, indices: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), indices.into(), value.into(), flow_in.into(), scope) + } + fn build_impl(&self, handle: crate::Output, indices: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayScatterV3", |nd| { nd.add_input(handle); nd.add_input(indices); @@ -122903,34 +147599,64 @@ impl TensorArrayScatterV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayScatterV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, indices: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), indices.into(), value.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, indices: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayScatterV3", |nd| { + nd.add_input(handle); + nd.add_input(indices); + nd.add_input(value); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayScatterV3Inst{op}) + } +} +impl TensorArrayScatterV3Inst { + /// Returns the 'flow_out' output of this 'TensorArrayScatterV3' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayScatterV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayScatterV3::new().build(handle, indices, value, flow_in, scope)`. -pub fn tensor_array_scatter_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - handle: O0, - indices: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_scatter_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(handle: O0, indices: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { TensorArrayScatterV3::new().build(handle, indices, value, flow_in, scope) } + /// Builder for the `TensorArraySize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArraySize { control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArraySize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArraySizeInst { + /// An instance of a fully built TensorArraySize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArraySize { /// Creates a new `TensorArraySize`. @@ -122945,24 +147671,10 @@ impl TensorArraySize { } /// Builds the `TensorArraySize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArraySize", |nd| { nd.add_input(handle); nd.add_input(flow_in); @@ -122972,24 +147684,53 @@ impl TensorArraySize { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArraySize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArraySize", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArraySizeInst{op}) + } +} +impl TensorArraySizeInst { + /// Returns the 'size' output of this 'TensorArraySize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArraySizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArraySize::new().build(handle, flow_in, scope)`. -pub fn tensor_array_size< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_size, O1: ::std::convert::Into>(handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { TensorArraySize::new().build(handle, flow_in, scope) } + /// Builder for the `TensorArraySizeV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArraySizeV2 { control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArraySizeV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArraySizeV2Inst { + /// An instance of a fully built TensorArraySizeV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArraySizeV2 { /// Creates a new `TensorArraySizeV2`. @@ -123004,24 +147745,10 @@ impl TensorArraySizeV2 { } /// Builds the `TensorArraySizeV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArraySizeV2", |nd| { nd.add_input(handle); nd.add_input(flow_in); @@ -123031,24 +147758,53 @@ impl TensorArraySizeV2 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArraySizeV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArraySizeV2", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArraySizeV2Inst{op}) + } +} +impl TensorArraySizeV2Inst { + /// Returns the 'size' output of this 'TensorArraySizeV2' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArraySizeV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArraySizeV2::new().build(handle, flow_in, scope)`. -pub fn tensor_array_size_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_size_v2, O1: ::std::convert::Into>(handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { TensorArraySizeV2::new().build(handle, flow_in, scope) } + /// Builder for the `TensorArraySizeV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArraySizeV3 { control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArraySizeV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArraySizeV3Inst { + /// An instance of a fully built TensorArraySizeV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArraySizeV3 { /// Creates a new `TensorArraySizeV3`. @@ -123063,24 +147819,10 @@ impl TensorArraySizeV3 { } /// Builds the `TensorArraySizeV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArraySizeV3", |nd| { nd.add_input(handle); nd.add_input(flow_in); @@ -123090,25 +147832,54 @@ impl TensorArraySizeV3 { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArraySizeV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArraySizeV3", |nd| { + nd.add_input(handle); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArraySizeV3Inst{op}) + } +} +impl TensorArraySizeV3Inst { + /// Returns the 'size' output of this 'TensorArraySizeV3' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArraySizeV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArraySizeV3::new().build(handle, flow_in, scope)`. -pub fn tensor_array_size_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - handle: O0, - flow_in: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_size_v3, O1: ::std::convert::Into>(handle: O0, flow_in: O1, scope: &mut crate::Scope) -> crate::Result { TensorArraySizeV3::new().build(handle, flow_in, scope) } + /// Builder for the `TensorArraySplit` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArraySplit { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArraySplit' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArraySplitInst { + /// An instance of a fully built TensorArraySplit Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArraySplit { /// Creates a new `TensorArraySplit`. @@ -123129,36 +147900,10 @@ impl TensorArraySplit { } /// Builds the `TensorArraySplit` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - handle: O0, - value: O1, - lengths: O2, - flow_in: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - value.into(), - lengths.into(), - flow_in.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - value: crate::Output, - lengths: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, value: O1, lengths: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), value.into(), lengths.into(), flow_in.into(), scope) + } + fn build_impl(&self, handle: crate::Output, value: crate::Output, lengths: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArraySplit", |nd| { nd.add_input(handle); nd.add_input(value); @@ -123167,35 +147912,65 @@ impl TensorArraySplit { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArraySplit` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, value: O1, lengths: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), value.into(), lengths.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, value: crate::Output, lengths: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArraySplit", |nd| { + nd.add_input(handle); + nd.add_input(value); + nd.add_input(lengths); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArraySplitInst{op}) + } +} +impl TensorArraySplitInst { + /// Returns the 'flow_out' output of this 'TensorArraySplit' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArraySplitInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArraySplit::new().build(handle, value, lengths, flow_in, scope)`. -pub fn tensor_array_split< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - handle: O0, - value: O1, - lengths: O2, - flow_in: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_split, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(handle: O0, value: O1, lengths: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { TensorArraySplit::new().build(handle, value, lengths, flow_in, scope) } + /// Builder for the `TensorArraySplitV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArraySplitV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArraySplitV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArraySplitV2Inst { + /// An instance of a fully built TensorArraySplitV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArraySplitV2 { /// Creates a new `TensorArraySplitV2`. @@ -123216,36 +147991,10 @@ impl TensorArraySplitV2 { } /// Builds the `TensorArraySplitV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - handle: O0, - value: O1, - lengths: O2, - flow_in: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - value.into(), - lengths.into(), - flow_in.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - value: crate::Output, - lengths: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, value: O1, lengths: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), value.into(), lengths.into(), flow_in.into(), scope) + } + fn build_impl(&self, handle: crate::Output, value: crate::Output, lengths: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArraySplitV2", |nd| { nd.add_input(handle); nd.add_input(value); @@ -123254,35 +148003,65 @@ impl TensorArraySplitV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArraySplitV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, value: O1, lengths: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), value.into(), lengths.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, value: crate::Output, lengths: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArraySplitV2", |nd| { + nd.add_input(handle); + nd.add_input(value); + nd.add_input(lengths); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArraySplitV2Inst{op}) + } +} +impl TensorArraySplitV2Inst { + /// Returns the 'flow_out' output of this 'TensorArraySplitV2' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArraySplitV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArraySplitV2::new().build(handle, value, lengths, flow_in, scope)`. -pub fn tensor_array_split_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - handle: O0, - value: O1, - lengths: O2, - flow_in: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_split_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(handle: O0, value: O1, lengths: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { TensorArraySplitV2::new().build(handle, value, lengths, flow_in, scope) } + /// Builder for the `TensorArraySplitV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArraySplitV3 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArraySplitV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArraySplitV3Inst { + /// An instance of a fully built TensorArraySplitV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArraySplitV3 { /// Creates a new `TensorArraySplitV3`. @@ -123303,36 +148082,10 @@ impl TensorArraySplitV3 { } /// Builds the `TensorArraySplitV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - handle: O0, - value: O1, - lengths: O2, - flow_in: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - value.into(), - lengths.into(), - flow_in.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - value: crate::Output, - lengths: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, value: O1, lengths: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), value.into(), lengths.into(), flow_in.into(), scope) + } + fn build_impl(&self, handle: crate::Output, value: crate::Output, lengths: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArraySplitV3", |nd| { nd.add_input(handle); nd.add_input(value); @@ -123341,35 +148094,65 @@ impl TensorArraySplitV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArraySplitV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, value: O1, lengths: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), value.into(), lengths.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, value: crate::Output, lengths: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArraySplitV3", |nd| { + nd.add_input(handle); + nd.add_input(value); + nd.add_input(lengths); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArraySplitV3Inst{op}) + } +} +impl TensorArraySplitV3Inst { + /// Returns the 'flow_out' output of this 'TensorArraySplitV3' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArraySplitV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArraySplitV3::new().build(handle, value, lengths, flow_in, scope)`. -pub fn tensor_array_split_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - handle: O0, - value: O1, - lengths: O2, - flow_in: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_split_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(handle: O0, value: O1, lengths: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { TensorArraySplitV3::new().build(handle, value, lengths, flow_in, scope) } + /// Builder for the `TensorArrayUnpack` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayUnpack { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayUnpack' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayUnpackInst { + /// An instance of a fully built TensorArrayUnpack Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayUnpack { /// Creates a new `TensorArrayUnpack`. @@ -123390,27 +148173,10 @@ impl TensorArrayUnpack { } /// Builds the `TensorArrayUnpack` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - handle: O0, - value: O1, - flow_in: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, value: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(handle.into(), value.into(), flow_in.into(), scope) } - - fn build_impl( - &self, - handle: crate::Output, - value: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, handle: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayUnpack", |nd| { nd.add_input(handle); nd.add_input(value); @@ -123418,27 +148184,52 @@ impl TensorArrayUnpack { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayUnpack` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, handle: O0, value: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), value.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayUnpack", |nd| { + nd.add_input(handle); + nd.add_input(value); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayUnpackInst{op}) + } +} +impl TensorArrayUnpackInst { + /// Returns the 'flow_out' output of this 'TensorArrayUnpack' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayUnpackInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayUnpack::new().build(handle, value, flow_in, scope)`. -pub fn tensor_array_unpack< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - handle: O0, - value: O1, - flow_in: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_unpack, O1: ::std::convert::Into, O2: ::std::convert::Into>(handle: O0, value: O1, flow_in: O2, scope: &mut crate::Scope) -> crate::Result { TensorArrayUnpack::new().build(handle, value, flow_in, scope) } + /// Builder for the `TensorArrayV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayV2 { @@ -123449,6 +148240,12 @@ pub struct TensorArrayV2 { tensor_array_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayV2Inst { + /// An instance of a fully built TensorArrayV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayV2 { /// Creates a new `TensorArrayV2`. @@ -123463,10 +148260,7 @@ impl TensorArrayV2 { } /// Sets the `element_shape` attribute. - pub fn element_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape>(mut self, value: ArgType) -> Self { self.element_shape = ::std::option::Option::Some(value.into()); self } @@ -123484,10 +148278,7 @@ impl TensorArrayV2 { } /// Sets the `tensor_array_name` attribute. - pub fn tensor_array_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_array_name>(mut self, value: ArgType) -> Self { self.tensor_array_name = ::std::option::Option::Some(value.into()); self } @@ -123499,51 +148290,83 @@ impl TensorArrayV2 { } /// Builds the `TensorArrayV2` operation. - pub fn build>( - &self, - size: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, size: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(size.into(), scope) } - - fn build_impl( - &self, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayV2", |nd| { nd.add_input(size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape { - nd.set_attr_shape("element_shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.dynamic_size { - nd.set_attr_bool("dynamic_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.clear_after_read { - nd.set_attr_bool("clear_after_read", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_array_name { - nd.set_attr_string("tensor_array_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.dynamic_size { + nd.set_attr_bool("dynamic_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.clear_after_read { + nd.set_attr_bool("clear_after_read", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_array_name { + nd.set_attr_string("tensor_array_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, size: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(size.into(), scope) + } + fn build_instance_impl(&self, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayV2", |nd| { + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.dynamic_size { + nd.set_attr_bool("dynamic_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.clear_after_read { + nd.set_attr_bool("clear_after_read", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_array_name { + nd.set_attr_string("tensor_array_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayV2Inst{op}) + } +} +impl TensorArrayV2Inst { + /// Returns the 'handle' output of this 'TensorArrayV2' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayV2::new().build(size, scope)`. -pub fn tensor_array_v2>( - size: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_v2>(size: O0, scope: &mut crate::Scope) -> crate::Result { TensorArrayV2::new().build(size, scope) } + /// Builder for the `TensorArrayV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayV3 { @@ -123555,6 +148378,12 @@ pub struct TensorArrayV3 { tensor_array_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayV3Inst { + /// An instance of a fully built TensorArrayV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayV3 { /// Creates a new `TensorArrayV3`. @@ -123569,10 +148398,7 @@ impl TensorArrayV3 { } /// Sets the `element_shape` attribute. - pub fn element_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape>(mut self, value: ArgType) -> Self { self.element_shape = ::std::option::Option::Some(value.into()); self } @@ -123590,19 +148416,13 @@ impl TensorArrayV3 { } /// Sets the `identical_element_shapes` attribute. - pub fn identical_element_shapes>( - mut self, - value: ArgType, - ) -> Self { + pub fn identical_element_shapes>(mut self, value: ArgType) -> Self { self.identical_element_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `tensor_array_name` attribute. - pub fn tensor_array_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn tensor_array_name>(mut self, value: ArgType) -> Self { self.tensor_array_name = ::std::option::Option::Some(value.into()); self } @@ -123614,60 +148434,108 @@ impl TensorArrayV3 { } /// Builds the `TensorArrayV3` operation. - pub fn build>( - &self, - size: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, size: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(size.into(), scope) } - - fn build_impl( - &self, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayV3", |nd| { nd.add_input(size); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape { - nd.set_attr_shape("element_shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.dynamic_size { - nd.set_attr_bool("dynamic_size", *value)?; - } - if let ::std::option::Option::Some(value) = &self.clear_after_read { - nd.set_attr_bool("clear_after_read", *value)?; - } - if let ::std::option::Option::Some(value) = &self.identical_element_shapes { - nd.set_attr_bool("identical_element_shapes", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tensor_array_name { - nd.set_attr_string("tensor_array_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.dynamic_size { + nd.set_attr_bool("dynamic_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.clear_after_read { + nd.set_attr_bool("clear_after_read", *value)?; + } + if let ::std::option::Option::Some(value) = &self.identical_element_shapes { + nd.set_attr_bool("identical_element_shapes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_array_name { + nd.set_attr_string("tensor_array_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, size: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(size.into(), scope) + } + fn build_instance_impl(&self, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayV3", |nd| { + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.dynamic_size { + nd.set_attr_bool("dynamic_size", *value)?; + } + if let ::std::option::Option::Some(value) = &self.clear_after_read { + nd.set_attr_bool("clear_after_read", *value)?; + } + if let ::std::option::Option::Some(value) = &self.identical_element_shapes { + nd.set_attr_bool("identical_element_shapes", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tensor_array_name { + nd.set_attr_string("tensor_array_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayV3Inst{op}) + } +} +impl TensorArrayV3Inst { + /// Returns the 'handle' output of this 'TensorArrayV3' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'flow' output of this 'TensorArrayV3' operation. + pub fn flow(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TensorArrayV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayV3::new().build(size, scope)`. -pub fn tensor_array_v3>( - size: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_v3>(size: O0, scope: &mut crate::Scope) -> crate::Result { TensorArrayV3::new().build(size, scope) } + /// Builder for the `TensorArrayWrite` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayWrite { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayWrite' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayWriteInst { + /// An instance of a fully built TensorArrayWrite Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayWrite { /// Creates a new `TensorArrayWrite`. @@ -123688,36 +148556,10 @@ impl TensorArrayWrite { } /// Builds the `TensorArrayWrite` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - handle: O0, - index: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - index.into(), - value.into(), - flow_in.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - index: crate::Output, - value: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, index: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), index.into(), value.into(), flow_in.into(), scope) + } + fn build_impl(&self, handle: crate::Output, index: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayWrite", |nd| { nd.add_input(handle); nd.add_input(index); @@ -123726,35 +148568,65 @@ impl TensorArrayWrite { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayWrite` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, index: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), index.into(), value.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, index: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayWrite", |nd| { + nd.add_input(handle); + nd.add_input(index); + nd.add_input(value); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayWriteInst{op}) + } +} +impl TensorArrayWriteInst { + /// Returns the 'flow_out' output of this 'TensorArrayWrite' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayWriteInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayWrite::new().build(handle, index, value, flow_in, scope)`. -pub fn tensor_array_write< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - handle: O0, - index: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_write, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(handle: O0, index: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { TensorArrayWrite::new().build(handle, index, value, flow_in, scope) } + /// Builder for the `TensorArrayWriteV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayWriteV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayWriteV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayWriteV2Inst { + /// An instance of a fully built TensorArrayWriteV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayWriteV2 { /// Creates a new `TensorArrayWriteV2`. @@ -123775,36 +148647,10 @@ impl TensorArrayWriteV2 { } /// Builds the `TensorArrayWriteV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - handle: O0, - index: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - index.into(), - value.into(), - flow_in.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - index: crate::Output, - value: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, index: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), index.into(), value.into(), flow_in.into(), scope) + } + fn build_impl(&self, handle: crate::Output, index: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayWriteV2", |nd| { nd.add_input(handle); nd.add_input(index); @@ -123813,35 +148659,65 @@ impl TensorArrayWriteV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayWriteV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, index: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), index.into(), value.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, index: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayWriteV2", |nd| { + nd.add_input(handle); + nd.add_input(index); + nd.add_input(value); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayWriteV2Inst{op}) + } +} +impl TensorArrayWriteV2Inst { + /// Returns the 'flow_out' output of this 'TensorArrayWriteV2' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayWriteV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayWriteV2::new().build(handle, index, value, flow_in, scope)`. -pub fn tensor_array_write_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - handle: O0, - index: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_write_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(handle: O0, index: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { TensorArrayWriteV2::new().build(handle, index, value, flow_in, scope) } + /// Builder for the `TensorArrayWriteV3` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorArrayWriteV3 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorArrayWriteV3' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorArrayWriteV3Inst { + /// An instance of a fully built TensorArrayWriteV3 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorArrayWriteV3 { /// Creates a new `TensorArrayWriteV3`. @@ -123862,36 +148738,10 @@ impl TensorArrayWriteV3 { } /// Builds the `TensorArrayWriteV3` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - handle: O0, - index: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - handle.into(), - index.into(), - value.into(), - flow_in.into(), - scope, - ) - } - - fn build_impl( - &self, - handle: crate::Output, - index: crate::Output, - value: crate::Output, - flow_in: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, index: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(handle.into(), index.into(), value.into(), flow_in.into(), scope) + } + fn build_impl(&self, handle: crate::Output, index: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorArrayWriteV3", |nd| { nd.add_input(handle); nd.add_input(index); @@ -123900,29 +148750,53 @@ impl TensorArrayWriteV3 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorArrayWriteV3` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, handle: O0, index: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(handle.into(), index.into(), value.into(), flow_in.into(), scope) + } + fn build_instance_impl(&self, handle: crate::Output, index: crate::Output, value: crate::Output, flow_in: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorArrayWriteV3", |nd| { + nd.add_input(handle); + nd.add_input(index); + nd.add_input(value); + nd.add_input(flow_in); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorArrayWriteV3Inst{op}) + } +} +impl TensorArrayWriteV3Inst { + /// Returns the 'flow_out' output of this 'TensorArrayWriteV3' operation. + pub fn flow_out(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorArrayWriteV3Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorArrayWriteV3::new().build(handle, index, value, flow_in, scope)`. -pub fn tensor_array_write_v3< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - handle: O0, - index: O1, - value: O2, - flow_in: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_array_write_v3, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(handle: O0, index: O1, value: O2, flow_in: O3, scope: &mut crate::Scope) -> crate::Result { TensorArrayWriteV3::new().build(handle, index, value, flow_in, scope) } + /// Builder for the `TensorDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorDataset { @@ -123931,6 +148805,12 @@ pub struct TensorDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorDatasetInst { + /// An instance of a fully built TensorDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorDataset { /// Creates a new `TensorDataset`. @@ -123939,28 +148819,19 @@ impl TensorDataset { } /// Sets the `Toutput_types` attribute. - pub fn Toutput_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput_types>>(mut self, value: ArgType) -> Self { self.Toutput_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -123972,45 +148843,71 @@ impl TensorDataset { } /// Builds the `TensorDataset` operation. - pub fn build>( - &self, - components: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, components: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(components.into(), scope) } - - fn build_impl( - &self, - components: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorDataset", |nd| { nd.add_input(components); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Toutput_types { - nd.set_attr_type_list("Toutput_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.Toutput_types { + nd.set_attr_type_list("Toutput_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, components: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(components.into(), scope) + } + fn build_instance_impl(&self, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorDataset", |nd| { + nd.add_input(components); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Toutput_types { + nd.set_attr_type_list("Toutput_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorDatasetInst{op}) + } +} +impl TensorDatasetInst { + /// Returns the 'handle' output of this 'TensorDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorDataset::new().build(components, scope)`. -pub fn tensor_dataset>( - components: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_dataset>(components: O0, scope: &mut crate::Scope) -> crate::Result { TensorDataset::new().build(components, scope) } + /// Builder for the `TensorListConcat` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListConcat { @@ -124018,6 +148915,12 @@ pub struct TensorListConcat { element_shape: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListConcat' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListConcatInst { + /// An instance of a fully built TensorListConcat Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListConcat { /// Creates a new `TensorListConcat`. @@ -124026,19 +148929,13 @@ impl TensorListConcat { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `element_shape` attribute. - pub fn element_shape>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_shape>(mut self, value: ArgType) -> Self { self.element_shape = ::std::option::Option::Some(value.into()); self } @@ -124050,48 +148947,84 @@ impl TensorListConcat { } /// Builds the `TensorListConcat` operation. - pub fn build>( - &self, - input_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListConcat", |nd| { nd.add_input(input_handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.element_shape { - nd.set_attr_shape("element_shape", value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListConcat` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListConcat", |nd| { + nd.add_input(input_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.element_shape { + nd.set_attr_shape("element_shape", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListConcatInst{op}) + } +} +impl TensorListConcatInst { + /// Returns the 'tensor' output of this 'TensorListConcat' operation. + pub fn tensor(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'lengths' output of this 'TensorListConcat' operation. + pub fn lengths(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TensorListConcatInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListConcat::new().build(input_handle, scope)`. -pub fn tensor_list_concat>( - input_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_concat>(input_handle: O0, scope: &mut crate::Scope) -> crate::Result { TensorListConcat::new().build(input_handle, scope) } + /// Builder for the `TensorListConcatLists` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListConcatLists { element_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListConcatLists' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListConcatListsInst { + /// An instance of a fully built TensorListConcatLists Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListConcatLists { /// Creates a new `TensorListConcatLists`. @@ -124100,10 +149033,7 @@ impl TensorListConcatLists { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } @@ -124115,49 +149045,61 @@ impl TensorListConcatLists { } /// Builds the `TensorListConcatLists` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_a: O0, - input_b: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_a: O0, input_b: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_a.into(), input_b.into(), scope) } - - fn build_impl( - &self, - input_a: crate::Output, - input_b: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_a: crate::Output, input_b: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListConcatLists", |nd| { nd.add_input(input_a); nd.add_input(input_b); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListConcatLists` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_a: O0, input_b: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_a.into(), input_b.into(), scope) + } + fn build_instance_impl(&self, input_a: crate::Output, input_b: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListConcatLists", |nd| { + nd.add_input(input_a); + nd.add_input(input_b); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListConcatListsInst{op}) + } +} +impl TensorListConcatListsInst { + /// Returns the 'output' output of this 'TensorListConcatLists' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListConcatListsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListConcatLists::new().build(input_a, input_b, scope)`. -pub fn tensor_list_concat_lists< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_a: O0, - input_b: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_concat_lists, O1: ::std::convert::Into>(input_a: O0, input_b: O1, scope: &mut crate::Scope) -> crate::Result { TensorListConcatLists::new().build(input_a, input_b, scope) } + /// Builder for the `TensorListConcatV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListConcatV2 { @@ -124165,6 +149107,12 @@ pub struct TensorListConcatV2 { shape_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListConcatV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListConcatV2Inst { + /// An instance of a fully built TensorListConcatV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListConcatV2 { /// Creates a new `TensorListConcatV2`. @@ -124173,19 +149121,13 @@ impl TensorListConcatV2 { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `shape_type` attribute. - pub fn shape_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_type>(mut self, value: ArgType) -> Self { self.shape_type = ::std::option::Option::Some(value.into()); self } @@ -124197,32 +149139,10 @@ impl TensorListConcatV2 { } /// Builds the `TensorListConcatV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_handle: O0, - element_shape: O1, - leading_dims: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_handle.into(), - element_shape.into(), - leading_dims.into(), - scope, - ) - } - - fn build_impl( - &self, - input_handle: crate::Output, - element_shape: crate::Output, - leading_dims: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, element_shape: O1, leading_dims: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_handle.into(), element_shape.into(), leading_dims.into(), scope) + } + fn build_impl(&self, input_handle: crate::Output, element_shape: crate::Output, leading_dims: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListConcatV2", |nd| { nd.add_input(input_handle); nd.add_input(element_shape); @@ -124230,36 +149150,77 @@ impl TensorListConcatV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_type { - nd.set_attr_type("shape_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListConcatV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, element_shape: O1, leading_dims: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), element_shape.into(), leading_dims.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, element_shape: crate::Output, leading_dims: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListConcatV2", |nd| { + nd.add_input(input_handle); + nd.add_input(element_shape); + nd.add_input(leading_dims); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListConcatV2Inst{op}) + } +} +impl TensorListConcatV2Inst { + /// Returns the 'tensor' output of this 'TensorListConcatV2' operation. + pub fn tensor(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'lengths' output of this 'TensorListConcatV2' operation. + pub fn lengths(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TensorListConcatV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListConcatV2::new().build(input_handle, element_shape, leading_dims, scope)`. -pub fn tensor_list_concat_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_handle: O0, - element_shape: O1, - leading_dims: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_concat_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_handle: O0, element_shape: O1, leading_dims: O2, scope: &mut crate::Scope) -> crate::Result { TensorListConcatV2::new().build(input_handle, element_shape, leading_dims, scope) } + /// Builder for the `TensorListElementShape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListElementShape { shape_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListElementShape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListElementShapeInst { + /// An instance of a fully built TensorListElementShape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListElementShape { /// Creates a new `TensorListElementShape`. @@ -124268,10 +149229,7 @@ impl TensorListElementShape { } /// Sets the `shape_type` attribute. - pub fn shape_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_type>(mut self, value: ArgType) -> Self { self.shape_type = ::std::option::Option::Some(value.into()); self } @@ -124283,39 +149241,59 @@ impl TensorListElementShape { } /// Builds the `TensorListElementShape` operation. - pub fn build>( - &self, - input_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListElementShape", |nd| { nd.add_input(input_handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.shape_type { - nd.set_attr_type("shape_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListElementShape` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListElementShape", |nd| { + nd.add_input(input_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListElementShapeInst{op}) + } +} +impl TensorListElementShapeInst { + /// Returns the 'element_shape' output of this 'TensorListElementShape' operation. + pub fn element_shape(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListElementShapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListElementShape::new().build(input_handle, scope)`. -pub fn tensor_list_element_shape>( - input_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_element_shape>(input_handle: O0, scope: &mut crate::Scope) -> crate::Result { TensorListElementShape::new().build(input_handle, scope) } + /// Builder for the `TensorListFromTensor` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListFromTensor { @@ -124323,6 +149301,12 @@ pub struct TensorListFromTensor { shape_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListFromTensor' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListFromTensorInst { + /// An instance of a fully built TensorListFromTensor Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListFromTensor { /// Creates a new `TensorListFromTensor`. @@ -124331,19 +149315,13 @@ impl TensorListFromTensor { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `shape_type` attribute. - pub fn shape_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_type>(mut self, value: ArgType) -> Self { self.shape_type = ::std::option::Option::Some(value.into()); self } @@ -124355,58 +149333,79 @@ impl TensorListFromTensor { } /// Builds the `TensorListFromTensor` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - tensor: O0, - element_shape: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, tensor: O0, element_shape: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), element_shape.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - element_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListFromTensor", |nd| { nd.add_input(tensor); nd.add_input(element_shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_type { - nd.set_attr_type("shape_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListFromTensor` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, tensor: O0, element_shape: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), element_shape.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListFromTensor", |nd| { + nd.add_input(tensor); + nd.add_input(element_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListFromTensorInst{op}) + } +} +impl TensorListFromTensorInst { + /// Returns the 'output_handle' output of this 'TensorListFromTensor' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListFromTensorInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListFromTensor::new().build(tensor, element_shape, scope)`. -pub fn tensor_list_from_tensor< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - tensor: O0, - element_shape: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_from_tensor, O1: ::std::convert::Into>(tensor: O0, element_shape: O1, scope: &mut crate::Scope) -> crate::Result { TensorListFromTensor::new().build(tensor, element_shape, scope) } + /// Builder for the `TensorListGather` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListGather { element_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListGather' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListGatherInst { + /// An instance of a fully built TensorListGather Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListGather { /// Creates a new `TensorListGather`. @@ -124415,10 +149414,7 @@ impl TensorListGather { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } @@ -124430,32 +149426,10 @@ impl TensorListGather { } /// Builds the `TensorListGather` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_handle: O0, - indices: O1, - element_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_handle.into(), - indices.into(), - element_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - input_handle: crate::Output, - indices: crate::Output, - element_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, indices: O1, element_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_handle.into(), indices.into(), element_shape.into(), scope) + } + fn build_impl(&self, input_handle: crate::Output, indices: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListGather", |nd| { nd.add_input(input_handle); nd.add_input(indices); @@ -124463,33 +149437,64 @@ impl TensorListGather { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListGather` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, indices: O1, element_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), indices.into(), element_shape.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, indices: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListGather", |nd| { + nd.add_input(input_handle); + nd.add_input(indices); + nd.add_input(element_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListGatherInst{op}) + } +} +impl TensorListGatherInst { + /// Returns the 'values' output of this 'TensorListGather' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListGatherInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListGather::new().build(input_handle, indices, element_shape, scope)`. -pub fn tensor_list_gather< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_handle: O0, - indices: O1, - element_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_gather, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_handle: O0, indices: O1, element_shape: O2, scope: &mut crate::Scope) -> crate::Result { TensorListGather::new().build(input_handle, indices, element_shape, scope) } + /// Builder for the `TensorListGetItem` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListGetItem { element_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListGetItem' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListGetItemInst { + /// An instance of a fully built TensorListGetItem Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListGetItem { /// Creates a new `TensorListGetItem`. @@ -124498,10 +149503,7 @@ impl TensorListGetItem { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } @@ -124513,32 +149515,10 @@ impl TensorListGetItem { } /// Builds the `TensorListGetItem` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_handle: O0, - index: O1, - element_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_handle.into(), - index.into(), - element_shape.into(), - scope, - ) - } - - fn build_impl( - &self, - input_handle: crate::Output, - index: crate::Output, - element_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, index: O1, element_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_handle.into(), index.into(), element_shape.into(), scope) + } + fn build_impl(&self, input_handle: crate::Output, index: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListGetItem", |nd| { nd.add_input(input_handle); nd.add_input(index); @@ -124546,32 +149526,63 @@ impl TensorListGetItem { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListGetItem` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, index: O1, element_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), index.into(), element_shape.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, index: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListGetItem", |nd| { + nd.add_input(input_handle); + nd.add_input(index); + nd.add_input(element_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListGetItemInst{op}) + } +} +impl TensorListGetItemInst { + /// Returns the 'item' output of this 'TensorListGetItem' operation. + pub fn item(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListGetItemInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListGetItem::new().build(input_handle, index, element_shape, scope)`. -pub fn tensor_list_get_item< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_handle: O0, - index: O1, - element_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_get_item, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_handle: O0, index: O1, element_shape: O2, scope: &mut crate::Scope) -> crate::Result { TensorListGetItem::new().build(input_handle, index, element_shape, scope) } + /// Builder for the `TensorListLength` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListLength { control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListLength' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListLengthInst { + /// An instance of a fully built TensorListLength Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListLength { /// Creates a new `TensorListLength`. @@ -124586,19 +149597,10 @@ impl TensorListLength { } /// Builds the `TensorListLength` operation. - pub fn build>( - &self, - input_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListLength", |nd| { nd.add_input(input_handle); for op in &self.control_inputs { @@ -124607,21 +149609,53 @@ impl TensorListLength { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListLength` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListLength", |nd| { + nd.add_input(input_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListLengthInst{op}) + } +} +impl TensorListLengthInst { + /// Returns the 'length' output of this 'TensorListLength' operation. + pub fn length(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListLengthInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListLength::new().build(input_handle, scope)`. -pub fn tensor_list_length>( - input_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_length>(input_handle: O0, scope: &mut crate::Scope) -> crate::Result { TensorListLength::new().build(input_handle, scope) } + /// Builder for the `TensorListPopBack` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListPopBack { element_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListPopBack' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListPopBackInst { + /// An instance of a fully built TensorListPopBack Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListPopBack { /// Creates a new `TensorListPopBack`. @@ -124630,10 +149664,7 @@ impl TensorListPopBack { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } @@ -124645,55 +149676,80 @@ impl TensorListPopBack { } /// Builds the `TensorListPopBack` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_handle: O0, - element_shape: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_handle: O0, element_shape: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), element_shape.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - element_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListPopBack", |nd| { nd.add_input(input_handle); nd.add_input(element_shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListPopBack` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_handle: O0, element_shape: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), element_shape.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListPopBack", |nd| { + nd.add_input(input_handle); + nd.add_input(element_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListPopBackInst{op}) + } +} +impl TensorListPopBackInst { + /// Returns the 'output_handle' output of this 'TensorListPopBack' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'tensor' output of this 'TensorListPopBack' operation. + pub fn tensor(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TensorListPopBackInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListPopBack::new().build(input_handle, element_shape, scope)`. -pub fn tensor_list_pop_back< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_handle: O0, - element_shape: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_pop_back, O1: ::std::convert::Into>(input_handle: O0, element_shape: O1, scope: &mut crate::Scope) -> crate::Result { TensorListPopBack::new().build(input_handle, element_shape, scope) } + /// Builder for the `TensorListPushBack` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListPushBack { element_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListPushBack' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListPushBackInst { + /// An instance of a fully built TensorListPushBack Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListPushBack { /// Creates a new `TensorListPushBack`. @@ -124702,10 +149758,7 @@ impl TensorListPushBack { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } @@ -124717,55 +149770,73 @@ impl TensorListPushBack { } /// Builds the `TensorListPushBack` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_handle: O0, - tensor: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_handle: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), tensor.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListPushBack", |nd| { nd.add_input(input_handle); nd.add_input(tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListPushBack` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_handle: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), tensor.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListPushBack", |nd| { + nd.add_input(input_handle); + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListPushBackInst{op}) + } +} +impl TensorListPushBackInst { + /// Returns the 'output_handle' output of this 'TensorListPushBack' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListPushBackInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListPushBack::new().build(input_handle, tensor, scope)`. -pub fn tensor_list_push_back< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_handle: O0, - tensor: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_push_back, O1: ::std::convert::Into>(input_handle: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { TensorListPushBack::new().build(input_handle, tensor, scope) } + /// Builder for the `TensorListPushBackBatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListPushBackBatch { element_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListPushBackBatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListPushBackBatchInst { + /// An instance of a fully built TensorListPushBackBatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListPushBackBatch { /// Creates a new `TensorListPushBackBatch`. @@ -124774,10 +149845,7 @@ impl TensorListPushBackBatch { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } @@ -124789,49 +149857,61 @@ impl TensorListPushBackBatch { } /// Builds the `TensorListPushBackBatch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_handles: O0, - tensor: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_handles: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handles.into(), tensor.into(), scope) } - - fn build_impl( - &self, - input_handles: crate::Output, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handles: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListPushBackBatch", |nd| { nd.add_input(input_handles); nd.add_input(tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListPushBackBatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_handles: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handles.into(), tensor.into(), scope) + } + fn build_instance_impl(&self, input_handles: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListPushBackBatch", |nd| { + nd.add_input(input_handles); + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListPushBackBatchInst{op}) + } +} +impl TensorListPushBackBatchInst { + /// Returns the 'output_handles' output of this 'TensorListPushBackBatch' operation. + pub fn output_handles(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListPushBackBatchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListPushBackBatch::new().build(input_handles, tensor, scope)`. -pub fn tensor_list_push_back_batch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_handles: O0, - tensor: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_push_back_batch, O1: ::std::convert::Into>(input_handles: O0, tensor: O1, scope: &mut crate::Scope) -> crate::Result { TensorListPushBackBatch::new().build(input_handles, tensor, scope) } + /// Builder for the `TensorListReserve` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListReserve { @@ -124839,6 +149919,12 @@ pub struct TensorListReserve { shape_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListReserve' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListReserveInst { + /// An instance of a fully built TensorListReserve Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListReserve { /// Creates a new `TensorListReserve`. @@ -124847,19 +149933,13 @@ impl TensorListReserve { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `shape_type` attribute. - pub fn shape_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_type>(mut self, value: ArgType) -> Self { self.shape_type = ::std::option::Option::Some(value.into()); self } @@ -124871,57 +149951,78 @@ impl TensorListReserve { } /// Builds the `TensorListReserve` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - element_shape: O0, - num_elements: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, element_shape: O0, num_elements: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(element_shape.into(), num_elements.into(), scope) } - - fn build_impl( - &self, - element_shape: crate::Output, - num_elements: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, element_shape: crate::Output, num_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListReserve", |nd| { nd.add_input(element_shape); nd.add_input(num_elements); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_type { - nd.set_attr_type("shape_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListReserve` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, element_shape: O0, num_elements: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(element_shape.into(), num_elements.into(), scope) + } + fn build_instance_impl(&self, element_shape: crate::Output, num_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListReserve", |nd| { + nd.add_input(element_shape); + nd.add_input(num_elements); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListReserveInst{op}) + } +} +impl TensorListReserveInst { + /// Returns the 'handle' output of this 'TensorListReserve' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListReserveInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListReserve::new().build(element_shape, num_elements, scope)`. -pub fn tensor_list_reserve< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - element_shape: O0, - num_elements: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_reserve, O1: ::std::convert::Into>(element_shape: O0, num_elements: O1, scope: &mut crate::Scope) -> crate::Result { TensorListReserve::new().build(element_shape, num_elements, scope) } + /// Builder for the `TensorListResize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListResize { control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListResize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListResizeInst { + /// An instance of a fully built TensorListResize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListResize { /// Creates a new `TensorListResize`. @@ -124936,24 +150037,10 @@ impl TensorListResize { } /// Builds the `TensorListResize` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_handle: O0, - size: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_handle: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), size.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListResize", |nd| { nd.add_input(input_handle); nd.add_input(size); @@ -124963,19 +150050,42 @@ impl TensorListResize { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListResize` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_handle: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), size.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListResize", |nd| { + nd.add_input(input_handle); + nd.add_input(size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListResizeInst{op}) + } +} +impl TensorListResizeInst { + /// Returns the 'output_handle' output of this 'TensorListResize' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListResizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListResize::new().build(input_handle, size, scope)`. -pub fn tensor_list_resize< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_handle: O0, - size: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_resize, O1: ::std::convert::Into>(input_handle: O0, size: O1, scope: &mut crate::Scope) -> crate::Result { TensorListResize::new().build(input_handle, size, scope) } + /// Builder for the `TensorListScatter` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListScatter { @@ -124983,6 +150093,12 @@ pub struct TensorListScatter { shape_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListScatter' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListScatterInst { + /// An instance of a fully built TensorListScatter Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListScatter { /// Creates a new `TensorListScatter`. @@ -124991,19 +150107,13 @@ impl TensorListScatter { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `shape_type` attribute. - pub fn shape_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_type>(mut self, value: ArgType) -> Self { self.shape_type = ::std::option::Option::Some(value.into()); self } @@ -125015,27 +150125,10 @@ impl TensorListScatter { } /// Builds the `TensorListScatter` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tensor: O0, - indices: O1, - element_shape: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, element_shape: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), indices.into(), element_shape.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - indices: crate::Output, - element_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, indices: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListScatter", |nd| { nd.add_input(tensor); nd.add_input(indices); @@ -125043,36 +150136,70 @@ impl TensorListScatter { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_type { - nd.set_attr_type("shape_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListScatter` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, element_shape: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), indices.into(), element_shape.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, indices: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListScatter", |nd| { + nd.add_input(tensor); + nd.add_input(indices); + nd.add_input(element_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListScatterInst{op}) + } +} +impl TensorListScatterInst { + /// Returns the 'output_handle' output of this 'TensorListScatter' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListScatterInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListScatter::new().build(tensor, indices, element_shape, scope)`. -pub fn tensor_list_scatter< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tensor: O0, - indices: O1, - element_shape: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_scatter, O1: ::std::convert::Into, O2: ::std::convert::Into>(tensor: O0, indices: O1, element_shape: O2, scope: &mut crate::Scope) -> crate::Result { TensorListScatter::new().build(tensor, indices, element_shape, scope) } + /// Builder for the `TensorListScatterIntoExistingList` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListScatterIntoExistingList { element_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListScatterIntoExistingList' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListScatterIntoExistingListInst { + /// An instance of a fully built TensorListScatterIntoExistingList Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListScatterIntoExistingList { /// Creates a new `TensorListScatterIntoExistingList`. @@ -125081,10 +150208,7 @@ impl TensorListScatterIntoExistingList { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } @@ -125096,27 +150220,10 @@ impl TensorListScatterIntoExistingList { } /// Builds the `TensorListScatterIntoExistingList` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_handle: O0, - tensor: O1, - indices: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, tensor: O1, indices: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), tensor.into(), indices.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - tensor: crate::Output, - indices: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, tensor: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListScatterIntoExistingList", |nd| { nd.add_input(input_handle); nd.add_input(tensor); @@ -125124,27 +150231,52 @@ impl TensorListScatterIntoExistingList { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListScatterIntoExistingList` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, tensor: O1, indices: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), tensor.into(), indices.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, tensor: crate::Output, indices: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListScatterIntoExistingList", |nd| { + nd.add_input(input_handle); + nd.add_input(tensor); + nd.add_input(indices); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListScatterIntoExistingListInst{op}) + } +} +impl TensorListScatterIntoExistingListInst { + /// Returns the 'output_handle' output of this 'TensorListScatterIntoExistingList' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListScatterIntoExistingListInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListScatterIntoExistingList::new().build(input_handle, tensor, indices, scope)`. -pub fn tensor_list_scatter_into_existing_list< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_handle: O0, - tensor: O1, - indices: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_scatter_into_existing_list, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_handle: O0, tensor: O1, indices: O2, scope: &mut crate::Scope) -> crate::Result { TensorListScatterIntoExistingList::new().build(input_handle, tensor, indices, scope) } + /// Builder for the `TensorListScatterV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListScatterV2 { @@ -125152,6 +150284,12 @@ pub struct TensorListScatterV2 { shape_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListScatterV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListScatterV2Inst { + /// An instance of a fully built TensorListScatterV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListScatterV2 { /// Creates a new `TensorListScatterV2`. @@ -125160,19 +150298,13 @@ impl TensorListScatterV2 { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `shape_type` attribute. - pub fn shape_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_type>(mut self, value: ArgType) -> Self { self.shape_type = ::std::option::Option::Some(value.into()); self } @@ -125184,36 +150316,10 @@ impl TensorListScatterV2 { } /// Builds the `TensorListScatterV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - tensor: O0, - indices: O1, - element_shape: O2, - num_elements: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tensor.into(), - indices.into(), - element_shape.into(), - num_elements.into(), - scope, - ) - } - - fn build_impl( - &self, - tensor: crate::Output, - indices: crate::Output, - element_shape: crate::Output, - num_elements: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, tensor: O0, indices: O1, element_shape: O2, num_elements: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tensor.into(), indices.into(), element_shape.into(), num_elements.into(), scope) + } + fn build_impl(&self, tensor: crate::Output, indices: crate::Output, element_shape: crate::Output, num_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListScatterV2", |nd| { nd.add_input(tensor); nd.add_input(indices); @@ -125222,38 +150328,71 @@ impl TensorListScatterV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_type { - nd.set_attr_type("shape_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListScatterV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, tensor: O0, indices: O1, element_shape: O2, num_elements: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), indices.into(), element_shape.into(), num_elements.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, indices: crate::Output, element_shape: crate::Output, num_elements: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListScatterV2", |nd| { + nd.add_input(tensor); + nd.add_input(indices); + nd.add_input(element_shape); + nd.add_input(num_elements); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListScatterV2Inst{op}) + } +} +impl TensorListScatterV2Inst { + /// Returns the 'output_handle' output of this 'TensorListScatterV2' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListScatterV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListScatterV2::new().build(tensor, indices, element_shape, num_elements, scope)`. -pub fn tensor_list_scatter_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - tensor: O0, - indices: O1, - element_shape: O2, - num_elements: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_scatter_v2, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(tensor: O0, indices: O1, element_shape: O2, num_elements: O3, scope: &mut crate::Scope) -> crate::Result { TensorListScatterV2::new().build(tensor, indices, element_shape, num_elements, scope) } + /// Builder for the `TensorListSetItem` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListSetItem { element_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListSetItem' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListSetItemInst { + /// An instance of a fully built TensorListSetItem Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListSetItem { /// Creates a new `TensorListSetItem`. @@ -125262,10 +150401,7 @@ impl TensorListSetItem { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } @@ -125277,27 +150413,10 @@ impl TensorListSetItem { } /// Builds the `TensorListSetItem` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_handle: O0, - index: O1, - item: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, index: O1, item: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), index.into(), item.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - index: crate::Output, - item: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, index: crate::Output, item: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListSetItem", |nd| { nd.add_input(input_handle); nd.add_input(index); @@ -125305,27 +150424,52 @@ impl TensorListSetItem { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListSetItem` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, index: O1, item: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), index.into(), item.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, index: crate::Output, item: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListSetItem", |nd| { + nd.add_input(input_handle); + nd.add_input(index); + nd.add_input(item); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListSetItemInst{op}) + } +} +impl TensorListSetItemInst { + /// Returns the 'output_handle' output of this 'TensorListSetItem' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListSetItemInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListSetItem::new().build(input_handle, index, item, scope)`. -pub fn tensor_list_set_item< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_handle: O0, - index: O1, - item: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_set_item, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_handle: O0, index: O1, item: O2, scope: &mut crate::Scope) -> crate::Result { TensorListSetItem::new().build(input_handle, index, item, scope) } + /// Builder for the `TensorListSplit` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListSplit { @@ -125333,6 +150477,12 @@ pub struct TensorListSplit { shape_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListSplit' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListSplitInst { + /// An instance of a fully built TensorListSplit Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListSplit { /// Creates a new `TensorListSplit`. @@ -125341,19 +150491,13 @@ impl TensorListSplit { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `shape_type` attribute. - pub fn shape_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_type>(mut self, value: ArgType) -> Self { self.shape_type = ::std::option::Option::Some(value.into()); self } @@ -125365,27 +150509,10 @@ impl TensorListSplit { } /// Builds the `TensorListSplit` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tensor: O0, - element_shape: O1, - lengths: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, element_shape: O1, lengths: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), element_shape.into(), lengths.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - element_shape: crate::Output, - lengths: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, element_shape: crate::Output, lengths: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListSplit", |nd| { nd.add_input(tensor); nd.add_input(element_shape); @@ -125393,30 +150520,58 @@ impl TensorListSplit { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_type { - nd.set_attr_type("shape_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListSplit` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, element_shape: O1, lengths: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), element_shape.into(), lengths.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, element_shape: crate::Output, lengths: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListSplit", |nd| { + nd.add_input(tensor); + nd.add_input(element_shape); + nd.add_input(lengths); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_type { + nd.set_attr_type("shape_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListSplitInst{op}) + } +} +impl TensorListSplitInst { + /// Returns the 'output_handle' output of this 'TensorListSplit' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListSplitInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListSplit::new().build(tensor, element_shape, lengths, scope)`. -pub fn tensor_list_split< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tensor: O0, - element_shape: O1, - lengths: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_split, O1: ::std::convert::Into, O2: ::std::convert::Into>(tensor: O0, element_shape: O1, lengths: O2, scope: &mut crate::Scope) -> crate::Result { TensorListSplit::new().build(tensor, element_shape, lengths, scope) } + /// Builder for the `TensorListStack` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorListStack { @@ -125424,6 +150579,12 @@ pub struct TensorListStack { num_elements: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorListStack' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorListStackInst { + /// An instance of a fully built TensorListStack Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorListStack { /// Creates a new `TensorListStack`. @@ -125432,10 +150593,7 @@ impl TensorListStack { } /// Sets the `element_dtype` attribute. - pub fn element_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn element_dtype>(mut self, value: ArgType) -> Self { self.element_dtype = ::std::option::Option::Some(value.into()); self } @@ -125453,52 +150611,67 @@ impl TensorListStack { } /// Builds the `TensorListStack` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_handle: O0, - element_shape: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_handle: O0, element_shape: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), element_shape.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - element_shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorListStack", |nd| { nd.add_input(input_handle); nd.add_input(element_shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.element_dtype { - nd.set_attr_type("element_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_elements { - nd.set_attr_int("num_elements", *value)?; - } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_elements { + nd.set_attr_int("num_elements", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorListStack` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_handle: O0, element_shape: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), element_shape.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, element_shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorListStack", |nd| { + nd.add_input(input_handle); + nd.add_input(element_shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.element_dtype { + nd.set_attr_type("element_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_elements { + nd.set_attr_int("num_elements", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorListStackInst{op}) + } +} +impl TensorListStackInst { + /// Returns the 'tensor' output of this 'TensorListStack' operation. + pub fn tensor(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorListStackInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorListStack::new().build(input_handle, element_shape, scope)`. -pub fn tensor_list_stack< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_handle: O0, - element_shape: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_list_stack, O1: ::std::convert::Into>(input_handle: O0, element_shape: O1, scope: &mut crate::Scope) -> crate::Result { TensorListStack::new().build(input_handle, element_shape, scope) } + /// Builder for the `TensorMapErase` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorMapErase { @@ -125506,6 +150679,12 @@ pub struct TensorMapErase { value_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorMapErase' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorMapEraseInst { + /// An instance of a fully built TensorMapErase Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorMapErase { /// Creates a new `TensorMapErase`. @@ -125514,19 +150693,13 @@ impl TensorMapErase { } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } @@ -125538,58 +150711,79 @@ impl TensorMapErase { } /// Builds the `TensorMapErase` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_handle: O0, - key: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_handle: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), key.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - key: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, key: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorMapErase", |nd| { nd.add_input(input_handle); nd.add_input(key); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorMapErase` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_handle: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), key.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorMapErase", |nd| { + nd.add_input(input_handle); + nd.add_input(key); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorMapEraseInst{op}) + } +} +impl TensorMapEraseInst { + /// Returns the 'output_handle' output of this 'TensorMapErase' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorMapEraseInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorMapErase::new().build(input_handle, key, scope)`. -pub fn tensor_map_erase< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_handle: O0, - key: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_map_erase, O1: ::std::convert::Into>(input_handle: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { TensorMapErase::new().build(input_handle, key, scope) } + /// Builder for the `TensorMapHasKey` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorMapHasKey { key_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorMapHasKey' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorMapHasKeyInst { + /// An instance of a fully built TensorMapHasKey Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorMapHasKey { /// Creates a new `TensorMapHasKey`. @@ -125598,10 +150792,7 @@ impl TensorMapHasKey { } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } @@ -125613,49 +150804,61 @@ impl TensorMapHasKey { } /// Builds the `TensorMapHasKey` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_handle: O0, - key: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_handle: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), key.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - key: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, key: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorMapHasKey", |nd| { nd.add_input(input_handle); nd.add_input(key); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorMapHasKey` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_handle: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), key.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorMapHasKey", |nd| { + nd.add_input(input_handle); + nd.add_input(key); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorMapHasKeyInst{op}) + } +} +impl TensorMapHasKeyInst { + /// Returns the 'has_key' output of this 'TensorMapHasKey' operation. + pub fn has_key(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorMapHasKeyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorMapHasKey::new().build(input_handle, key, scope)`. -pub fn tensor_map_has_key< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_handle: O0, - key: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_map_has_key, O1: ::std::convert::Into>(input_handle: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { TensorMapHasKey::new().build(input_handle, key, scope) } + /// Builder for the `TensorMapInsert` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorMapInsert { @@ -125663,6 +150866,12 @@ pub struct TensorMapInsert { value_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorMapInsert' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorMapInsertInst { + /// An instance of a fully built TensorMapInsert Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorMapInsert { /// Creates a new `TensorMapInsert`. @@ -125671,19 +150880,13 @@ impl TensorMapInsert { } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } @@ -125695,27 +150898,10 @@ impl TensorMapInsert { } /// Builds the `TensorMapInsert` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - input_handle: O0, - key: O1, - value: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, key: O1, value: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), key.into(), value.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - key: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, key: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorMapInsert", |nd| { nd.add_input(input_handle); nd.add_input(key); @@ -125723,30 +150909,58 @@ impl TensorMapInsert { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorMapInsert` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, input_handle: O0, key: O1, value: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), key.into(), value.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, key: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorMapInsert", |nd| { + nd.add_input(input_handle); + nd.add_input(key); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorMapInsertInst{op}) + } +} +impl TensorMapInsertInst { + /// Returns the 'output_handle' output of this 'TensorMapInsert' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorMapInsertInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorMapInsert::new().build(input_handle, key, value, scope)`. -pub fn tensor_map_insert< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - input_handle: O0, - key: O1, - value: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_map_insert, O1: ::std::convert::Into, O2: ::std::convert::Into>(input_handle: O0, key: O1, value: O2, scope: &mut crate::Scope) -> crate::Result { TensorMapInsert::new().build(input_handle, key, value, scope) } + /// Builder for the `TensorMapLookup` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorMapLookup { @@ -125754,6 +150968,12 @@ pub struct TensorMapLookup { value_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorMapLookup' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorMapLookupInst { + /// An instance of a fully built TensorMapLookup Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorMapLookup { /// Creates a new `TensorMapLookup`. @@ -125762,19 +150982,13 @@ impl TensorMapLookup { } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } /// Sets the `value_dtype` attribute. - pub fn value_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn value_dtype>(mut self, value: ArgType) -> Self { self.value_dtype = ::std::option::Option::Some(value.into()); self } @@ -125786,57 +151000,78 @@ impl TensorMapLookup { } /// Builds the `TensorMapLookup` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_handle: O0, - key: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_handle: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), key.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - key: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, key: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorMapLookup", |nd| { nd.add_input(input_handle); nd.add_input(key); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.value_dtype { - nd.set_attr_type("value_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorMapLookup` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_handle: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), key.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, key: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorMapLookup", |nd| { + nd.add_input(input_handle); + nd.add_input(key); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.value_dtype { + nd.set_attr_type("value_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorMapLookupInst{op}) + } +} +impl TensorMapLookupInst { + /// Returns the 'value' output of this 'TensorMapLookup' operation. + pub fn value(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorMapLookupInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorMapLookup::new().build(input_handle, key, scope)`. -pub fn tensor_map_lookup< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_handle: O0, - key: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_map_lookup, O1: ::std::convert::Into>(input_handle: O0, key: O1, scope: &mut crate::Scope) -> crate::Result { TensorMapLookup::new().build(input_handle, key, scope) } + /// Builder for the `TensorMapSize` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorMapSize { control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorMapSize' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorMapSizeInst { + /// An instance of a fully built TensorMapSize Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorMapSize { /// Creates a new `TensorMapSize`. @@ -125851,19 +151086,10 @@ impl TensorMapSize { } /// Builds the `TensorMapSize` operation. - pub fn build>( - &self, - input_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorMapSize", |nd| { nd.add_input(input_handle); for op in &self.control_inputs { @@ -125872,21 +151098,53 @@ impl TensorMapSize { ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorMapSize` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorMapSize", |nd| { + nd.add_input(input_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorMapSizeInst{op}) + } +} +impl TensorMapSizeInst { + /// Returns the 'size' output of this 'TensorMapSize' operation. + pub fn size(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorMapSizeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorMapSize::new().build(input_handle, scope)`. -pub fn tensor_map_size>( - input_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_map_size>(input_handle: O0, scope: &mut crate::Scope) -> crate::Result { TensorMapSize::new().build(input_handle, scope) } + /// Builder for the `TensorMapStackKeys` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorMapStackKeys { key_dtype: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorMapStackKeys' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorMapStackKeysInst { + /// An instance of a fully built TensorMapStackKeys Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorMapStackKeys { /// Creates a new `TensorMapStackKeys`. @@ -125895,10 +151153,7 @@ impl TensorMapStackKeys { } /// Sets the `key_dtype` attribute. - pub fn key_dtype>( - mut self, - value: ArgType, - ) -> Self { + pub fn key_dtype>(mut self, value: ArgType) -> Self { self.key_dtype = ::std::option::Option::Some(value.into()); self } @@ -125910,39 +151165,59 @@ impl TensorMapStackKeys { } /// Builds the `TensorMapStackKeys` operation. - pub fn build>( - &self, - input_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorMapStackKeys", |nd| { nd.add_input(input_handle); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.key_dtype { - nd.set_attr_type("key_dtype", *value)?; - } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorMapStackKeys` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorMapStackKeys", |nd| { + nd.add_input(input_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.key_dtype { + nd.set_attr_type("key_dtype", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorMapStackKeysInst{op}) + } +} +impl TensorMapStackKeysInst { + /// Returns the 'keys' output of this 'TensorMapStackKeys' operation. + pub fn keys(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorMapStackKeysInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorMapStackKeys::new().build(input_handle, scope)`. -pub fn tensor_map_stack_keys>( - input_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_map_stack_keys>(input_handle: O0, scope: &mut crate::Scope) -> crate::Result { TensorMapStackKeys::new().build(input_handle, scope) } + /// Builder for the `TensorScatterAdd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorScatterAdd { @@ -125950,6 +151225,12 @@ pub struct TensorScatterAdd { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorScatterAdd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorScatterAddInst { + /// An instance of a fully built TensorScatterAdd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorScatterAdd { /// Creates a new `TensorScatterAdd`. @@ -125964,10 +151245,7 @@ impl TensorScatterAdd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -125979,27 +151257,10 @@ impl TensorScatterAdd { } /// Builds the `TensorScatterAdd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tensor: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorScatterAdd", |nd| { nd.add_input(tensor); nd.add_input(indices); @@ -126007,30 +151268,58 @@ impl TensorScatterAdd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorScatterAdd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorScatterAdd", |nd| { + nd.add_input(tensor); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorScatterAddInst{op}) + } +} +impl TensorScatterAddInst { + /// Returns the 'output' output of this 'TensorScatterAdd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorScatterAddInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorScatterAdd::new().build(tensor, indices, updates, scope)`. -pub fn tensor_scatter_add< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tensor: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_scatter_add, O1: ::std::convert::Into, O2: ::std::convert::Into>(tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { TensorScatterAdd::new().build(tensor, indices, updates, scope) } + /// Builder for the `TensorScatterMax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorScatterMax { @@ -126038,6 +151327,12 @@ pub struct TensorScatterMax { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorScatterMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorScatterMaxInst { + /// An instance of a fully built TensorScatterMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorScatterMax { /// Creates a new `TensorScatterMax`. @@ -126052,10 +151347,7 @@ impl TensorScatterMax { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -126067,27 +151359,10 @@ impl TensorScatterMax { } /// Builds the `TensorScatterMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tensor: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorScatterMax", |nd| { nd.add_input(tensor); nd.add_input(indices); @@ -126095,30 +151370,58 @@ impl TensorScatterMax { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorScatterMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorScatterMax", |nd| { + nd.add_input(tensor); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorScatterMaxInst{op}) + } +} +impl TensorScatterMaxInst { + /// Returns the 'output' output of this 'TensorScatterMax' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorScatterMaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorScatterMax::new().build(tensor, indices, updates, scope)`. -pub fn tensor_scatter_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tensor: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_scatter_max, O1: ::std::convert::Into, O2: ::std::convert::Into>(tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { TensorScatterMax::new().build(tensor, indices, updates, scope) } + /// Builder for the `TensorScatterMin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorScatterMin { @@ -126126,6 +151429,12 @@ pub struct TensorScatterMin { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorScatterMin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorScatterMinInst { + /// An instance of a fully built TensorScatterMin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorScatterMin { /// Creates a new `TensorScatterMin`. @@ -126140,10 +151449,7 @@ impl TensorScatterMin { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -126155,27 +151461,10 @@ impl TensorScatterMin { } /// Builds the `TensorScatterMin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tensor: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorScatterMin", |nd| { nd.add_input(tensor); nd.add_input(indices); @@ -126183,30 +151472,58 @@ impl TensorScatterMin { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorScatterMin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorScatterMin", |nd| { + nd.add_input(tensor); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorScatterMinInst{op}) + } +} +impl TensorScatterMinInst { + /// Returns the 'output' output of this 'TensorScatterMin' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorScatterMinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorScatterMin::new().build(tensor, indices, updates, scope)`. -pub fn tensor_scatter_min< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tensor: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_scatter_min, O1: ::std::convert::Into, O2: ::std::convert::Into>(tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { TensorScatterMin::new().build(tensor, indices, updates, scope) } + /// Builder for the `TensorScatterSub` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorScatterSub { @@ -126214,6 +151531,12 @@ pub struct TensorScatterSub { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorScatterSub' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorScatterSubInst { + /// An instance of a fully built TensorScatterSub Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorScatterSub { /// Creates a new `TensorScatterSub`. @@ -126228,10 +151551,7 @@ impl TensorScatterSub { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -126243,27 +151563,10 @@ impl TensorScatterSub { } /// Builds the `TensorScatterSub` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tensor: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorScatterSub", |nd| { nd.add_input(tensor); nd.add_input(indices); @@ -126271,30 +151574,58 @@ impl TensorScatterSub { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorScatterSub` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorScatterSub", |nd| { + nd.add_input(tensor); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorScatterSubInst{op}) + } +} +impl TensorScatterSubInst { + /// Returns the 'output' output of this 'TensorScatterSub' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorScatterSubInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorScatterSub::new().build(tensor, indices, updates, scope)`. -pub fn tensor_scatter_sub< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tensor: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_scatter_sub, O1: ::std::convert::Into, O2: ::std::convert::Into>(tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { TensorScatterSub::new().build(tensor, indices, updates, scope) } + /// Builder for the `TensorScatterUpdate` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorScatterUpdate { @@ -126302,6 +151633,12 @@ pub struct TensorScatterUpdate { Tindices: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorScatterUpdate' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorScatterUpdateInst { + /// An instance of a fully built TensorScatterUpdate Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorScatterUpdate { /// Creates a new `TensorScatterUpdate`. @@ -126316,10 +151653,7 @@ impl TensorScatterUpdate { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } @@ -126331,27 +151665,10 @@ impl TensorScatterUpdate { } /// Builds the `TensorScatterUpdate` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tensor: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), indices.into(), updates.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - indices: crate::Output, - updates: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorScatterUpdate", |nd| { nd.add_input(tensor); nd.add_input(indices); @@ -126359,30 +151676,58 @@ impl TensorScatterUpdate { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorScatterUpdate` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), indices.into(), updates.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, indices: crate::Output, updates: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorScatterUpdate", |nd| { + nd.add_input(tensor); + nd.add_input(indices); + nd.add_input(updates); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorScatterUpdateInst{op}) + } +} +impl TensorScatterUpdateInst { + /// Returns the 'output' output of this 'TensorScatterUpdate' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorScatterUpdateInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorScatterUpdate::new().build(tensor, indices, updates, scope)`. -pub fn tensor_scatter_update< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tensor: O0, - indices: O1, - updates: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_scatter_update, O1: ::std::convert::Into, O2: ::std::convert::Into>(tensor: O0, indices: O1, updates: O2, scope: &mut crate::Scope) -> crate::Result { TensorScatterUpdate::new().build(tensor, indices, updates, scope) } + /// Builder for the `TensorSliceDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorSliceDataset { @@ -126392,6 +151737,12 @@ pub struct TensorSliceDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorSliceDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorSliceDatasetInst { + /// An instance of a fully built TensorSliceDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorSliceDataset { /// Creates a new `TensorSliceDataset`. @@ -126400,19 +151751,13 @@ impl TensorSliceDataset { } /// Sets the `Toutput_types` attribute. - pub fn Toutput_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput_types>>(mut self, value: ArgType) -> Self { self.Toutput_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -126424,10 +151769,7 @@ impl TensorSliceDataset { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -126439,48 +151781,77 @@ impl TensorSliceDataset { } /// Builds the `TensorSliceDataset` operation. - pub fn build>( - &self, - components: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, components: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(components.into(), scope) } - - fn build_impl( - &self, - components: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorSliceDataset", |nd| { nd.add_input(components); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Toutput_types { - nd.set_attr_type_list("Toutput_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.is_files { - nd.set_attr_bool("is_files", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.Toutput_types { + nd.set_attr_type_list("Toutput_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_files { + nd.set_attr_bool("is_files", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorSliceDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, components: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(components.into(), scope) + } + fn build_instance_impl(&self, components: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorSliceDataset", |nd| { + nd.add_input(components); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Toutput_types { + nd.set_attr_type_list("Toutput_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.is_files { + nd.set_attr_bool("is_files", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorSliceDatasetInst{op}) + } +} +impl TensorSliceDatasetInst { + /// Returns the 'handle' output of this 'TensorSliceDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorSliceDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorSliceDataset::new().build(components, scope)`. -pub fn tensor_slice_dataset>( - components: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_slice_dataset>(components: O0, scope: &mut crate::Scope) -> crate::Result { TensorSliceDataset::new().build(components, scope) } + /// Builder for the `TensorStridedSliceUpdate` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorStridedSliceUpdate { @@ -126493,6 +151864,12 @@ pub struct TensorStridedSliceUpdate { shrink_axis_mask: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorStridedSliceUpdate' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorStridedSliceUpdateInst { + /// An instance of a fully built TensorStridedSliceUpdate Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorStridedSliceUpdate { /// Creates a new `TensorStridedSliceUpdate`. @@ -126549,40 +151926,10 @@ impl TensorStridedSliceUpdate { } /// Builds the `TensorStridedSliceUpdate` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input: O0, - begin: O1, - end: O2, - strides: O3, - value: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input.into(), - begin.into(), - end.into(), - strides.into(), - value.into(), - scope, - ) - } - - fn build_impl( - &self, - input: crate::Output, - begin: crate::Output, - end: crate::Output, - strides: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, begin: O1, end: O2, strides: O3, value: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input.into(), begin.into(), end.into(), strides.into(), value.into(), scope) + } + fn build_impl(&self, input: crate::Output, begin: crate::Output, end: crate::Output, strides: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorStridedSliceUpdate", |nd| { nd.add_input(input); nd.add_input(begin); @@ -126592,49 +151939,90 @@ impl TensorStridedSliceUpdate { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Index { - nd.set_attr_type("Index", *value)?; - } - if let ::std::option::Option::Some(value) = &self.begin_mask { - nd.set_attr_int("begin_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.end_mask { - nd.set_attr_int("end_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.ellipsis_mask { - nd.set_attr_int("ellipsis_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.new_axis_mask { - nd.set_attr_int("new_axis_mask", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { - nd.set_attr_int("shrink_axis_mask", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.begin_mask { + nd.set_attr_int("begin_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.end_mask { + nd.set_attr_int("end_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ellipsis_mask { + nd.set_attr_int("ellipsis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.new_axis_mask { + nd.set_attr_int("new_axis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { + nd.set_attr_int("shrink_axis_mask", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorStridedSliceUpdate` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input: O0, begin: O1, end: O2, strides: O3, value: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), begin.into(), end.into(), strides.into(), value.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, begin: crate::Output, end: crate::Output, strides: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorStridedSliceUpdate", |nd| { + nd.add_input(input); + nd.add_input(begin); + nd.add_input(end); + nd.add_input(strides); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Index { + nd.set_attr_type("Index", *value)?; + } + if let ::std::option::Option::Some(value) = &self.begin_mask { + nd.set_attr_int("begin_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.end_mask { + nd.set_attr_int("end_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.ellipsis_mask { + nd.set_attr_int("ellipsis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.new_axis_mask { + nd.set_attr_int("new_axis_mask", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shrink_axis_mask { + nd.set_attr_int("shrink_axis_mask", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorStridedSliceUpdateInst{op}) + } +} +impl TensorStridedSliceUpdateInst { + /// Returns the 'output' output of this 'TensorStridedSliceUpdate' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorStridedSliceUpdateInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorStridedSliceUpdate::new().build(input, begin, end, strides, value, scope)`. -pub fn tensor_strided_slice_update< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input: O0, - begin: O1, - end: O2, - strides: O3, - value: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_strided_slice_update, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input: O0, begin: O1, end: O2, strides: O3, value: O4, scope: &mut crate::Scope) -> crate::Result { TensorStridedSliceUpdate::new().build(input, begin, end, strides, value, scope) } + /// Builder for the `TensorSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorSummary { @@ -126644,6 +152032,12 @@ pub struct TensorSummary { display_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorSummaryInst { + /// An instance of a fully built TensorSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorSummary { /// Creates a new `TensorSummary`. @@ -126658,28 +152052,19 @@ impl TensorSummary { } /// Sets the `description` attribute. - pub fn description>( - mut self, - value: ArgType, - ) -> Self { + pub fn description>(mut self, value: ArgType) -> Self { self.description = ::std::option::Option::Some(value.into()); self } /// Sets the `labels` attribute. - pub fn labels>>( - mut self, - value: ArgType, - ) -> Self { + pub fn labels>>(mut self, value: ArgType) -> Self { self.labels = ::std::option::Option::Some(value.into()); self } /// Sets the `display_name` attribute. - pub fn display_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn display_name>(mut self, value: ArgType) -> Self { self.display_name = ::std::option::Option::Some(value.into()); self } @@ -126691,54 +152076,89 @@ impl TensorSummary { } /// Builds the `TensorSummary` operation. - pub fn build>( - &self, - tensor: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, tensor: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(tensor.into(), scope) } - - fn build_impl( - &self, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorSummary", |nd| { nd.add_input(tensor); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.description { - nd.set_attr_string("description", value)?; - } - if let ::std::option::Option::Some(value) = &self.labels { - nd.set_attr_string_list("labels", value)?; - } - if let ::std::option::Option::Some(value) = &self.display_name { - nd.set_attr_string("display_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.description { + nd.set_attr_string("description", value)?; + } + if let ::std::option::Option::Some(value) = &self.labels { + nd.set_attr_string_list("labels", value)?; + } + if let ::std::option::Option::Some(value) = &self.display_name { + nd.set_attr_string("display_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, tensor: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tensor.into(), scope) + } + fn build_instance_impl(&self, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorSummary", |nd| { + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.description { + nd.set_attr_string("description", value)?; + } + if let ::std::option::Option::Some(value) = &self.labels { + nd.set_attr_string_list("labels", value)?; + } + if let ::std::option::Option::Some(value) = &self.display_name { + nd.set_attr_string("display_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorSummaryInst{op}) + } +} +impl TensorSummaryInst { + /// Returns the 'summary' output of this 'TensorSummary' operation. + pub fn summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorSummary::new().build(tensor, scope)`. -pub fn tensor_summary>( - tensor: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_summary>(tensor: O0, scope: &mut crate::Scope) -> crate::Result { TensorSummary::new().build(tensor, scope) } + /// Builder for the `TensorSummaryV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TensorSummaryV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TensorSummaryV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TensorSummaryV2Inst { + /// An instance of a fully built TensorSummaryV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TensorSummaryV2 { /// Creates a new `TensorSummaryV2`. @@ -126759,32 +152179,10 @@ impl TensorSummaryV2 { } /// Builds the `TensorSummaryV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - tag: O0, - tensor: O1, - serialized_summary_metadata: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - tag.into(), - tensor.into(), - serialized_summary_metadata.into(), - scope, - ) - } - - fn build_impl( - &self, - tag: crate::Output, - tensor: crate::Output, - serialized_summary_metadata: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tag: O0, tensor: O1, serialized_summary_metadata: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(tag.into(), tensor.into(), serialized_summary_metadata.into(), scope) + } + fn build_impl(&self, tag: crate::Output, tensor: crate::Output, serialized_summary_metadata: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TensorSummaryV2", |nd| { nd.add_input(tag); nd.add_input(tensor); @@ -126792,33 +152190,64 @@ impl TensorSummaryV2 { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TensorSummaryV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, tag: O0, tensor: O1, serialized_summary_metadata: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(tag.into(), tensor.into(), serialized_summary_metadata.into(), scope) + } + fn build_instance_impl(&self, tag: crate::Output, tensor: crate::Output, serialized_summary_metadata: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TensorSummaryV2", |nd| { + nd.add_input(tag); + nd.add_input(tensor); + nd.add_input(serialized_summary_metadata); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TensorSummaryV2Inst{op}) + } +} +impl TensorSummaryV2Inst { + /// Returns the 'summary' output of this 'TensorSummaryV2' operation. + pub fn summary(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TensorSummaryV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TensorSummaryV2::new().build(tag, tensor, serialized_summary_metadata, scope)`. -pub fn tensor_summary_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - tag: O0, - tensor: O1, - serialized_summary_metadata: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tensor_summary_v2, O1: ::std::convert::Into, O2: ::std::convert::Into>(tag: O0, tensor: O1, serialized_summary_metadata: O2, scope: &mut crate::Scope) -> crate::Result { TensorSummaryV2::new().build(tag, tensor, serialized_summary_metadata, scope) } + /// Builder for the `TextLineDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TextLineDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TextLineDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TextLineDatasetInst { + /// An instance of a fully built TextLineDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TextLineDataset { /// Creates a new `TextLineDataset`. @@ -126827,10 +152256,7 @@ impl TextLineDataset { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -126842,32 +152268,10 @@ impl TextLineDataset { } /// Builds the `TextLineDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - filenames: O0, - compression_type: O1, - buffer_size: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - filenames.into(), - compression_type.into(), - buffer_size.into(), - scope, - ) - } - - fn build_impl( - &self, - filenames: crate::Output, - compression_type: crate::Output, - buffer_size: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, filenames: O0, compression_type: O1, buffer_size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(filenames.into(), compression_type.into(), buffer_size.into(), scope) + } + fn build_impl(&self, filenames: crate::Output, compression_type: crate::Output, buffer_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TextLineDataset", |nd| { nd.add_input(filenames); nd.add_input(compression_type); @@ -126875,27 +152279,52 @@ impl TextLineDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TextLineDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, filenames: O0, compression_type: O1, buffer_size: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filenames.into(), compression_type.into(), buffer_size.into(), scope) + } + fn build_instance_impl(&self, filenames: crate::Output, compression_type: crate::Output, buffer_size: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TextLineDataset", |nd| { + nd.add_input(filenames); + nd.add_input(compression_type); + nd.add_input(buffer_size); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TextLineDatasetInst{op}) + } +} +impl TextLineDatasetInst { + /// Returns the 'handle' output of this 'TextLineDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TextLineDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TextLineDataset::new().build(filenames, compression_type, buffer_size, scope)`. -pub fn text_line_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - filenames: O0, - compression_type: O1, - buffer_size: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn text_line_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into>(filenames: O0, compression_type: O1, buffer_size: O2, scope: &mut crate::Scope) -> crate::Result { TextLineDataset::new().build(filenames, compression_type, buffer_size, scope) } + /// Builder for the `TextLineReader` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TextLineReader { @@ -126904,6 +152333,12 @@ pub struct TextLineReader { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TextLineReader' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TextLineReaderInst { + /// An instance of a fully built TextLineReader Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TextLineReader { /// Creates a new `TextLineReader`. @@ -126918,19 +152353,13 @@ impl TextLineReader { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -126942,33 +152371,69 @@ impl TextLineReader { } /// Builds the `TextLineReader` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TextLineReader", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.skip_header_lines { - nd.set_attr_int("skip_header_lines", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.skip_header_lines { + nd.set_attr_int("skip_header_lines", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TextLineReader` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TextLineReader", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.skip_header_lines { + nd.set_attr_int("skip_header_lines", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TextLineReaderInst{op}) + } +} +impl TextLineReaderInst { + /// Returns the 'reader_handle' output of this 'TextLineReader' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TextLineReaderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TextLineReader::new().build(scope)`. -pub fn text_line_reader(scope: &mut crate::Scope) -> crate::Result { +pub fn text_line_reader<>(scope: &mut crate::Scope) -> crate::Result { TextLineReader::new().build(scope) } + /// Builder for the `TextLineReaderV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TextLineReaderV2 { @@ -126977,6 +152442,12 @@ pub struct TextLineReaderV2 { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'TextLineReaderV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TextLineReaderV2Inst { + /// An instance of a fully built TextLineReaderV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TextLineReaderV2 { /// Creates a new `TextLineReaderV2`. @@ -126991,19 +152462,13 @@ impl TextLineReaderV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -127015,33 +152480,69 @@ impl TextLineReaderV2 { } /// Builds the `TextLineReaderV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TextLineReaderV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.skip_header_lines { - nd.set_attr_int("skip_header_lines", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.skip_header_lines { + nd.set_attr_int("skip_header_lines", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TextLineReaderV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TextLineReaderV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.skip_header_lines { + nd.set_attr_int("skip_header_lines", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TextLineReaderV2Inst{op}) + } +} +impl TextLineReaderV2Inst { + /// Returns the 'reader_handle' output of this 'TextLineReaderV2' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TextLineReaderV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TextLineReaderV2::new().build(scope)`. -pub fn text_line_reader_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn text_line_reader_v2<>(scope: &mut crate::Scope) -> crate::Result { TextLineReaderV2::new().build(scope) } + /// Builder for the `ThreadPoolDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ThreadPoolDataset { @@ -127049,6 +152550,12 @@ pub struct ThreadPoolDataset { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ThreadPoolDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ThreadPoolDatasetInst { + /// An instance of a fully built ThreadPoolDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ThreadPoolDataset { /// Creates a new `ThreadPoolDataset`. @@ -127057,19 +152564,13 @@ impl ThreadPoolDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -127081,52 +152582,67 @@ impl ThreadPoolDataset { } /// Builds the `ThreadPoolDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_dataset: O0, - thread_pool: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_dataset: O0, thread_pool: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), thread_pool.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - thread_pool: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, thread_pool: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ThreadPoolDataset", |nd| { nd.add_input(input_dataset); nd.add_input(thread_pool); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ThreadPoolDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_dataset: O0, thread_pool: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), thread_pool.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, thread_pool: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ThreadPoolDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(thread_pool); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ThreadPoolDatasetInst{op}) + } +} +impl ThreadPoolDatasetInst { + /// Returns the 'handle' output of this 'ThreadPoolDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ThreadPoolDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ThreadPoolDataset::new().build(input_dataset, thread_pool, scope)`. -pub fn thread_pool_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_dataset: O0, - thread_pool: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn thread_pool_dataset, O1: ::std::convert::Into>(input_dataset: O0, thread_pool: O1, scope: &mut crate::Scope) -> crate::Result { ThreadPoolDataset::new().build(input_dataset, thread_pool, scope) } + /// Builder for the `ThreadPoolHandle` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ThreadPoolHandle { @@ -127137,6 +152653,12 @@ pub struct ThreadPoolHandle { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ThreadPoolHandle' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ThreadPoolHandleInst { + /// An instance of a fully built ThreadPoolHandle Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ThreadPoolHandle { /// Creates a new `ThreadPoolHandle`. @@ -127151,37 +152673,25 @@ impl ThreadPoolHandle { } /// Sets the `max_intra_op_parallelism` attribute. - pub fn max_intra_op_parallelism>( - mut self, - value: ArgType, - ) -> Self { + pub fn max_intra_op_parallelism>(mut self, value: ArgType) -> Self { self.max_intra_op_parallelism = ::std::option::Option::Some(value.into()); self } /// Sets the `display_name` attribute. - pub fn display_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn display_name>(mut self, value: ArgType) -> Self { self.display_name = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -127193,39 +152703,81 @@ impl ThreadPoolHandle { } /// Builds the `ThreadPoolHandle` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ThreadPoolHandle", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_threads { - nd.set_attr_int("num_threads", *value)?; - } - if let ::std::option::Option::Some(value) = &self.max_intra_op_parallelism { - nd.set_attr_int("max_intra_op_parallelism", *value)?; - } - if let ::std::option::Option::Some(value) = &self.display_name { - nd.set_attr_string("display_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.num_threads { + nd.set_attr_int("num_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_intra_op_parallelism { + nd.set_attr_int("max_intra_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.display_name { + nd.set_attr_string("display_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ThreadPoolHandle` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ThreadPoolHandle", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_threads { + nd.set_attr_int("num_threads", *value)?; + } + if let ::std::option::Option::Some(value) = &self.max_intra_op_parallelism { + nd.set_attr_int("max_intra_op_parallelism", *value)?; + } + if let ::std::option::Option::Some(value) = &self.display_name { + nd.set_attr_string("display_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ThreadPoolHandleInst{op}) + } +} +impl ThreadPoolHandleInst { + /// Returns the 'handle' output of this 'ThreadPoolHandle' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ThreadPoolHandleInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ThreadPoolHandle::new().build(scope)`. -pub fn thread_pool_handle(scope: &mut crate::Scope) -> crate::Result { +pub fn thread_pool_handle<>(scope: &mut crate::Scope) -> crate::Result { ThreadPoolHandle::new().build(scope) } + /// Builder for the `ThreadUnsafeUnigramCandidateSampler` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ThreadUnsafeUnigramCandidateSampler { @@ -127237,6 +152789,12 @@ pub struct ThreadUnsafeUnigramCandidateSampler { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ThreadUnsafeUnigramCandidateSampler' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ThreadUnsafeUnigramCandidateSamplerInst { + /// An instance of a fully built ThreadUnsafeUnigramCandidateSampler Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ThreadUnsafeUnigramCandidateSampler { /// Creates a new `ThreadUnsafeUnigramCandidateSampler`. @@ -127287,54 +152845,103 @@ impl ThreadUnsafeUnigramCandidateSampler { } /// Builds the `ThreadUnsafeUnigramCandidateSampler` operation. - pub fn build>( - &self, - true_classes: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(true_classes.into(), scope) } - - fn build_impl( - &self, - true_classes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ThreadUnsafeUnigramCandidateSampler", |nd| { nd.add_input(true_classes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_true { - nd.set_attr_int("num_true", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sampled { - nd.set_attr_int("num_sampled", *value)?; - } - if let ::std::option::Option::Some(value) = &self.unique { - nd.set_attr_bool("unique", *value)?; - } - if let ::std::option::Option::Some(value) = &self.range_max { - nd.set_attr_int("range_max", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_max { + nd.set_attr_int("range_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ThreadUnsafeUnigramCandidateSampler` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(true_classes.into(), scope) + } + fn build_instance_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ThreadUnsafeUnigramCandidateSampler", |nd| { + nd.add_input(true_classes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_max { + nd.set_attr_int("range_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ThreadUnsafeUnigramCandidateSamplerInst{op}) + } +} +impl ThreadUnsafeUnigramCandidateSamplerInst { + /// Returns the 'sampled_candidates' output of this 'ThreadUnsafeUnigramCandidateSampler' operation. + pub fn sampled_candidates(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'true_expected_count' output of this 'ThreadUnsafeUnigramCandidateSampler' operation. + pub fn true_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sampled_expected_count' output of this 'ThreadUnsafeUnigramCandidateSampler' operation. + pub fn sampled_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for ThreadUnsafeUnigramCandidateSamplerInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ThreadUnsafeUnigramCandidateSampler::new().build(true_classes, scope)`. -pub fn thread_unsafe_unigram_candidate_sampler>( - true_classes: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn thread_unsafe_unigram_candidate_sampler>(true_classes: O0, scope: &mut crate::Scope) -> crate::Result { ThreadUnsafeUnigramCandidateSampler::new().build(true_classes, scope) } + /// Builder for the `Tile` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Tile { @@ -127342,6 +152949,12 @@ pub struct Tile { Tmultiples: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Tile' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TileInst { + /// An instance of a fully built Tile Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Tile { /// Creates a new `Tile`. @@ -127356,10 +152969,7 @@ impl Tile { } /// Sets the `Tmultiples` attribute. - pub fn Tmultiples>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tmultiples>(mut self, value: ArgType) -> Self { self.Tmultiples = ::std::option::Option::Some(value.into()); self } @@ -127371,55 +152981,79 @@ impl Tile { } /// Builds the `Tile` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - multiples: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, multiples: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), multiples.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - multiples: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, multiples: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Tile", |nd| { nd.add_input(input); nd.add_input(multiples); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tmultiples { - nd.set_attr_type("Tmultiples", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tmultiples { + nd.set_attr_type("Tmultiples", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Tile` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, multiples: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), multiples.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, multiples: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Tile", |nd| { + nd.add_input(input); + nd.add_input(multiples); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tmultiples { + nd.set_attr_type("Tmultiples", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TileInst{op}) + } +} +impl TileInst { + /// Returns the 'output' output of this 'Tile' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TileInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Tile::new().build(input, multiples, scope)`. -pub fn tile, O1: ::std::convert::Into>( - input: O0, - multiples: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tile, O1: ::std::convert::Into>(input: O0, multiples: O1, scope: &mut crate::Scope) -> crate::Result { Tile::new().build(input, multiples, scope) } + /// Builder for the `TileGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TileGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TileGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TileGradInst { + /// An instance of a fully built TileGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TileGrad { /// Creates a new `TileGrad`. @@ -127440,54 +153074,72 @@ impl TileGrad { } /// Builds the `TileGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - multiples: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, multiples: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), multiples.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - multiples: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, multiples: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TileGrad", |nd| { nd.add_input(input); nd.add_input(multiples); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TileGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, multiples: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), multiples.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, multiples: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TileGrad", |nd| { + nd.add_input(input); + nd.add_input(multiples); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TileGradInst{op}) + } +} +impl TileGradInst { + /// Returns the 'output' output of this 'TileGrad' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TileGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TileGrad::new().build(input, multiples, scope)`. -pub fn tile_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input: O0, - multiples: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tile_grad, O1: ::std::convert::Into>(input: O0, multiples: O1, scope: &mut crate::Scope) -> crate::Result { TileGrad::new().build(input, multiples, scope) } + /// Builder for the `Timestamp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Timestamp { control_inputs: ::std::vec::Vec, } +/// An instance of 'Timestamp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TimestampInst { + /// An instance of a fully built Timestamp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Timestamp { /// Creates a new `Timestamp`. @@ -127502,10 +153154,9 @@ impl Timestamp { } /// Builds the `Timestamp` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Timestamp", |nd| { for op in &self.control_inputs { @@ -127514,18 +153165,52 @@ impl Timestamp { ::std::result::Result::Ok(()) }) } -} + /// Builds the `Timestamp` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Timestamp", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(TimestampInst{op}) + } +} +impl TimestampInst { + /// Returns the 'ts' output of this 'Timestamp' operation. + pub fn ts(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TimestampInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Timestamp::new().build(scope)`. -pub fn timestamp(scope: &mut crate::Scope) -> crate::Result { +pub fn timestamp<>(scope: &mut crate::Scope) -> crate::Result { Timestamp::new().build(scope) } + /// Builder for the `ToBool` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ToBool { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ToBool' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ToBoolInst { + /// An instance of a fully built ToBool Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ToBool { /// Creates a new `ToBool`. @@ -127546,39 +153231,59 @@ impl ToBool { } /// Builds the `ToBool` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ToBool", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ToBool` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ToBool", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ToBoolInst{op}) + } +} +impl ToBoolInst { + /// Returns the 'output' output of this 'ToBool' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ToBoolInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ToBool::new().build(input, scope)`. -pub fn to_bool>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn to_bool>(input: O0, scope: &mut crate::Scope) -> crate::Result { ToBool::new().build(input, scope) } + /// Builder for the `TopK` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TopK { @@ -127587,6 +153292,12 @@ pub struct TopK { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TopK' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TopKInst { + /// An instance of a fully built TopK Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TopK { /// Creates a new `TopK`. @@ -127619,51 +153330,90 @@ impl TopK { } /// Builds the `TopK` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TopK", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.k { - nd.set_attr_int("k", *value)?; - } - if let ::std::option::Option::Some(value) = &self.sorted { - nd.set_attr_bool("sorted", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sorted { + nd.set_attr_bool("sorted", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TopK` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TopK", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } + if let ::std::option::Option::Some(value) = &self.sorted { + nd.set_attr_bool("sorted", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TopKInst{op}) + } +} +impl TopKInst { + /// Returns the 'values' output of this 'TopK' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'indices' output of this 'TopK' operation. + pub fn indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TopKInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TopK::new().build(input, scope)`. -pub fn top_k>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn top_k>(input: O0, scope: &mut crate::Scope) -> crate::Result { TopK::new().build(input, scope) } + /// Builder for the `TopKUnique` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TopKUnique { k: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TopKUnique' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TopKUniqueInst { + /// An instance of a fully built TopKUnique Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TopKUnique { /// Creates a new `TopKUnique`. @@ -127684,39 +153434,66 @@ impl TopKUnique { } /// Builds the `TopKUnique` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TopKUnique", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.k { - nd.set_attr_int("k", *value)?; - } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TopKUnique` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TopKUnique", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TopKUniqueInst{op}) + } +} +impl TopKUniqueInst { + /// Returns the 'topk' output of this 'TopKUnique' operation. + pub fn topk(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'topk_indices' output of this 'TopKUnique' operation. + pub fn topk_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TopKUniqueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TopKUnique::new().build(input, scope)`. -pub fn top_kunique>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn top_kunique>(input: O0, scope: &mut crate::Scope) -> crate::Result { TopKUnique::new().build(input, scope) } + /// Builder for the `TopKV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TopKV2 { @@ -127724,6 +153501,12 @@ pub struct TopKV2 { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TopKV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TopKV2Inst { + /// An instance of a fully built TopKV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TopKV2 { /// Creates a new `TopKV2`. @@ -127750,55 +153533,86 @@ impl TopKV2 { } /// Builds the `TopKV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input: O0, - k: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input: O0, k: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), k.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - k: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, k: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TopKV2", |nd| { nd.add_input(input); nd.add_input(k); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.sorted { - nd.set_attr_bool("sorted", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.sorted { + nd.set_attr_bool("sorted", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TopKV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input: O0, k: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), k.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, k: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TopKV2", |nd| { + nd.add_input(input); + nd.add_input(k); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.sorted { + nd.set_attr_bool("sorted", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TopKV2Inst{op}) + } +} +impl TopKV2Inst { + /// Returns the 'values' output of this 'TopKV2' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'indices' output of this 'TopKV2' operation. + pub fn indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TopKV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TopKV2::new().build(input, k, scope)`. -pub fn top_kv2, O1: ::std::convert::Into>( - input: O0, - k: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn top_kv2, O1: ::std::convert::Into>(input: O0, k: O1, scope: &mut crate::Scope) -> crate::Result { TopKV2::new().build(input, k, scope) } + /// Builder for the `TopKWithUnique` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TopKWithUnique { k: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TopKWithUnique' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TopKWithUniqueInst { + /// An instance of a fully built TopKWithUnique Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TopKWithUnique { /// Creates a new `TopKWithUnique`. @@ -127819,39 +153633,66 @@ impl TopKWithUnique { } /// Builds the `TopKWithUnique` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TopKWithUnique", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.k { - nd.set_attr_int("k", *value)?; - } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TopKWithUnique` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TopKWithUnique", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.k { + nd.set_attr_int("k", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TopKWithUniqueInst{op}) + } +} +impl TopKWithUniqueInst { + /// Returns the 'topk' output of this 'TopKWithUnique' operation. + pub fn topk(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'topk_indices' output of this 'TopKWithUnique' operation. + pub fn topk_indices(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for TopKWithUniqueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TopKWithUnique::new().build(input, scope)`. -pub fn top_kwith_unique>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn top_kwith_unique>(input: O0, scope: &mut crate::Scope) -> crate::Result { TopKWithUnique::new().build(input, scope) } + /// Builder for the `Transpose` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Transpose { @@ -127859,6 +153700,12 @@ pub struct Transpose { Tperm: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Transpose' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TransposeInst { + /// An instance of a fully built Transpose Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Transpose { /// Creates a new `Transpose`. @@ -127885,58 +153732,79 @@ impl Transpose { } /// Builds the `Transpose` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - perm: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, perm: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), perm.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - perm: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, perm: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Transpose", |nd| { nd.add_input(x); nd.add_input(perm); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tperm { - nd.set_attr_type("Tperm", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tperm { + nd.set_attr_type("Tperm", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Transpose` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, perm: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), perm.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, perm: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Transpose", |nd| { + nd.add_input(x); + nd.add_input(perm); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tperm { + nd.set_attr_type("Tperm", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TransposeInst{op}) + } +} +impl TransposeInst { + /// Returns the 'y' output of this 'Transpose' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TransposeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Transpose::new().build(x, perm, scope)`. -pub fn transpose< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - perm: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn transpose, O1: ::std::convert::Into>(x: O0, perm: O1, scope: &mut crate::Scope) -> crate::Result { Transpose::new().build(x, perm, scope) } + /// Builder for the `TridiagonalMatMul` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TridiagonalMatMul { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TridiagonalMatMul' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TridiagonalMatMulInst { + /// An instance of a fully built TridiagonalMatMul Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TridiagonalMatMul { /// Creates a new `TridiagonalMatMul`. @@ -127957,36 +153825,10 @@ impl TridiagonalMatMul { } /// Builds the `TridiagonalMatMul` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - superdiag: O0, - maindiag: O1, - subdiag: O2, - rhs: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - superdiag.into(), - maindiag.into(), - subdiag.into(), - rhs.into(), - scope, - ) - } - - fn build_impl( - &self, - superdiag: crate::Output, - maindiag: crate::Output, - subdiag: crate::Output, - rhs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, superdiag: O0, maindiag: O1, subdiag: O2, rhs: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(superdiag.into(), maindiag.into(), subdiag.into(), rhs.into(), scope) + } + fn build_impl(&self, superdiag: crate::Output, maindiag: crate::Output, subdiag: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TridiagonalMatMul", |nd| { nd.add_input(superdiag); nd.add_input(maindiag); @@ -127995,29 +153837,53 @@ impl TridiagonalMatMul { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TridiagonalMatMul` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, superdiag: O0, maindiag: O1, subdiag: O2, rhs: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(superdiag.into(), maindiag.into(), subdiag.into(), rhs.into(), scope) + } + fn build_instance_impl(&self, superdiag: crate::Output, maindiag: crate::Output, subdiag: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TridiagonalMatMul", |nd| { + nd.add_input(superdiag); + nd.add_input(maindiag); + nd.add_input(subdiag); + nd.add_input(rhs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TridiagonalMatMulInst{op}) + } +} +impl TridiagonalMatMulInst { + /// Returns the 'output' output of this 'TridiagonalMatMul' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TridiagonalMatMulInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TridiagonalMatMul::new().build(superdiag, maindiag, subdiag, rhs, scope)`. -pub fn tridiagonal_mat_mul< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - superdiag: O0, - maindiag: O1, - subdiag: O2, - rhs: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tridiagonal_mat_mul, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(superdiag: O0, maindiag: O1, subdiag: O2, rhs: O3, scope: &mut crate::Scope) -> crate::Result { TridiagonalMatMul::new().build(superdiag, maindiag, subdiag, rhs, scope) } + /// Builder for the `TridiagonalSolve` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TridiagonalSolve { @@ -128026,6 +153892,12 @@ pub struct TridiagonalSolve { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TridiagonalSolve' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TridiagonalSolveInst { + /// An instance of a fully built TridiagonalSolve Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TridiagonalSolve { /// Creates a new `TridiagonalSolve`. @@ -128058,61 +153930,85 @@ impl TridiagonalSolve { } /// Builds the `TridiagonalSolve` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - diagonals: O0, - rhs: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, diagonals: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(diagonals.into(), rhs.into(), scope) } - - fn build_impl( - &self, - diagonals: crate::Output, - rhs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, diagonals: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TridiagonalSolve", |nd| { nd.add_input(diagonals); nd.add_input(rhs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.partial_pivoting { - nd.set_attr_bool("partial_pivoting", *value)?; - } - if let ::std::option::Option::Some(value) = &self.perturb_singular { - nd.set_attr_bool("perturb_singular", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.partial_pivoting { + nd.set_attr_bool("partial_pivoting", *value)?; + } + if let ::std::option::Option::Some(value) = &self.perturb_singular { + nd.set_attr_bool("perturb_singular", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TridiagonalSolve` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, diagonals: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(diagonals.into(), rhs.into(), scope) + } + fn build_instance_impl(&self, diagonals: crate::Output, rhs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TridiagonalSolve", |nd| { + nd.add_input(diagonals); + nd.add_input(rhs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.partial_pivoting { + nd.set_attr_bool("partial_pivoting", *value)?; + } + if let ::std::option::Option::Some(value) = &self.perturb_singular { + nd.set_attr_bool("perturb_singular", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TridiagonalSolveInst{op}) + } +} +impl TridiagonalSolveInst { + /// Returns the 'output' output of this 'TridiagonalSolve' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TridiagonalSolveInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TridiagonalSolve::new().build(diagonals, rhs, scope)`. -pub fn tridiagonal_solve< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - diagonals: O0, - rhs: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn tridiagonal_solve, O1: ::std::convert::Into>(diagonals: O0, rhs: O1, scope: &mut crate::Scope) -> crate::Result { TridiagonalSolve::new().build(diagonals, rhs, scope) } + /// Builder for the `TruncateDiv` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TruncateDiv { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TruncateDiv' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TruncateDivInst { + /// An instance of a fully built TruncateDiv Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TruncateDiv { /// Creates a new `TruncateDiv`. @@ -128133,55 +154029,73 @@ impl TruncateDiv { } /// Builds the `TruncateDiv` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TruncateDiv", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TruncateDiv` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TruncateDiv", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TruncateDivInst{op}) + } +} +impl TruncateDivInst { + /// Returns the 'z' output of this 'TruncateDiv' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TruncateDivInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TruncateDiv::new().build(x, y, scope)`. -pub fn truncate_div< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn truncate_div, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { TruncateDiv::new().build(x, y, scope) } + /// Builder for the `TruncateMod` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TruncateMod { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TruncateMod' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TruncateModInst { + /// An instance of a fully built TruncateMod Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TruncateMod { /// Creates a new `TruncateMod`. @@ -128202,49 +154116,61 @@ impl TruncateMod { } /// Builds the `TruncateMod` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TruncateMod", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TruncateMod` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TruncateMod", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TruncateModInst{op}) + } +} +impl TruncateModInst { + /// Returns the 'z' output of this 'TruncateMod' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TruncateModInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TruncateMod::new().build(x, y, scope)`. -pub fn truncate_mod< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn truncate_mod, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { TruncateMod::new().build(x, y, scope) } + /// Builder for the `TruncatedNormal` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct TruncatedNormal { @@ -128254,6 +154180,12 @@ pub struct TruncatedNormal { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'TruncatedNormal' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct TruncatedNormalInst { + /// An instance of a fully built TruncatedNormal Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl TruncatedNormal { /// Creates a new `TruncatedNormal`. @@ -128292,48 +154224,77 @@ impl TruncatedNormal { } /// Builds the `TruncatedNormal` operation. - pub fn build>( - &self, - shape: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(shape.into(), scope) } - - fn build_impl( - &self, - shape: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("TruncatedNormal", |nd| { nd.add_input(shape); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `TruncatedNormal` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, shape: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(shape.into(), scope) + } + fn build_instance_impl(&self, shape: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("TruncatedNormal", |nd| { + nd.add_input(shape); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(TruncatedNormalInst{op}) + } +} +impl TruncatedNormalInst { + /// Returns the 'output' output of this 'TruncatedNormal' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for TruncatedNormalInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `TruncatedNormal::new().build(shape, scope)`. -pub fn truncated_normal>( - shape: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn truncated_normal>(shape: O0, scope: &mut crate::Scope) -> crate::Result { TruncatedNormal::new().build(shape, scope) } + /// Builder for the `Unbatch` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Unbatch { @@ -128343,6 +154304,12 @@ pub struct Unbatch { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Unbatch' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnbatchInst { + /// An instance of a fully built Unbatch Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Unbatch { /// Creates a new `Unbatch`. @@ -128357,19 +154324,13 @@ impl Unbatch { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -128387,27 +154348,10 @@ impl Unbatch { } /// Builds the `Unbatch` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - batched_tensor: O0, - batch_index: O1, - id: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, batched_tensor: O0, batch_index: O1, id: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(batched_tensor.into(), batch_index.into(), id.into(), scope) } - - fn build_impl( - &self, - batched_tensor: crate::Output, - batch_index: crate::Output, - id: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, batched_tensor: crate::Output, batch_index: crate::Output, id: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Unbatch", |nd| { nd.add_input(batched_tensor); nd.add_input(batch_index); @@ -128415,36 +154359,70 @@ impl Unbatch { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.timeout_micros { - nd.set_attr_int("timeout_micros", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.timeout_micros { + nd.set_attr_int("timeout_micros", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Unbatch` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, batched_tensor: O0, batch_index: O1, id: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(batched_tensor.into(), batch_index.into(), id.into(), scope) + } + fn build_instance_impl(&self, batched_tensor: crate::Output, batch_index: crate::Output, id: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Unbatch", |nd| { + nd.add_input(batched_tensor); + nd.add_input(batch_index); + nd.add_input(id); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.timeout_micros { + nd.set_attr_int("timeout_micros", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnbatchInst{op}) + } +} +impl UnbatchInst { + /// Returns the 'unbatched_tensor' output of this 'Unbatch' operation. + pub fn unbatched_tensor(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnbatchInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Unbatch::new().build(batched_tensor, batch_index, id, scope)`. -pub fn unbatch< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - batched_tensor: O0, - batch_index: O1, - id: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unbatch, O1: ::std::convert::Into, O2: ::std::convert::Into>(batched_tensor: O0, batch_index: O1, id: O2, scope: &mut crate::Scope) -> crate::Result { Unbatch::new().build(batched_tensor, batch_index, id, scope) } + /// Builder for the `UnbatchDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnbatchDataset { @@ -128453,6 +154431,12 @@ pub struct UnbatchDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnbatchDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnbatchDatasetInst { + /// An instance of a fully built UnbatchDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnbatchDataset { /// Creates a new `UnbatchDataset`. @@ -128461,28 +154445,19 @@ impl UnbatchDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -128494,45 +154469,71 @@ impl UnbatchDataset { } /// Builds the `UnbatchDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnbatchDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnbatchDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnbatchDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnbatchDatasetInst{op}) + } +} +impl UnbatchDatasetInst { + /// Returns the 'handle' output of this 'UnbatchDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnbatchDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnbatchDataset::new().build(input_dataset, scope)`. -pub fn unbatch_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unbatch_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { UnbatchDataset::new().build(input_dataset, scope) } + /// Builder for the `UnbatchGrad` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnbatchGrad { @@ -128541,6 +154542,12 @@ pub struct UnbatchGrad { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnbatchGrad' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnbatchGradInst { + /// An instance of a fully built UnbatchGrad Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnbatchGrad { /// Creates a new `UnbatchGrad`. @@ -128549,19 +154556,13 @@ impl UnbatchGrad { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -128579,36 +154580,10 @@ impl UnbatchGrad { } /// Builds the `UnbatchGrad` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - original_input: O0, - batch_index: O1, - grad: O2, - id: O3, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - original_input.into(), - batch_index.into(), - grad.into(), - id.into(), - scope, - ) - } - - fn build_impl( - &self, - original_input: crate::Output, - batch_index: crate::Output, - grad: crate::Output, - id: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, original_input: O0, batch_index: O1, grad: O2, id: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(original_input.into(), batch_index.into(), grad.into(), id.into(), scope) + } + fn build_impl(&self, original_input: crate::Output, batch_index: crate::Output, grad: crate::Output, id: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnbatchGrad", |nd| { nd.add_input(original_input); nd.add_input(batch_index); @@ -128617,35 +154592,65 @@ impl UnbatchGrad { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnbatchGrad` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, original_input: O0, batch_index: O1, grad: O2, id: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(original_input.into(), batch_index.into(), grad.into(), id.into(), scope) + } + fn build_instance_impl(&self, original_input: crate::Output, batch_index: crate::Output, grad: crate::Output, id: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnbatchGrad", |nd| { + nd.add_input(original_input); + nd.add_input(batch_index); + nd.add_input(grad); + nd.add_input(id); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnbatchGradInst{op}) + } +} +impl UnbatchGradInst { + /// Returns the 'batched_grad' output of this 'UnbatchGrad' operation. + pub fn batched_grad(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnbatchGradInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnbatchGrad::new().build(original_input, batch_index, grad, id, scope)`. -pub fn unbatch_grad< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - original_input: O0, - batch_index: O1, - grad: O2, - id: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unbatch_grad, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(original_input: O0, batch_index: O1, grad: O2, id: O3, scope: &mut crate::Scope) -> crate::Result { UnbatchGrad::new().build(original_input, batch_index, grad, id, scope) } + /// Builder for the `UncompressElement` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UncompressElement { @@ -128653,6 +154658,12 @@ pub struct UncompressElement { output_shapes: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'UncompressElement' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UncompressElementInst { + /// An instance of a fully built UncompressElement Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UncompressElement { /// Creates a new `UncompressElement`. @@ -128661,19 +154672,13 @@ impl UncompressElement { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -128685,42 +154690,65 @@ impl UncompressElement { } /// Builds the `UncompressElement` operation. - pub fn build>( - &self, - compressed: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, compressed: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(compressed.into(), scope) } - - fn build_impl( - &self, - compressed: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, compressed: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UncompressElement", |nd| { nd.add_input(compressed); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UncompressElement` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, compressed: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(compressed.into(), scope) + } + fn build_instance_impl(&self, compressed: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UncompressElement", |nd| { + nd.add_input(compressed); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UncompressElementInst{op}) + } +} +impl UncompressElementInst { + /// Returns the 'components' output of this 'UncompressElement' operation. + pub fn components(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UncompressElementInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UncompressElement::new().build(compressed, scope)`. -pub fn uncompress_element>( - compressed: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn uncompress_element>(compressed: O0, scope: &mut crate::Scope) -> crate::Result { UncompressElement::new().build(compressed, scope) } + /// Builder for the `UnicodeDecode` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnicodeDecode { @@ -128731,6 +154759,12 @@ pub struct UnicodeDecode { Tsplits: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnicodeDecode' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnicodeDecodeInst { + /// An instance of a fully built UnicodeDecode Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnicodeDecode { /// Creates a new `UnicodeDecode`. @@ -128739,19 +154773,13 @@ impl UnicodeDecode { } /// Sets the `input_encoding` attribute. - pub fn input_encoding>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_encoding>(mut self, value: ArgType) -> Self { self.input_encoding = ::std::option::Option::Some(value.into()); self } /// Sets the `errors` attribute. - pub fn errors>( - mut self, - value: ArgType, - ) -> Self { + pub fn errors>(mut self, value: ArgType) -> Self { self.errors = ::std::option::Option::Some(value.into()); self } @@ -128763,19 +154791,13 @@ impl UnicodeDecode { } /// Sets the `replace_control_characters` attribute. - pub fn replace_control_characters>( - mut self, - value: ArgType, - ) -> Self { + pub fn replace_control_characters>(mut self, value: ArgType) -> Self { self.replace_control_characters = ::std::option::Option::Some(value.into()); self } /// Sets the `Tsplits` attribute. - pub fn Tsplits>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsplits>(mut self, value: ArgType) -> Self { self.Tsplits = ::std::option::Option::Some(value.into()); self } @@ -128787,51 +154809,90 @@ impl UnicodeDecode { } /// Builds the `UnicodeDecode` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnicodeDecode", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.input_encoding { - nd.set_attr_string("input_encoding", value)?; - } - if let ::std::option::Option::Some(value) = &self.errors { - nd.set_attr_string("errors", value)?; - } - if let ::std::option::Option::Some(value) = &self.replacement_char { - nd.set_attr_int("replacement_char", *value)?; - } - if let ::std::option::Option::Some(value) = &self.replace_control_characters { - nd.set_attr_bool("replace_control_characters", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsplits { - nd.set_attr_type("Tsplits", *value)?; - } + if let ::std::option::Option::Some(value) = &self.input_encoding { + nd.set_attr_string("input_encoding", value)?; + } + if let ::std::option::Option::Some(value) = &self.errors { + nd.set_attr_string("errors", value)?; + } + if let ::std::option::Option::Some(value) = &self.replacement_char { + nd.set_attr_int("replacement_char", *value)?; + } + if let ::std::option::Option::Some(value) = &self.replace_control_characters { + nd.set_attr_bool("replace_control_characters", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnicodeDecode` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnicodeDecode", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.input_encoding { + nd.set_attr_string("input_encoding", value)?; + } + if let ::std::option::Option::Some(value) = &self.errors { + nd.set_attr_string("errors", value)?; + } + if let ::std::option::Option::Some(value) = &self.replacement_char { + nd.set_attr_int("replacement_char", *value)?; + } + if let ::std::option::Option::Some(value) = &self.replace_control_characters { + nd.set_attr_bool("replace_control_characters", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnicodeDecodeInst{op}) + } +} +impl UnicodeDecodeInst { + /// Returns the 'row_splits' output of this 'UnicodeDecode' operation. + pub fn row_splits(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'char_values' output of this 'UnicodeDecode' operation. + pub fn char_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for UnicodeDecodeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnicodeDecode::new().build(input, scope)`. -pub fn unicode_decode>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unicode_decode>(input: O0, scope: &mut crate::Scope) -> crate::Result { UnicodeDecode::new().build(input, scope) } + /// Builder for the `UnicodeDecodeWithOffsets` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnicodeDecodeWithOffsets { @@ -128842,6 +154903,12 @@ pub struct UnicodeDecodeWithOffsets { Tsplits: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnicodeDecodeWithOffsets' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnicodeDecodeWithOffsetsInst { + /// An instance of a fully built UnicodeDecodeWithOffsets Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnicodeDecodeWithOffsets { /// Creates a new `UnicodeDecodeWithOffsets`. @@ -128850,19 +154917,13 @@ impl UnicodeDecodeWithOffsets { } /// Sets the `input_encoding` attribute. - pub fn input_encoding>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_encoding>(mut self, value: ArgType) -> Self { self.input_encoding = ::std::option::Option::Some(value.into()); self } /// Sets the `errors` attribute. - pub fn errors>( - mut self, - value: ArgType, - ) -> Self { + pub fn errors>(mut self, value: ArgType) -> Self { self.errors = ::std::option::Option::Some(value.into()); self } @@ -128874,19 +154935,13 @@ impl UnicodeDecodeWithOffsets { } /// Sets the `replace_control_characters` attribute. - pub fn replace_control_characters>( - mut self, - value: ArgType, - ) -> Self { + pub fn replace_control_characters>(mut self, value: ArgType) -> Self { self.replace_control_characters = ::std::option::Option::Some(value.into()); self } /// Sets the `Tsplits` attribute. - pub fn Tsplits>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsplits>(mut self, value: ArgType) -> Self { self.Tsplits = ::std::option::Option::Some(value.into()); self } @@ -128898,51 +154953,97 @@ impl UnicodeDecodeWithOffsets { } /// Builds the `UnicodeDecodeWithOffsets` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnicodeDecodeWithOffsets", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.input_encoding { - nd.set_attr_string("input_encoding", value)?; - } - if let ::std::option::Option::Some(value) = &self.errors { - nd.set_attr_string("errors", value)?; - } - if let ::std::option::Option::Some(value) = &self.replacement_char { - nd.set_attr_int("replacement_char", *value)?; - } - if let ::std::option::Option::Some(value) = &self.replace_control_characters { - nd.set_attr_bool("replace_control_characters", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsplits { - nd.set_attr_type("Tsplits", *value)?; - } + if let ::std::option::Option::Some(value) = &self.input_encoding { + nd.set_attr_string("input_encoding", value)?; + } + if let ::std::option::Option::Some(value) = &self.errors { + nd.set_attr_string("errors", value)?; + } + if let ::std::option::Option::Some(value) = &self.replacement_char { + nd.set_attr_int("replacement_char", *value)?; + } + if let ::std::option::Option::Some(value) = &self.replace_control_characters { + nd.set_attr_bool("replace_control_characters", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnicodeDecodeWithOffsets` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnicodeDecodeWithOffsets", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.input_encoding { + nd.set_attr_string("input_encoding", value)?; + } + if let ::std::option::Option::Some(value) = &self.errors { + nd.set_attr_string("errors", value)?; + } + if let ::std::option::Option::Some(value) = &self.replacement_char { + nd.set_attr_int("replacement_char", *value)?; + } + if let ::std::option::Option::Some(value) = &self.replace_control_characters { + nd.set_attr_bool("replace_control_characters", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnicodeDecodeWithOffsetsInst{op}) + } +} +impl UnicodeDecodeWithOffsetsInst { + /// Returns the 'row_splits' output of this 'UnicodeDecodeWithOffsets' operation. + pub fn row_splits(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'char_values' output of this 'UnicodeDecodeWithOffsets' operation. + pub fn char_values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'char_to_byte_starts' output of this 'UnicodeDecodeWithOffsets' operation. + pub fn char_to_byte_starts(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for UnicodeDecodeWithOffsetsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnicodeDecodeWithOffsets::new().build(input, scope)`. -pub fn unicode_decode_with_offsets>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unicode_decode_with_offsets>(input: O0, scope: &mut crate::Scope) -> crate::Result { UnicodeDecodeWithOffsets::new().build(input, scope) } + /// Builder for the `UnicodeEncode` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnicodeEncode { @@ -128952,6 +155053,12 @@ pub struct UnicodeEncode { Tsplits: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnicodeEncode' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnicodeEncodeInst { + /// An instance of a fully built UnicodeEncode Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnicodeEncode { /// Creates a new `UnicodeEncode`. @@ -128960,19 +155067,13 @@ impl UnicodeEncode { } /// Sets the `errors` attribute. - pub fn errors>( - mut self, - value: ArgType, - ) -> Self { + pub fn errors>(mut self, value: ArgType) -> Self { self.errors = ::std::option::Option::Some(value.into()); self } /// Sets the `output_encoding` attribute. - pub fn output_encoding>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_encoding>(mut self, value: ArgType) -> Self { self.output_encoding = ::std::option::Option::Some(value.into()); self } @@ -128984,10 +155085,7 @@ impl UnicodeEncode { } /// Sets the `Tsplits` attribute. - pub fn Tsplits>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tsplits>(mut self, value: ArgType) -> Self { self.Tsplits = ::std::option::Option::Some(value.into()); self } @@ -128999,63 +155097,90 @@ impl UnicodeEncode { } /// Builds the `UnicodeEncode` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - input_values: O0, - input_splits: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, input_values: O0, input_splits: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_values.into(), input_splits.into(), scope) } - - fn build_impl( - &self, - input_values: crate::Output, - input_splits: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_values: crate::Output, input_splits: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnicodeEncode", |nd| { nd.add_input(input_values); nd.add_input(input_splits); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.errors { - nd.set_attr_string("errors", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_encoding { - nd.set_attr_string("output_encoding", value)?; - } - if let ::std::option::Option::Some(value) = &self.replacement_char { - nd.set_attr_int("replacement_char", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tsplits { - nd.set_attr_type("Tsplits", *value)?; - } + if let ::std::option::Option::Some(value) = &self.errors { + nd.set_attr_string("errors", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_encoding { + nd.set_attr_string("output_encoding", value)?; + } + if let ::std::option::Option::Some(value) = &self.replacement_char { + nd.set_attr_int("replacement_char", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnicodeEncode` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, input_values: O0, input_splits: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_values.into(), input_splits.into(), scope) + } + fn build_instance_impl(&self, input_values: crate::Output, input_splits: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnicodeEncode", |nd| { + nd.add_input(input_values); + nd.add_input(input_splits); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.errors { + nd.set_attr_string("errors", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_encoding { + nd.set_attr_string("output_encoding", value)?; + } + if let ::std::option::Option::Some(value) = &self.replacement_char { + nd.set_attr_int("replacement_char", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tsplits { + nd.set_attr_type("Tsplits", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnicodeEncodeInst{op}) + } +} +impl UnicodeEncodeInst { + /// Returns the 'output' output of this 'UnicodeEncode' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnicodeEncodeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnicodeEncode::new().build(input_values, input_splits, scope)`. -pub fn unicode_encode< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - input_values: O0, - input_splits: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unicode_encode, O1: ::std::convert::Into>(input_values: O0, input_splits: O1, scope: &mut crate::Scope) -> crate::Result { UnicodeEncode::new().build(input_values, input_splits, scope) } + /// Builder for the `UnicodeScript` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnicodeScript { control_inputs: ::std::vec::Vec, } +/// An instance of 'UnicodeScript' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnicodeScriptInst { + /// An instance of a fully built UnicodeScript Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnicodeScript { /// Creates a new `UnicodeScript`. @@ -129070,19 +155195,10 @@ impl UnicodeScript { } /// Builds the `UnicodeScript` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnicodeScript", |nd| { nd.add_input(input); for op in &self.control_inputs { @@ -129091,15 +155207,41 @@ impl UnicodeScript { ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnicodeScript` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnicodeScript", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(UnicodeScriptInst{op}) + } +} +impl UnicodeScriptInst { + /// Returns the 'output' output of this 'UnicodeScript' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnicodeScriptInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnicodeScript::new().build(input, scope)`. -pub fn unicode_script>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unicode_script>(input: O0, scope: &mut crate::Scope) -> crate::Result { UnicodeScript::new().build(input, scope) } + /// Builder for the `UnicodeTranscode` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnicodeTranscode { @@ -129110,6 +155252,12 @@ pub struct UnicodeTranscode { replace_control_characters: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnicodeTranscode' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnicodeTranscodeInst { + /// An instance of a fully built UnicodeTranscode Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnicodeTranscode { /// Creates a new `UnicodeTranscode`. @@ -129118,28 +155266,19 @@ impl UnicodeTranscode { } /// Sets the `input_encoding` attribute. - pub fn input_encoding>( - mut self, - value: ArgType, - ) -> Self { + pub fn input_encoding>(mut self, value: ArgType) -> Self { self.input_encoding = ::std::option::Option::Some(value.into()); self } /// Sets the `output_encoding` attribute. - pub fn output_encoding>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_encoding>(mut self, value: ArgType) -> Self { self.output_encoding = ::std::option::Option::Some(value.into()); self } /// Sets the `errors` attribute. - pub fn errors>( - mut self, - value: ArgType, - ) -> Self { + pub fn errors>(mut self, value: ArgType) -> Self { self.errors = ::std::option::Option::Some(value.into()); self } @@ -129151,10 +155290,7 @@ impl UnicodeTranscode { } /// Sets the `replace_control_characters` attribute. - pub fn replace_control_characters>( - mut self, - value: ArgType, - ) -> Self { + pub fn replace_control_characters>(mut self, value: ArgType) -> Self { self.replace_control_characters = ::std::option::Option::Some(value.into()); self } @@ -129166,51 +155302,83 @@ impl UnicodeTranscode { } /// Builds the `UnicodeTranscode` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnicodeTranscode", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.input_encoding { - nd.set_attr_string("input_encoding", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_encoding { - nd.set_attr_string("output_encoding", value)?; - } - if let ::std::option::Option::Some(value) = &self.errors { - nd.set_attr_string("errors", value)?; - } - if let ::std::option::Option::Some(value) = &self.replacement_char { - nd.set_attr_int("replacement_char", *value)?; - } - if let ::std::option::Option::Some(value) = &self.replace_control_characters { - nd.set_attr_bool("replace_control_characters", *value)?; - } + if let ::std::option::Option::Some(value) = &self.input_encoding { + nd.set_attr_string("input_encoding", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_encoding { + nd.set_attr_string("output_encoding", value)?; + } + if let ::std::option::Option::Some(value) = &self.errors { + nd.set_attr_string("errors", value)?; + } + if let ::std::option::Option::Some(value) = &self.replacement_char { + nd.set_attr_int("replacement_char", *value)?; + } + if let ::std::option::Option::Some(value) = &self.replace_control_characters { + nd.set_attr_bool("replace_control_characters", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnicodeTranscode` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnicodeTranscode", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.input_encoding { + nd.set_attr_string("input_encoding", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_encoding { + nd.set_attr_string("output_encoding", value)?; + } + if let ::std::option::Option::Some(value) = &self.errors { + nd.set_attr_string("errors", value)?; + } + if let ::std::option::Option::Some(value) = &self.replacement_char { + nd.set_attr_int("replacement_char", *value)?; + } + if let ::std::option::Option::Some(value) = &self.replace_control_characters { + nd.set_attr_bool("replace_control_characters", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnicodeTranscodeInst{op}) + } +} +impl UnicodeTranscodeInst { + /// Returns the 'output' output of this 'UnicodeTranscode' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnicodeTranscodeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnicodeTranscode::new().build(input, scope)`. -pub fn unicode_transcode>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unicode_transcode>(input: O0, scope: &mut crate::Scope) -> crate::Result { UnicodeTranscode::new().build(input, scope) } + /// Builder for the `UniformCandidateSampler` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UniformCandidateSampler { @@ -129222,6 +155390,12 @@ pub struct UniformCandidateSampler { seed2: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UniformCandidateSampler' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UniformCandidateSamplerInst { + /// An instance of a fully built UniformCandidateSampler Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UniformCandidateSampler { /// Creates a new `UniformCandidateSampler`. @@ -129272,54 +155446,103 @@ impl UniformCandidateSampler { } /// Builds the `UniformCandidateSampler` operation. - pub fn build>( - &self, - true_classes: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(true_classes.into(), scope) } - - fn build_impl( - &self, - true_classes: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UniformCandidateSampler", |nd| { nd.add_input(true_classes); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num_true { - nd.set_attr_int("num_true", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_sampled { - nd.set_attr_int("num_sampled", *value)?; - } - if let ::std::option::Option::Some(value) = &self.unique { - nd.set_attr_bool("unique", *value)?; - } - if let ::std::option::Option::Some(value) = &self.range_max { - nd.set_attr_int("range_max", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed { - nd.set_attr_int("seed", *value)?; - } - if let ::std::option::Option::Some(value) = &self.seed2 { - nd.set_attr_int("seed2", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_max { + nd.set_attr_int("range_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UniformCandidateSampler` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, true_classes: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(true_classes.into(), scope) + } + fn build_instance_impl(&self, true_classes: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UniformCandidateSampler", |nd| { + nd.add_input(true_classes); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num_true { + nd.set_attr_int("num_true", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_sampled { + nd.set_attr_int("num_sampled", *value)?; + } + if let ::std::option::Option::Some(value) = &self.unique { + nd.set_attr_bool("unique", *value)?; + } + if let ::std::option::Option::Some(value) = &self.range_max { + nd.set_attr_int("range_max", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed { + nd.set_attr_int("seed", *value)?; + } + if let ::std::option::Option::Some(value) = &self.seed2 { + nd.set_attr_int("seed2", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UniformCandidateSamplerInst{op}) + } +} +impl UniformCandidateSamplerInst { + /// Returns the 'sampled_candidates' output of this 'UniformCandidateSampler' operation. + pub fn sampled_candidates(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'true_expected_count' output of this 'UniformCandidateSampler' operation. + pub fn true_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'sampled_expected_count' output of this 'UniformCandidateSampler' operation. + pub fn sampled_expected_count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for UniformCandidateSamplerInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UniformCandidateSampler::new().build(true_classes, scope)`. -pub fn uniform_candidate_sampler>( - true_classes: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn uniform_candidate_sampler>(true_classes: O0, scope: &mut crate::Scope) -> crate::Result { UniformCandidateSampler::new().build(true_classes, scope) } + /// Builder for the `Unique` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Unique { @@ -129327,6 +155550,12 @@ pub struct Unique { out_idx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Unique' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UniqueInst { + /// An instance of a fully built Unique Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Unique { /// Creates a new `Unique`. @@ -129341,10 +155570,7 @@ impl Unique { } /// Sets the `out_idx` attribute. - pub fn out_idx>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_idx>(mut self, value: ArgType) -> Self { self.out_idx = ::std::option::Option::Some(value.into()); self } @@ -129356,42 +155582,72 @@ impl Unique { } /// Builds the `Unique` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Unique", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_idx { - nd.set_attr_type("out_idx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_idx { + nd.set_attr_type("out_idx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Unique` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Unique", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_idx { + nd.set_attr_type("out_idx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UniqueInst{op}) + } +} +impl UniqueInst { + /// Returns the 'y' output of this 'Unique' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'idx' output of this 'Unique' operation. + pub fn idx(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for UniqueInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Unique::new().build(x, scope)`. -pub fn unique>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unique>(x: O0, scope: &mut crate::Scope) -> crate::Result { Unique::new().build(x, scope) } + /// Builder for the `UniqueDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UniqueDataset { @@ -129400,6 +155656,12 @@ pub struct UniqueDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'UniqueDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UniqueDatasetInst { + /// An instance of a fully built UniqueDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UniqueDataset { /// Creates a new `UniqueDataset`. @@ -129408,28 +155670,19 @@ impl UniqueDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -129441,45 +155694,71 @@ impl UniqueDataset { } /// Builds the `UniqueDataset` operation. - pub fn build>( - &self, - input_dataset: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_dataset.into(), scope) } - - fn build_impl( - &self, - input_dataset: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UniqueDataset", |nd| { nd.add_input(input_dataset); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UniqueDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UniqueDataset", |nd| { + nd.add_input(input_dataset); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UniqueDatasetInst{op}) + } +} +impl UniqueDatasetInst { + /// Returns the 'handle' output of this 'UniqueDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UniqueDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UniqueDataset::new().build(input_dataset, scope)`. -pub fn unique_dataset>( - input_dataset: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unique_dataset>(input_dataset: O0, scope: &mut crate::Scope) -> crate::Result { UniqueDataset::new().build(input_dataset, scope) } + /// Builder for the `UniqueV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UniqueV2 { @@ -129488,6 +155767,12 @@ pub struct UniqueV2 { out_idx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UniqueV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UniqueV2Inst { + /// An instance of a fully built UniqueV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UniqueV2 { /// Creates a new `UniqueV2`. @@ -129508,10 +155793,7 @@ impl UniqueV2 { } /// Sets the `out_idx` attribute. - pub fn out_idx>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_idx>(mut self, value: ArgType) -> Self { self.out_idx = ::std::option::Option::Some(value.into()); self } @@ -129523,55 +155805,80 @@ impl UniqueV2 { } /// Builds the `UniqueV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), axis.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UniqueV2", |nd| { nd.add_input(x); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Taxis { - nd.set_attr_type("Taxis", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_idx { - nd.set_attr_type("out_idx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Taxis { + nd.set_attr_type("Taxis", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_idx { + nd.set_attr_type("out_idx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UniqueV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), axis.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UniqueV2", |nd| { + nd.add_input(x); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Taxis { + nd.set_attr_type("Taxis", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_idx { + nd.set_attr_type("out_idx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UniqueV2Inst{op}) + } +} +impl UniqueV2Inst { + /// Returns the 'y' output of this 'UniqueV2' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'idx' output of this 'UniqueV2' operation. + pub fn idx(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } +} +impl Into for UniqueV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UniqueV2::new().build(x, axis, scope)`. -pub fn unique_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unique_v2, O1: ::std::convert::Into>(x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { UniqueV2::new().build(x, axis, scope) } + /// Builder for the `UniqueWithCounts` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UniqueWithCounts { @@ -129579,6 +155886,12 @@ pub struct UniqueWithCounts { out_idx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UniqueWithCounts' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UniqueWithCountsInst { + /// An instance of a fully built UniqueWithCounts Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UniqueWithCounts { /// Creates a new `UniqueWithCounts`. @@ -129593,10 +155906,7 @@ impl UniqueWithCounts { } /// Sets the `out_idx` attribute. - pub fn out_idx>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_idx>(mut self, value: ArgType) -> Self { self.out_idx = ::std::option::Option::Some(value.into()); self } @@ -129608,42 +155918,79 @@ impl UniqueWithCounts { } /// Builds the `UniqueWithCounts` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UniqueWithCounts", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_idx { - nd.set_attr_type("out_idx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_idx { + nd.set_attr_type("out_idx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UniqueWithCounts` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UniqueWithCounts", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_idx { + nd.set_attr_type("out_idx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UniqueWithCountsInst{op}) + } +} +impl UniqueWithCountsInst { + /// Returns the 'y' output of this 'UniqueWithCounts' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'idx' output of this 'UniqueWithCounts' operation. + pub fn idx(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'count' output of this 'UniqueWithCounts' operation. + pub fn count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for UniqueWithCountsInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UniqueWithCounts::new().build(x, scope)`. -pub fn unique_with_counts>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unique_with_counts>(x: O0, scope: &mut crate::Scope) -> crate::Result { UniqueWithCounts::new().build(x, scope) } + /// Builder for the `UniqueWithCountsV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UniqueWithCountsV2 { @@ -129652,6 +155999,12 @@ pub struct UniqueWithCountsV2 { out_idx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UniqueWithCountsV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UniqueWithCountsV2Inst { + /// An instance of a fully built UniqueWithCountsV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UniqueWithCountsV2 { /// Creates a new `UniqueWithCountsV2`. @@ -129672,10 +156025,7 @@ impl UniqueWithCountsV2 { } /// Sets the `out_idx` attribute. - pub fn out_idx>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_idx>(mut self, value: ArgType) -> Self { self.out_idx = ::std::option::Option::Some(value.into()); self } @@ -129687,55 +156037,87 @@ impl UniqueWithCountsV2 { } /// Builds the `UniqueWithCountsV2` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - axis: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), axis.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - axis: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UniqueWithCountsV2", |nd| { nd.add_input(x); nd.add_input(axis); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Taxis { - nd.set_attr_type("Taxis", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_idx { - nd.set_attr_type("out_idx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Taxis { + nd.set_attr_type("Taxis", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_idx { + nd.set_attr_type("out_idx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UniqueWithCountsV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), axis.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, axis: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UniqueWithCountsV2", |nd| { + nd.add_input(x); + nd.add_input(axis); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Taxis { + nd.set_attr_type("Taxis", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_idx { + nd.set_attr_type("out_idx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UniqueWithCountsV2Inst{op}) + } +} +impl UniqueWithCountsV2Inst { + /// Returns the 'y' output of this 'UniqueWithCountsV2' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } + /// Returns the 'idx' output of this 'UniqueWithCountsV2' operation. + pub fn idx(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 1 + } + } + /// Returns the 'count' output of this 'UniqueWithCountsV2' operation. + pub fn count(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 2 + } + } +} +impl Into for UniqueWithCountsV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UniqueWithCountsV2::new().build(x, axis, scope)`. -pub fn unique_with_counts_v2< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - x: O0, - axis: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unique_with_counts_v2, O1: ::std::convert::Into>(x: O0, axis: O1, scope: &mut crate::Scope) -> crate::Result { UniqueWithCountsV2::new().build(x, axis, scope) } + /// Builder for the `Unpack` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Unpack { @@ -129744,6 +156126,12 @@ pub struct Unpack { axis: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Unpack' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnpackInst { + /// An instance of a fully built Unpack Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Unpack { /// Creates a new `Unpack`. @@ -129776,51 +156164,88 @@ impl Unpack { } /// Builds the `Unpack` operation. - pub fn build>( - &self, - value: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(value.into(), scope) } - - fn build_impl( - &self, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Unpack", |nd| { nd.add_input(value); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.num { - nd.set_attr_int("num", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.axis { - nd.set_attr_int("axis", *value)?; - } + if let ::std::option::Option::Some(value) = &self.num { + nd.set_attr_int("num", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Unpack` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, value: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(value.into(), scope) + } + fn build_instance_impl(&self, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Unpack", |nd| { + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.num { + nd.set_attr_int("num", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.axis { + nd.set_attr_int("axis", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnpackInst{op}) + } +} +impl UnpackInst { + /// Returns a Vector of Outputs for 'output' output of this Unpack operation. + pub fn output(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("num")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for UnpackInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Unpack::new().build(value, scope)`. -pub fn unpack>( - value: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unpack>(value: O0, scope: &mut crate::Scope) -> crate::Result { Unpack::new().build(value, scope) } + /// Builder for the `UnravelIndex` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnravelIndex { Tidx: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnravelIndex' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnravelIndexInst { + /// An instance of a fully built UnravelIndex Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnravelIndex { /// Creates a new `UnravelIndex`. @@ -129841,49 +156266,61 @@ impl UnravelIndex { } /// Builds the `UnravelIndex` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - indices: O0, - dims: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, indices: O0, dims: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(indices.into(), dims.into(), scope) } - - fn build_impl( - &self, - indices: crate::Output, - dims: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, indices: crate::Output, dims: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnravelIndex", |nd| { nd.add_input(indices); nd.add_input(dims); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tidx { - nd.set_attr_type("Tidx", *value)?; - } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnravelIndex` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, indices: O0, dims: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(indices.into(), dims.into(), scope) + } + fn build_instance_impl(&self, indices: crate::Output, dims: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnravelIndex", |nd| { + nd.add_input(indices); + nd.add_input(dims); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tidx { + nd.set_attr_type("Tidx", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnravelIndexInst{op}) + } +} +impl UnravelIndexInst { + /// Returns the 'output' output of this 'UnravelIndex' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnravelIndexInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnravelIndex::new().build(indices, dims, scope)`. -pub fn unravel_index< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - indices: O0, - dims: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unravel_index, O1: ::std::convert::Into>(indices: O0, dims: O1, scope: &mut crate::Scope) -> crate::Result { UnravelIndex::new().build(indices, dims, scope) } + /// Builder for the `UnsortedSegmentJoin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnsortedSegmentJoin { @@ -129892,6 +156329,12 @@ pub struct UnsortedSegmentJoin { Tnumsegments: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnsortedSegmentJoin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnsortedSegmentJoinInst { + /// An instance of a fully built UnsortedSegmentJoin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnsortedSegmentJoin { /// Creates a new `UnsortedSegmentJoin`. @@ -129900,28 +156343,19 @@ impl UnsortedSegmentJoin { } /// Sets the `separator` attribute. - pub fn separator>( - mut self, - value: ArgType, - ) -> Self { + pub fn separator>(mut self, value: ArgType) -> Self { self.separator = ::std::option::Option::Some(value.into()); self } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } /// Sets the `Tnumsegments` attribute. - pub fn Tnumsegments>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tnumsegments>(mut self, value: ArgType) -> Self { self.Tnumsegments = ::std::option::Option::Some(value.into()); self } @@ -129933,32 +156367,10 @@ impl UnsortedSegmentJoin { } /// Builds the `UnsortedSegmentJoin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - inputs: O0, - segment_ids: O1, - num_segments: O2, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - inputs.into(), - segment_ids.into(), - num_segments.into(), - scope, - ) - } - - fn build_impl( - &self, - inputs: crate::Output, - segment_ids: crate::Output, - num_segments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, inputs: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(inputs.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_impl(&self, inputs: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnsortedSegmentJoin", |nd| { nd.add_input(inputs); nd.add_input(segment_ids); @@ -129966,33 +156378,64 @@ impl UnsortedSegmentJoin { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.separator { - nd.set_attr_string("separator", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tnumsegments { - nd.set_attr_type("Tnumsegments", *value)?; - } + if let ::std::option::Option::Some(value) = &self.separator { + nd.set_attr_string("separator", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnsortedSegmentJoin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, inputs: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnsortedSegmentJoin", |nd| { + nd.add_input(inputs); + nd.add_input(segment_ids); + nd.add_input(num_segments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.separator { + nd.set_attr_string("separator", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnsortedSegmentJoinInst{op}) + } +} +impl UnsortedSegmentJoinInst { + /// Returns the 'output' output of this 'UnsortedSegmentJoin' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnsortedSegmentJoinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnsortedSegmentJoin::new().build(inputs, segment_ids, num_segments, scope)`. -pub fn unsorted_segment_join< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - inputs: O0, - segment_ids: O1, - num_segments: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unsorted_segment_join, O1: ::std::convert::Into, O2: ::std::convert::Into>(inputs: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { UnsortedSegmentJoin::new().build(inputs, segment_ids, num_segments, scope) } + /// Builder for the `UnsortedSegmentMax` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnsortedSegmentMax { @@ -130001,6 +156444,12 @@ pub struct UnsortedSegmentMax { Tnumsegments: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnsortedSegmentMax' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnsortedSegmentMaxInst { + /// An instance of a fully built UnsortedSegmentMax Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnsortedSegmentMax { /// Creates a new `UnsortedSegmentMax`. @@ -130015,19 +156464,13 @@ impl UnsortedSegmentMax { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } /// Sets the `Tnumsegments` attribute. - pub fn Tnumsegments>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tnumsegments>(mut self, value: ArgType) -> Self { self.Tnumsegments = ::std::option::Option::Some(value.into()); self } @@ -130039,27 +156482,10 @@ impl UnsortedSegmentMax { } /// Builds the `UnsortedSegmentMax` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - data: O0, - segment_ids: O1, - num_segments: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), segment_ids.into(), num_segments.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - segment_ids: crate::Output, - num_segments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnsortedSegmentMax", |nd| { nd.add_input(data); nd.add_input(segment_ids); @@ -130067,33 +156493,64 @@ impl UnsortedSegmentMax { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tnumsegments { - nd.set_attr_type("Tnumsegments", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnsortedSegmentMax` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnsortedSegmentMax", |nd| { + nd.add_input(data); + nd.add_input(segment_ids); + nd.add_input(num_segments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnsortedSegmentMaxInst{op}) + } +} +impl UnsortedSegmentMaxInst { + /// Returns the 'output' output of this 'UnsortedSegmentMax' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnsortedSegmentMaxInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnsortedSegmentMax::new().build(data, segment_ids, num_segments, scope)`. -pub fn unsorted_segment_max< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - data: O0, - segment_ids: O1, - num_segments: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unsorted_segment_max, O1: ::std::convert::Into, O2: ::std::convert::Into>(data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { UnsortedSegmentMax::new().build(data, segment_ids, num_segments, scope) } + /// Builder for the `UnsortedSegmentMin` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnsortedSegmentMin { @@ -130102,6 +156559,12 @@ pub struct UnsortedSegmentMin { Tnumsegments: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnsortedSegmentMin' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnsortedSegmentMinInst { + /// An instance of a fully built UnsortedSegmentMin Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnsortedSegmentMin { /// Creates a new `UnsortedSegmentMin`. @@ -130116,19 +156579,13 @@ impl UnsortedSegmentMin { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } /// Sets the `Tnumsegments` attribute. - pub fn Tnumsegments>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tnumsegments>(mut self, value: ArgType) -> Self { self.Tnumsegments = ::std::option::Option::Some(value.into()); self } @@ -130140,27 +156597,10 @@ impl UnsortedSegmentMin { } /// Builds the `UnsortedSegmentMin` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - data: O0, - segment_ids: O1, - num_segments: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), segment_ids.into(), num_segments.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - segment_ids: crate::Output, - num_segments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnsortedSegmentMin", |nd| { nd.add_input(data); nd.add_input(segment_ids); @@ -130168,33 +156608,64 @@ impl UnsortedSegmentMin { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tnumsegments { - nd.set_attr_type("Tnumsegments", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnsortedSegmentMin` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnsortedSegmentMin", |nd| { + nd.add_input(data); + nd.add_input(segment_ids); + nd.add_input(num_segments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnsortedSegmentMinInst{op}) + } +} +impl UnsortedSegmentMinInst { + /// Returns the 'output' output of this 'UnsortedSegmentMin' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnsortedSegmentMinInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnsortedSegmentMin::new().build(data, segment_ids, num_segments, scope)`. -pub fn unsorted_segment_min< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - data: O0, - segment_ids: O1, - num_segments: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unsorted_segment_min, O1: ::std::convert::Into, O2: ::std::convert::Into>(data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { UnsortedSegmentMin::new().build(data, segment_ids, num_segments, scope) } + /// Builder for the `UnsortedSegmentProd` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnsortedSegmentProd { @@ -130203,6 +156674,12 @@ pub struct UnsortedSegmentProd { Tnumsegments: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnsortedSegmentProd' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnsortedSegmentProdInst { + /// An instance of a fully built UnsortedSegmentProd Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnsortedSegmentProd { /// Creates a new `UnsortedSegmentProd`. @@ -130217,19 +156694,13 @@ impl UnsortedSegmentProd { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } /// Sets the `Tnumsegments` attribute. - pub fn Tnumsegments>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tnumsegments>(mut self, value: ArgType) -> Self { self.Tnumsegments = ::std::option::Option::Some(value.into()); self } @@ -130241,27 +156712,10 @@ impl UnsortedSegmentProd { } /// Builds the `UnsortedSegmentProd` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - data: O0, - segment_ids: O1, - num_segments: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), segment_ids.into(), num_segments.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - segment_ids: crate::Output, - num_segments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnsortedSegmentProd", |nd| { nd.add_input(data); nd.add_input(segment_ids); @@ -130269,33 +156723,64 @@ impl UnsortedSegmentProd { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tnumsegments { - nd.set_attr_type("Tnumsegments", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnsortedSegmentProd` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnsortedSegmentProd", |nd| { + nd.add_input(data); + nd.add_input(segment_ids); + nd.add_input(num_segments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnsortedSegmentProdInst{op}) + } +} +impl UnsortedSegmentProdInst { + /// Returns the 'output' output of this 'UnsortedSegmentProd' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnsortedSegmentProdInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnsortedSegmentProd::new().build(data, segment_ids, num_segments, scope)`. -pub fn unsorted_segment_prod< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - data: O0, - segment_ids: O1, - num_segments: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unsorted_segment_prod, O1: ::std::convert::Into, O2: ::std::convert::Into>(data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { UnsortedSegmentProd::new().build(data, segment_ids, num_segments, scope) } + /// Builder for the `UnsortedSegmentSum` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnsortedSegmentSum { @@ -130304,6 +156789,12 @@ pub struct UnsortedSegmentSum { Tnumsegments: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UnsortedSegmentSum' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnsortedSegmentSumInst { + /// An instance of a fully built UnsortedSegmentSum Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnsortedSegmentSum { /// Creates a new `UnsortedSegmentSum`. @@ -130318,19 +156809,13 @@ impl UnsortedSegmentSum { } /// Sets the `Tindices` attribute. - pub fn Tindices>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tindices>(mut self, value: ArgType) -> Self { self.Tindices = ::std::option::Option::Some(value.into()); self } /// Sets the `Tnumsegments` attribute. - pub fn Tnumsegments>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tnumsegments>(mut self, value: ArgType) -> Self { self.Tnumsegments = ::std::option::Option::Some(value.into()); self } @@ -130342,27 +156827,10 @@ impl UnsortedSegmentSum { } /// Builds the `UnsortedSegmentSum` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - data: O0, - segment_ids: O1, - num_segments: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(data.into(), segment_ids.into(), num_segments.into(), scope) } - - fn build_impl( - &self, - data: crate::Output, - segment_ids: crate::Output, - num_segments: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, data: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnsortedSegmentSum", |nd| { nd.add_input(data); nd.add_input(segment_ids); @@ -130370,33 +156838,64 @@ impl UnsortedSegmentSum { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tindices { - nd.set_attr_type("Tindices", *value)?; - } - if let ::std::option::Option::Some(value) = &self.Tnumsegments { - nd.set_attr_type("Tnumsegments", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnsortedSegmentSum` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(data.into(), segment_ids.into(), num_segments.into(), scope) + } + fn build_instance_impl(&self, data: crate::Output, segment_ids: crate::Output, num_segments: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnsortedSegmentSum", |nd| { + nd.add_input(data); + nd.add_input(segment_ids); + nd.add_input(num_segments); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tindices { + nd.set_attr_type("Tindices", *value)?; + } + if let ::std::option::Option::Some(value) = &self.Tnumsegments { + nd.set_attr_type("Tnumsegments", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnsortedSegmentSumInst{op}) + } +} +impl UnsortedSegmentSumInst { + /// Returns the 'output' output of this 'UnsortedSegmentSum' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnsortedSegmentSumInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnsortedSegmentSum::new().build(data, segment_ids, num_segments, scope)`. -pub fn unsorted_segment_sum< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - data: O0, - segment_ids: O1, - num_segments: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unsorted_segment_sum, O1: ::std::convert::Into, O2: ::std::convert::Into>(data: O0, segment_ids: O1, num_segments: O2, scope: &mut crate::Scope) -> crate::Result { UnsortedSegmentSum::new().build(data, segment_ids, num_segments, scope) } + /// Builder for the `Unstage` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Unstage { @@ -130407,6 +156906,12 @@ pub struct Unstage { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Unstage' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnstageInst { + /// An instance of a fully built Unstage Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Unstage { /// Creates a new `Unstage`. @@ -130427,28 +156932,19 @@ impl Unstage { } /// Sets the `dtypes` attribute. - pub fn dtypes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn dtypes>>(mut self, value: ArgType) -> Self { self.dtypes = ::std::option::Option::Some(value.into()); self } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -130460,44 +156956,92 @@ impl Unstage { } /// Builds the `Unstage` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Unstage", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.capacity { - nd.set_attr_int("capacity", *value)?; - } - if let ::std::option::Option::Some(value) = &self.memory_limit { - nd.set_attr_int("memory_limit", *value)?; - } - if let ::std::option::Option::Some(value) = &self.dtypes { - nd.set_attr_type_list("dtypes", value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Unstage` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Unstage", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.capacity { + nd.set_attr_int("capacity", *value)?; + } + if let ::std::option::Option::Some(value) = &self.memory_limit { + nd.set_attr_int("memory_limit", *value)?; + } + if let ::std::option::Option::Some(value) = &self.dtypes { + nd.set_attr_type_list("dtypes", value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UnstageInst{op}) + } +} +impl UnstageInst { + /// Returns the 'values' output of this 'Unstage' operation. + pub fn values(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnstageInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Unstage::new().build(scope)`. -pub fn unstage(scope: &mut crate::Scope) -> crate::Result { +pub fn unstage<>(scope: &mut crate::Scope) -> crate::Result { Unstage::new().build(scope) } + /// Builder for the `UnwrapDatasetVariant` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UnwrapDatasetVariant { control_inputs: ::std::vec::Vec, } +/// An instance of 'UnwrapDatasetVariant' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UnwrapDatasetVariantInst { + /// An instance of a fully built UnwrapDatasetVariant Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UnwrapDatasetVariant { /// Creates a new `UnwrapDatasetVariant`. @@ -130512,19 +157056,10 @@ impl UnwrapDatasetVariant { } /// Builds the `UnwrapDatasetVariant` operation. - pub fn build>( - &self, - input_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UnwrapDatasetVariant", |nd| { nd.add_input(input_handle); for op in &self.control_inputs { @@ -130533,15 +157068,41 @@ impl UnwrapDatasetVariant { ::std::result::Result::Ok(()) }) } -} + /// Builds the `UnwrapDatasetVariant` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UnwrapDatasetVariant", |nd| { + nd.add_input(input_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(UnwrapDatasetVariantInst{op}) + } +} +impl UnwrapDatasetVariantInst { + /// Returns the 'output_handle' output of this 'UnwrapDatasetVariant' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UnwrapDatasetVariantInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UnwrapDatasetVariant::new().build(input_handle, scope)`. -pub fn unwrap_dataset_variant>( - input_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn unwrap_dataset_variant>(input_handle: O0, scope: &mut crate::Scope) -> crate::Result { UnwrapDatasetVariant::new().build(input_handle, scope) } + /// Builder for the `UpperBound` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct UpperBound { @@ -130549,6 +157110,12 @@ pub struct UpperBound { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'UpperBound' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct UpperBoundInst { + /// An instance of a fully built UpperBound Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl UpperBound { /// Creates a new `UpperBound`. @@ -130563,10 +157130,7 @@ impl UpperBound { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -130578,52 +157142,67 @@ impl UpperBound { } /// Builds the `UpperBound` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - sorted_inputs: O0, - values: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, sorted_inputs: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(sorted_inputs.into(), values.into(), scope) } - - fn build_impl( - &self, - sorted_inputs: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, sorted_inputs: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("UpperBound", |nd| { nd.add_input(sorted_inputs); nd.add_input(values); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `UpperBound` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, sorted_inputs: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(sorted_inputs.into(), values.into(), scope) + } + fn build_instance_impl(&self, sorted_inputs: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("UpperBound", |nd| { + nd.add_input(sorted_inputs); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(UpperBoundInst{op}) + } +} +impl UpperBoundInst { + /// Returns the 'output' output of this 'UpperBound' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for UpperBoundInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `UpperBound::new().build(sorted_inputs, values, scope)`. -pub fn upper_bound< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - sorted_inputs: O0, - values: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn upper_bound, O1: ::std::convert::Into>(sorted_inputs: O0, values: O1, scope: &mut crate::Scope) -> crate::Result { UpperBound::new().build(sorted_inputs, values, scope) } + /// Builder for the `VarHandleOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct VarHandleOp { @@ -130634,6 +157213,12 @@ pub struct VarHandleOp { allowed_devices: ::std::option::Option<::std::vec::Vec<::std::string::String>>, control_inputs: ::std::vec::Vec, } +/// An instance of 'VarHandleOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct VarHandleOpInst { + /// An instance of a fully built VarHandleOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl VarHandleOp { /// Creates a new `VarHandleOp`. @@ -130642,19 +157227,13 @@ impl VarHandleOp { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -130672,12 +157251,7 @@ impl VarHandleOp { } /// Sets the `allowed_devices` attribute. - pub fn allowed_devices< - ArgType: ::std::convert::Into<::std::vec::Vec<::std::string::String>>, - >( - mut self, - value: ArgType, - ) -> Self { + pub fn allowed_devices>>(mut self, value: ArgType) -> Self { self.allowed_devices = ::std::option::Option::Some(value.into()); self } @@ -130689,44 +157263,92 @@ impl VarHandleOp { } /// Builds the `VarHandleOp` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("VarHandleOp", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.allowed_devices { - nd.set_attr_string_list("allowed_devices", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.allowed_devices { + nd.set_attr_string_list("allowed_devices", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `VarHandleOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("VarHandleOp", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.allowed_devices { + nd.set_attr_string_list("allowed_devices", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(VarHandleOpInst{op}) + } +} +impl VarHandleOpInst { + /// Returns the 'resource' output of this 'VarHandleOp' operation. + pub fn resource(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for VarHandleOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `VarHandleOp::new().build(scope)`. -pub fn var_handle_op(scope: &mut crate::Scope) -> crate::Result { +pub fn var_handle_op<>(scope: &mut crate::Scope) -> crate::Result { VarHandleOp::new().build(scope) } + /// Builder for the `VarIsInitializedOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct VarIsInitializedOp { control_inputs: ::std::vec::Vec, } +/// An instance of 'VarIsInitializedOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct VarIsInitializedOpInst { + /// An instance of a fully built VarIsInitializedOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl VarIsInitializedOp { /// Creates a new `VarIsInitializedOp`. @@ -130741,19 +157363,10 @@ impl VarIsInitializedOp { } /// Builds the `VarIsInitializedOp` operation. - pub fn build>( - &self, - resource: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(resource.into(), scope) } - - fn build_impl( - &self, - resource: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("VarIsInitializedOp", |nd| { nd.add_input(resource); for op in &self.control_inputs { @@ -130762,15 +157375,41 @@ impl VarIsInitializedOp { ::std::result::Result::Ok(()) }) } -} + /// Builds the `VarIsInitializedOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, resource: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(resource.into(), scope) + } + fn build_instance_impl(&self, resource: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("VarIsInitializedOp", |nd| { + nd.add_input(resource); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(VarIsInitializedOpInst{op}) + } +} +impl VarIsInitializedOpInst { + /// Returns the 'is_initialized' output of this 'VarIsInitializedOp' operation. + pub fn is_initialized(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for VarIsInitializedOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `VarIsInitializedOp::new().build(resource, scope)`. -pub fn var_is_initialized_op>( - resource: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn var_is_initialized_op>(resource: O0, scope: &mut crate::Scope) -> crate::Result { VarIsInitializedOp::new().build(resource, scope) } + /// Builder for the `Variable` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Variable { @@ -130780,6 +157419,12 @@ pub struct Variable { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'Variable' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct VariableInst { + /// An instance of a fully built Variable Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Variable { /// Creates a new `Variable`. @@ -130800,19 +157445,13 @@ impl Variable { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -130824,42 +157463,87 @@ impl Variable { } /// Builds the `Variable` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Variable", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Variable` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Variable", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(VariableInst{op}) + } +} +impl VariableInst { + /// Returns the 'ref_' output of this 'Variable' operation. + pub fn ref_(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for VariableInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Variable::new().build(scope)`. -pub fn variable(scope: &mut crate::Scope) -> crate::Result { +pub fn variable<>(scope: &mut crate::Scope) -> crate::Result { Variable::new().build(scope) } + /// Builder for the `VariableShape` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct VariableShape { out_type: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'VariableShape' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct VariableShapeInst { + /// An instance of a fully built VariableShape Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl VariableShape { /// Creates a new `VariableShape`. @@ -130868,10 +157552,7 @@ impl VariableShape { } /// Sets the `out_type` attribute. - pub fn out_type>( - mut self, - value: ArgType, - ) -> Self { + pub fn out_type>(mut self, value: ArgType) -> Self { self.out_type = ::std::option::Option::Some(value.into()); self } @@ -130883,39 +157564,59 @@ impl VariableShape { } /// Builds the `VariableShape` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("VariableShape", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.out_type { - nd.set_attr_type("out_type", *value)?; - } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `VariableShape` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("VariableShape", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.out_type { + nd.set_attr_type("out_type", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(VariableShapeInst{op}) + } +} +impl VariableShapeInst { + /// Returns the 'output' output of this 'VariableShape' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for VariableShapeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `VariableShape::new().build(input, scope)`. -pub fn variable_shape>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn variable_shape>(input: O0, scope: &mut crate::Scope) -> crate::Result { VariableShape::new().build(input, scope) } + /// Builder for the `VariableV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct VariableV2 { @@ -130925,6 +157626,12 @@ pub struct VariableV2 { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'VariableV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct VariableV2Inst { + /// An instance of a fully built VariableV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl VariableV2 { /// Creates a new `VariableV2`. @@ -130945,19 +157652,13 @@ impl VariableV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -130969,42 +157670,87 @@ impl VariableV2 { } /// Builds the `VariableV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("VariableV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.dtype { - nd.set_attr_type("dtype", *value)?; - } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `VariableV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("VariableV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.dtype { + nd.set_attr_type("dtype", *value)?; + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(VariableV2Inst{op}) + } +} +impl VariableV2Inst { + /// Returns the 'ref_' output of this 'VariableV2' operation. + pub fn ref_(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for VariableV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `VariableV2::new().build(scope)`. -pub fn variable_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn variable_v2<>(scope: &mut crate::Scope) -> crate::Result { VariableV2::new().build(scope) } + /// Builder for the `Where` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Where { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Where' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WhereInst { + /// An instance of a fully built Where Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Where { /// Creates a new `Where`. @@ -131025,39 +157771,59 @@ impl Where { } /// Builds the `Where` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Where", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Where` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Where", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WhereInst{op}) + } +} +impl WhereInst { + /// Returns the 'index' output of this 'Where' operation. + pub fn index(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for WhereInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Where::new().build(input, scope)`. -pub fn where_>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn where_>(input: O0, scope: &mut crate::Scope) -> crate::Result { Where::new().build(input, scope) } + /// Builder for the `While` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct While { @@ -131068,6 +157834,12 @@ pub struct While { parallel_iterations: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'While' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WhileInst { + /// An instance of a fully built While Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl While { /// Creates a new `While`. @@ -131076,46 +157848,31 @@ impl While { } /// Sets the `T` attribute. - pub fn T>>( - mut self, - value: ArgType, - ) -> Self { + pub fn T>>(mut self, value: ArgType) -> Self { self.T = ::std::option::Option::Some(value.into()); self } /// Sets the `cond` attribute. - pub fn cond>( - mut self, - value: ArgType, - ) -> Self { + pub fn cond>(mut self, value: ArgType) -> Self { self.cond = ::std::option::Option::Some(value.into()); self } /// Sets the `body` attribute. - pub fn body>( - mut self, - value: ArgType, - ) -> Self { + pub fn body>(mut self, value: ArgType) -> Self { self.body = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `parallel_iterations` attribute. - pub fn parallel_iterations>( - mut self, - value: ArgType, - ) -> Self { + pub fn parallel_iterations>(mut self, value: ArgType) -> Self { self.parallel_iterations = ::std::option::Option::Some(value.into()); self } @@ -131127,51 +157884,83 @@ impl While { } /// Builds the `While` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("While", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type_list("T", value)?; - } - if let ::std::option::Option::Some(value) = &self.cond { - nd.set_attr_string("cond", value)?; - } - if let ::std::option::Option::Some(value) = &self.body { - nd.set_attr_string("body", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.parallel_iterations { - nd.set_attr_int("parallel_iterations", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.cond { + nd.set_attr_string("cond", value)?; + } + if let ::std::option::Option::Some(value) = &self.body { + nd.set_attr_string("body", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.parallel_iterations { + nd.set_attr_int("parallel_iterations", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `While` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("While", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type_list("T", value)?; + } + if let ::std::option::Option::Some(value) = &self.cond { + nd.set_attr_string("cond", value)?; + } + if let ::std::option::Option::Some(value) = &self.body { + nd.set_attr_string("body", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.parallel_iterations { + nd.set_attr_int("parallel_iterations", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WhileInst{op}) + } +} +impl WhileInst { + /// Returns the 'output' output of this 'While' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for WhileInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `While::new().build(input, scope)`. -pub fn while_>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn while_>(input: O0, scope: &mut crate::Scope) -> crate::Result { While::new().build(input, scope) } + /// Builder for the `WholeFileReader` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WholeFileReader { @@ -131179,6 +157968,12 @@ pub struct WholeFileReader { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'WholeFileReader' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WholeFileReaderInst { + /// An instance of a fully built WholeFileReader Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WholeFileReader { /// Creates a new `WholeFileReader`. @@ -131187,19 +157982,13 @@ impl WholeFileReader { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -131211,30 +158000,63 @@ impl WholeFileReader { } /// Builds the `WholeFileReader` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WholeFileReader", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `WholeFileReader` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WholeFileReader", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WholeFileReaderInst{op}) + } +} +impl WholeFileReaderInst { + /// Returns the 'reader_handle' output of this 'WholeFileReader' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for WholeFileReaderInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WholeFileReader::new().build(scope)`. -pub fn whole_file_reader(scope: &mut crate::Scope) -> crate::Result { +pub fn whole_file_reader<>(scope: &mut crate::Scope) -> crate::Result { WholeFileReader::new().build(scope) } + /// Builder for the `WholeFileReaderV2` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WholeFileReaderV2 { @@ -131242,6 +158064,12 @@ pub struct WholeFileReaderV2 { shared_name: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'WholeFileReaderV2' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WholeFileReaderV2Inst { + /// An instance of a fully built WholeFileReaderV2 Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WholeFileReaderV2 { /// Creates a new `WholeFileReaderV2`. @@ -131250,19 +158078,13 @@ impl WholeFileReaderV2 { } /// Sets the `container` attribute. - pub fn container>( - mut self, - value: ArgType, - ) -> Self { + pub fn container>(mut self, value: ArgType) -> Self { self.container = ::std::option::Option::Some(value.into()); self } /// Sets the `shared_name` attribute. - pub fn shared_name>( - mut self, - value: ArgType, - ) -> Self { + pub fn shared_name>(mut self, value: ArgType) -> Self { self.shared_name = ::std::option::Option::Some(value.into()); self } @@ -131274,30 +158096,63 @@ impl WholeFileReaderV2 { } /// Builds the `WholeFileReaderV2` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WholeFileReaderV2", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.container { - nd.set_attr_string("container", value)?; - } - if let ::std::option::Option::Some(value) = &self.shared_name { - nd.set_attr_string("shared_name", value)?; - } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `WholeFileReaderV2` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WholeFileReaderV2", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.container { + nd.set_attr_string("container", value)?; + } + if let ::std::option::Option::Some(value) = &self.shared_name { + nd.set_attr_string("shared_name", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WholeFileReaderV2Inst{op}) + } +} +impl WholeFileReaderV2Inst { + /// Returns the 'reader_handle' output of this 'WholeFileReaderV2' operation. + pub fn reader_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for WholeFileReaderV2Inst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WholeFileReaderV2::new().build(scope)`. -pub fn whole_file_reader_v2(scope: &mut crate::Scope) -> crate::Result { +pub fn whole_file_reader_v2<>(scope: &mut crate::Scope) -> crate::Result { WholeFileReaderV2::new().build(scope) } + /// Builder for the `WindowDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WindowDataset { @@ -131306,6 +158161,12 @@ pub struct WindowDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'WindowDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WindowDatasetInst { + /// An instance of a fully built WindowDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WindowDataset { /// Creates a new `WindowDataset`. @@ -131314,28 +158175,19 @@ impl WindowDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -131347,40 +158199,10 @@ impl WindowDataset { } /// Builds the `WindowDataset` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - input_dataset: O0, - size: O1, - shift: O2, - stride: O3, - drop_remainder: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - input_dataset.into(), - size.into(), - shift.into(), - stride.into(), - drop_remainder.into(), - scope, - ) - } - - fn build_impl( - &self, - input_dataset: crate::Output, - size: crate::Output, - shift: crate::Output, - stride: crate::Output, - drop_remainder: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, size: O1, shift: O2, stride: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(input_dataset.into(), size.into(), shift.into(), stride.into(), drop_remainder.into(), scope) + } + fn build_impl(&self, input_dataset: crate::Output, size: crate::Output, shift: crate::Output, stride: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WindowDataset", |nd| { nd.add_input(input_dataset); nd.add_input(size); @@ -131390,37 +158212,66 @@ impl WindowDataset { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `WindowDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, input_dataset: O0, size: O1, shift: O2, stride: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_dataset.into(), size.into(), shift.into(), stride.into(), drop_remainder.into(), scope) + } + fn build_instance_impl(&self, input_dataset: crate::Output, size: crate::Output, shift: crate::Output, stride: crate::Output, drop_remainder: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WindowDataset", |nd| { + nd.add_input(input_dataset); + nd.add_input(size); + nd.add_input(shift); + nd.add_input(stride); + nd.add_input(drop_remainder); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WindowDatasetInst{op}) + } +} +impl WindowDatasetInst { + /// Returns the 'handle' output of this 'WindowDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for WindowDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WindowDataset::new().build(input_dataset, size, shift, stride, drop_remainder, scope)`. -pub fn window_dataset< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - input_dataset: O0, - size: O1, - shift: O2, - stride: O3, - drop_remainder: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn window_dataset, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(input_dataset: O0, size: O1, shift: O2, stride: O3, drop_remainder: O4, scope: &mut crate::Scope) -> crate::Result { WindowDataset::new().build(input_dataset, size, shift, stride, drop_remainder, scope) } + /// Builder for the `WindowOp` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WindowOp { @@ -131429,6 +158280,12 @@ pub struct WindowOp { Tinputs: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'WindowOp' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WindowOpInst { + /// An instance of a fully built WindowOp Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WindowOp { /// Creates a new `WindowOp`. @@ -131437,28 +158294,19 @@ impl WindowOp { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `Tinputs` attribute. - pub fn Tinputs>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinputs>>(mut self, value: ArgType) -> Self { self.Tinputs = ::std::option::Option::Some(value.into()); self } @@ -131470,50 +158318,82 @@ impl WindowOp { } /// Builds the `WindowOp` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WindowOp", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.Tinputs { - nd.set_attr_type_list("Tinputs", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinputs { + nd.set_attr_type_list("Tinputs", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `WindowOp` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WindowOp", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.Tinputs { + nd.set_attr_type_list("Tinputs", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WindowOpInst{op}) + } +} +impl WindowOpInst { + /// Returns the 'handle' output of this 'WindowOp' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for WindowOpInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WindowOp::new().build(inputs, scope)`. -pub fn window_op>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn window_op>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { WindowOp::new().build(inputs, scope) } + /// Builder for the `WorkerHeartbeat` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WorkerHeartbeat { control_inputs: ::std::vec::Vec, } +/// An instance of 'WorkerHeartbeat' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WorkerHeartbeatInst { + /// An instance of a fully built WorkerHeartbeat Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WorkerHeartbeat { /// Creates a new `WorkerHeartbeat`. @@ -131528,19 +158408,10 @@ impl WorkerHeartbeat { } /// Builds the `WorkerHeartbeat` operation. - pub fn build>( - &self, - request: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, request: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(request.into(), scope) } - - fn build_impl( - &self, - request: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, request: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WorkerHeartbeat", |nd| { nd.add_input(request); for op in &self.control_inputs { @@ -131549,20 +158420,52 @@ impl WorkerHeartbeat { ::std::result::Result::Ok(()) }) } -} + /// Builds the `WorkerHeartbeat` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, request: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(request.into(), scope) + } + fn build_instance_impl(&self, request: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WorkerHeartbeat", |nd| { + nd.add_input(request); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(WorkerHeartbeatInst{op}) + } +} +impl WorkerHeartbeatInst { + /// Returns the 'response' output of this 'WorkerHeartbeat' operation. + pub fn response(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for WorkerHeartbeatInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WorkerHeartbeat::new().build(request, scope)`. -pub fn worker_heartbeat>( - request: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn worker_heartbeat>(request: O0, scope: &mut crate::Scope) -> crate::Result { WorkerHeartbeat::new().build(request, scope) } + /// Builder for the `WrapDatasetVariant` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WrapDatasetVariant { control_inputs: ::std::vec::Vec, } +/// An instance of 'WrapDatasetVariant' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WrapDatasetVariantInst { + /// An instance of a fully built WrapDatasetVariant Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WrapDatasetVariant { /// Creates a new `WrapDatasetVariant`. @@ -131577,19 +158480,10 @@ impl WrapDatasetVariant { } /// Builds the `WrapDatasetVariant` operation. - pub fn build>( - &self, - input_handle: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_handle.into(), scope) } - - fn build_impl( - &self, - input_handle: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WrapDatasetVariant", |nd| { nd.add_input(input_handle); for op in &self.control_inputs { @@ -131598,21 +158492,53 @@ impl WrapDatasetVariant { ::std::result::Result::Ok(()) }) } -} + /// Builds the `WrapDatasetVariant` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_handle: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_handle.into(), scope) + } + fn build_instance_impl(&self, input_handle: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WrapDatasetVariant", |nd| { + nd.add_input(input_handle); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(WrapDatasetVariantInst{op}) + } +} +impl WrapDatasetVariantInst { + /// Returns the 'output_handle' output of this 'WrapDatasetVariant' operation. + pub fn output_handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for WrapDatasetVariantInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WrapDatasetVariant::new().build(input_handle, scope)`. -pub fn wrap_dataset_variant>( - input_handle: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn wrap_dataset_variant>(input_handle: O0, scope: &mut crate::Scope) -> crate::Result { WrapDatasetVariant::new().build(input_handle, scope) } + /// Builder for the `WriteAudioSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WriteAudioSummary { max_outputs: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'WriteAudioSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WriteAudioSummaryInst { + /// An instance of a fully built WriteAudioSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WriteAudioSummary { /// Creates a new `WriteAudioSummary`. @@ -131633,40 +158559,10 @@ impl WriteAudioSummary { } /// Builds the `WriteAudioSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - writer: O0, - step: O1, - tag: O2, - tensor: O3, - sample_rate: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - writer.into(), - step.into(), - tag.into(), - tensor.into(), - sample_rate.into(), - scope, - ) - } - - fn build_impl( - &self, - writer: crate::Output, - step: crate::Output, - tag: crate::Output, - tensor: crate::Output, - sample_rate: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, writer: O0, step: O1, tag: O2, tensor: O3, sample_rate: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(writer.into(), step.into(), tag.into(), tensor.into(), sample_rate.into(), scope) + } + fn build_impl(&self, writer: crate::Output, step: crate::Output, tag: crate::Output, tensor: crate::Output, sample_rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WriteAudioSummary", |nd| { nd.add_input(writer); nd.add_input(step); @@ -131676,36 +158572,58 @@ impl WriteAudioSummary { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.max_outputs { - nd.set_attr_int("max_outputs", *value)?; - } + if let ::std::option::Option::Some(value) = &self.max_outputs { + nd.set_attr_int("max_outputs", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `WriteAudioSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, writer: O0, step: O1, tag: O2, tensor: O3, sample_rate: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), step.into(), tag.into(), tensor.into(), sample_rate.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, step: crate::Output, tag: crate::Output, tensor: crate::Output, sample_rate: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WriteAudioSummary", |nd| { + nd.add_input(writer); + nd.add_input(step); + nd.add_input(tag); + nd.add_input(tensor); + nd.add_input(sample_rate); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.max_outputs { + nd.set_attr_int("max_outputs", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WriteAudioSummaryInst{op}) + } +} +impl WriteAudioSummaryInst { +} +impl Into for WriteAudioSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WriteAudioSummary::new().build(writer, step, tag, tensor, sample_rate, scope)`. -pub fn write_audio_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - writer: O0, - step: O1, - tag: O2, - tensor: O3, - sample_rate: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn write_audio_summary, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(writer: O0, step: O1, tag: O2, tensor: O3, sample_rate: O4, scope: &mut crate::Scope) -> crate::Result { WriteAudioSummary::new().build(writer, step, tag, tensor, sample_rate, scope) } + /// Builder for the `WriteFile` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WriteFile { control_inputs: ::std::vec::Vec, } +/// An instance of 'WriteFile' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WriteFileInst { + /// An instance of a fully built WriteFile Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WriteFile { /// Creates a new `WriteFile`. @@ -131720,24 +158638,10 @@ impl WriteFile { } /// Builds the `WriteFile` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - filename: O0, - contents: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, filename: O0, contents: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(filename.into(), contents.into(), scope) } - - fn build_impl( - &self, - filename: crate::Output, - contents: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, filename: crate::Output, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WriteFile", |nd| { nd.add_input(filename); nd.add_input(contents); @@ -131747,24 +158651,46 @@ impl WriteFile { ::std::result::Result::Ok(()) }) } -} + /// Builds the `WriteFile` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, filename: O0, contents: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(filename.into(), contents.into(), scope) + } + fn build_instance_impl(&self, filename: crate::Output, contents: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WriteFile", |nd| { + nd.add_input(filename); + nd.add_input(contents); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(WriteFileInst{op}) + } +} +impl WriteFileInst { +} +impl Into for WriteFileInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WriteFile::new().build(filename, contents, scope)`. -pub fn write_file< - O0: ::std::convert::Into, - O1: ::std::convert::Into, ->( - filename: O0, - contents: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn write_file, O1: ::std::convert::Into>(filename: O0, contents: O1, scope: &mut crate::Scope) -> crate::Result { WriteFile::new().build(filename, contents, scope) } + /// Builder for the `WriteGraphSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WriteGraphSummary { control_inputs: ::std::vec::Vec, } +/// An instance of 'WriteGraphSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WriteGraphSummaryInst { + /// An instance of a fully built WriteGraphSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WriteGraphSummary { /// Creates a new `WriteGraphSummary`. @@ -131779,27 +158705,10 @@ impl WriteGraphSummary { } /// Builds the `WriteGraphSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - writer: O0, - step: O1, - tensor: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, writer: O0, step: O1, tensor: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(writer.into(), step.into(), tensor.into(), scope) } - - fn build_impl( - &self, - writer: crate::Output, - step: crate::Output, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, writer: crate::Output, step: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WriteGraphSummary", |nd| { nd.add_input(writer); nd.add_input(step); @@ -131810,27 +158719,48 @@ impl WriteGraphSummary { ::std::result::Result::Ok(()) }) } -} + /// Builds the `WriteGraphSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, writer: O0, step: O1, tensor: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), step.into(), tensor.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, step: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WriteGraphSummary", |nd| { + nd.add_input(writer); + nd.add_input(step); + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(WriteGraphSummaryInst{op}) + } +} +impl WriteGraphSummaryInst { +} +impl Into for WriteGraphSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WriteGraphSummary::new().build(writer, step, tensor, scope)`. -pub fn write_graph_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - writer: O0, - step: O1, - tensor: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn write_graph_summary, O1: ::std::convert::Into, O2: ::std::convert::Into>(writer: O0, step: O1, tensor: O2, scope: &mut crate::Scope) -> crate::Result { WriteGraphSummary::new().build(writer, step, tensor, scope) } + /// Builder for the `WriteHistogramSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WriteHistogramSummary { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'WriteHistogramSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WriteHistogramSummaryInst { + /// An instance of a fully built WriteHistogramSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WriteHistogramSummary { /// Creates a new `WriteHistogramSummary`. @@ -131851,30 +158781,10 @@ impl WriteHistogramSummary { } /// Builds the `WriteHistogramSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - writer: O0, - step: O1, - tag: O2, - values: O3, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, writer: O0, step: O1, tag: O2, values: O3, scope: &mut crate::Scope) -> crate::Result { self.build_impl(writer.into(), step.into(), tag.into(), values.into(), scope) } - - fn build_impl( - &self, - writer: crate::Output, - step: crate::Output, - tag: crate::Output, - values: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, writer: crate::Output, step: crate::Output, tag: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WriteHistogramSummary", |nd| { nd.add_input(writer); nd.add_input(step); @@ -131883,29 +158793,46 @@ impl WriteHistogramSummary { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `WriteHistogramSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, writer: O0, step: O1, tag: O2, values: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), step.into(), tag.into(), values.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, step: crate::Output, tag: crate::Output, values: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WriteHistogramSummary", |nd| { + nd.add_input(writer); + nd.add_input(step); + nd.add_input(tag); + nd.add_input(values); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WriteHistogramSummaryInst{op}) + } +} +impl WriteHistogramSummaryInst { +} +impl Into for WriteHistogramSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WriteHistogramSummary::new().build(writer, step, tag, values, scope)`. -pub fn write_histogram_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - writer: O0, - step: O1, - tag: O2, - values: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn write_histogram_summary, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(writer: O0, step: O1, tag: O2, values: O3, scope: &mut crate::Scope) -> crate::Result { WriteHistogramSummary::new().build(writer, step, tag, values, scope) } + /// Builder for the `WriteImageSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WriteImageSummary { @@ -131913,6 +158840,12 @@ pub struct WriteImageSummary { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'WriteImageSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WriteImageSummaryInst { + /// An instance of a fully built WriteImageSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WriteImageSummary { /// Creates a new `WriteImageSummary`. @@ -131939,40 +158872,10 @@ impl WriteImageSummary { } /// Builds the `WriteImageSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - writer: O0, - step: O1, - tag: O2, - tensor: O3, - bad_color: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - writer.into(), - step.into(), - tag.into(), - tensor.into(), - bad_color.into(), - scope, - ) - } - - fn build_impl( - &self, - writer: crate::Output, - step: crate::Output, - tag: crate::Output, - tensor: crate::Output, - bad_color: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, writer: O0, step: O1, tag: O2, tensor: O3, bad_color: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(writer.into(), step.into(), tag.into(), tensor.into(), bad_color.into(), scope) + } + fn build_impl(&self, writer: crate::Output, step: crate::Output, tag: crate::Output, tensor: crate::Output, bad_color: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WriteImageSummary", |nd| { nd.add_input(writer); nd.add_input(step); @@ -131982,39 +158885,64 @@ impl WriteImageSummary { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.max_images { - nd.set_attr_int("max_images", *value)?; - } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.max_images { + nd.set_attr_int("max_images", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `WriteImageSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, writer: O0, step: O1, tag: O2, tensor: O3, bad_color: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), step.into(), tag.into(), tensor.into(), bad_color.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, step: crate::Output, tag: crate::Output, tensor: crate::Output, bad_color: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WriteImageSummary", |nd| { + nd.add_input(writer); + nd.add_input(step); + nd.add_input(tag); + nd.add_input(tensor); + nd.add_input(bad_color); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.max_images { + nd.set_attr_int("max_images", *value)?; + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WriteImageSummaryInst{op}) + } +} +impl WriteImageSummaryInst { +} +impl Into for WriteImageSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WriteImageSummary::new().build(writer, step, tag, tensor, bad_color, scope)`. -pub fn write_image_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - writer: O0, - step: O1, - tag: O2, - tensor: O3, - bad_color: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn write_image_summary, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(writer: O0, step: O1, tag: O2, tensor: O3, bad_color: O4, scope: &mut crate::Scope) -> crate::Result { WriteImageSummary::new().build(writer, step, tag, tensor, bad_color, scope) } + /// Builder for the `WriteRawProtoSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WriteRawProtoSummary { control_inputs: ::std::vec::Vec, } +/// An instance of 'WriteRawProtoSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WriteRawProtoSummaryInst { + /// An instance of a fully built WriteRawProtoSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WriteRawProtoSummary { /// Creates a new `WriteRawProtoSummary`. @@ -132029,27 +158957,10 @@ impl WriteRawProtoSummary { } /// Builds the `WriteRawProtoSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - >( - &self, - writer: O0, - step: O1, - tensor: O2, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, writer: O0, step: O1, tensor: O2, scope: &mut crate::Scope) -> crate::Result { self.build_impl(writer.into(), step.into(), tensor.into(), scope) } - - fn build_impl( - &self, - writer: crate::Output, - step: crate::Output, - tensor: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, writer: crate::Output, step: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WriteRawProtoSummary", |nd| { nd.add_input(writer); nd.add_input(step); @@ -132060,27 +158971,48 @@ impl WriteRawProtoSummary { ::std::result::Result::Ok(()) }) } -} + /// Builds the `WriteRawProtoSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into>(&self, writer: O0, step: O1, tensor: O2, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), step.into(), tensor.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, step: crate::Output, tensor: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WriteRawProtoSummary", |nd| { + nd.add_input(writer); + nd.add_input(step); + nd.add_input(tensor); + for op in &self.control_inputs { + nd.add_control_input(op); + } + ::std::result::Result::Ok(()) + })?; + Ok(WriteRawProtoSummaryInst{op}) + } +} +impl WriteRawProtoSummaryInst { +} +impl Into for WriteRawProtoSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WriteRawProtoSummary::new().build(writer, step, tensor, scope)`. -pub fn write_raw_proto_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, ->( - writer: O0, - step: O1, - tensor: O2, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn write_raw_proto_summary, O1: ::std::convert::Into, O2: ::std::convert::Into>(writer: O0, step: O1, tensor: O2, scope: &mut crate::Scope) -> crate::Result { WriteRawProtoSummary::new().build(writer, step, tensor, scope) } + /// Builder for the `WriteScalarSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WriteScalarSummary { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'WriteScalarSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WriteScalarSummaryInst { + /// An instance of a fully built WriteScalarSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WriteScalarSummary { /// Creates a new `WriteScalarSummary`. @@ -132101,30 +159033,10 @@ impl WriteScalarSummary { } /// Builds the `WriteScalarSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - >( - &self, - writer: O0, - step: O1, - tag: O2, - value: O3, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, writer: O0, step: O1, tag: O2, value: O3, scope: &mut crate::Scope) -> crate::Result { self.build_impl(writer.into(), step.into(), tag.into(), value.into(), scope) } - - fn build_impl( - &self, - writer: crate::Output, - step: crate::Output, - tag: crate::Output, - value: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, writer: crate::Output, step: crate::Output, tag: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WriteScalarSummary", |nd| { nd.add_input(writer); nd.add_input(step); @@ -132133,35 +159045,58 @@ impl WriteScalarSummary { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `WriteScalarSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(&self, writer: O0, step: O1, tag: O2, value: O3, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), step.into(), tag.into(), value.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, step: crate::Output, tag: crate::Output, value: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WriteScalarSummary", |nd| { + nd.add_input(writer); + nd.add_input(step); + nd.add_input(tag); + nd.add_input(value); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WriteScalarSummaryInst{op}) + } +} +impl WriteScalarSummaryInst { +} +impl Into for WriteScalarSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WriteScalarSummary::new().build(writer, step, tag, value, scope)`. -pub fn write_scalar_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, ->( - writer: O0, - step: O1, - tag: O2, - value: O3, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn write_scalar_summary, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into>(writer: O0, step: O1, tag: O2, value: O3, scope: &mut crate::Scope) -> crate::Result { WriteScalarSummary::new().build(writer, step, tag, value, scope) } + /// Builder for the `WriteSummary` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct WriteSummary { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'WriteSummary' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct WriteSummaryInst { + /// An instance of a fully built WriteSummary Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl WriteSummary { /// Creates a new `WriteSummary`. @@ -132182,40 +159117,10 @@ impl WriteSummary { } /// Builds the `WriteSummary` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, - >( - &self, - writer: O0, - step: O1, - tensor: O2, - tag: O3, - summary_metadata: O4, - scope: &mut crate::Scope, - ) -> crate::Result { - self.build_impl( - writer.into(), - step.into(), - tensor.into(), - tag.into(), - summary_metadata.into(), - scope, - ) - } - - fn build_impl( - &self, - writer: crate::Output, - step: crate::Output, - tensor: crate::Output, - tag: crate::Output, - summary_metadata: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, writer: O0, step: O1, tensor: O2, tag: O3, summary_metadata: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_impl(writer.into(), step.into(), tensor.into(), tag.into(), summary_metadata.into(), scope) + } + fn build_impl(&self, writer: crate::Output, step: crate::Output, tensor: crate::Output, tag: crate::Output, summary_metadata: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("WriteSummary", |nd| { nd.add_input(writer); nd.add_input(step); @@ -132225,37 +159130,59 @@ impl WriteSummary { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `WriteSummary` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(&self, writer: O0, step: O1, tensor: O2, tag: O3, summary_metadata: O4, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(writer.into(), step.into(), tensor.into(), tag.into(), summary_metadata.into(), scope) + } + fn build_instance_impl(&self, writer: crate::Output, step: crate::Output, tensor: crate::Output, tag: crate::Output, summary_metadata: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("WriteSummary", |nd| { + nd.add_input(writer); + nd.add_input(step); + nd.add_input(tensor); + nd.add_input(tag); + nd.add_input(summary_metadata); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(WriteSummaryInst{op}) + } +} +impl WriteSummaryInst { +} +impl Into for WriteSummaryInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `WriteSummary::new().build(writer, step, tensor, tag, summary_metadata, scope)`. -pub fn write_summary< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - O2: ::std::convert::Into, - O3: ::std::convert::Into, - O4: ::std::convert::Into, ->( - writer: O0, - step: O1, - tensor: O2, - tag: O3, - summary_metadata: O4, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn write_summary, O1: ::std::convert::Into, O2: ::std::convert::Into, O3: ::std::convert::Into, O4: ::std::convert::Into>(writer: O0, step: O1, tensor: O2, tag: O3, summary_metadata: O4, scope: &mut crate::Scope) -> crate::Result { WriteSummary::new().build(writer, step, tensor, tag, summary_metadata, scope) } + /// Builder for the `Xdivy` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Xdivy { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Xdivy' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct XdivyInst { + /// An instance of a fully built Xdivy Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Xdivy { /// Creates a new `Xdivy`. @@ -132276,46 +159203,61 @@ impl Xdivy { } /// Builds the `Xdivy` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Xdivy", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Xdivy` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Xdivy", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(XdivyInst{op}) + } +} +impl XdivyInst { + /// Returns the 'z' output of this 'Xdivy' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for XdivyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Xdivy::new().build(x, y, scope)`. -pub fn xdivy, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn xdivy, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Xdivy::new().build(x, y, scope) } + /// Builder for the `XlaConcatND` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct XlaConcatND { @@ -132325,6 +159267,12 @@ pub struct XlaConcatND { paddings: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'XlaConcatND' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct XlaConcatNDInst { + /// An instance of a fully built XlaConcatND Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl XlaConcatND { /// Creates a new `XlaConcatND`. @@ -132345,19 +159293,13 @@ impl XlaConcatND { } /// Sets the `num_concats` attribute. - pub fn num_concats>>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_concats>>(mut self, value: ArgType) -> Self { self.num_concats = ::std::option::Option::Some(value.into()); self } /// Sets the `paddings` attribute. - pub fn paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn paddings>>(mut self, value: ArgType) -> Self { self.paddings = ::std::option::Option::Some(value.into()); self } @@ -132369,48 +159311,77 @@ impl XlaConcatND { } /// Builds the `XlaConcatND` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("XlaConcatND", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_concats { - nd.set_attr_int_list("num_concats", value)?; - } - if let ::std::option::Option::Some(value) = &self.paddings { - nd.set_attr_int_list("paddings", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_concats { + nd.set_attr_int_list("num_concats", value)?; + } + if let ::std::option::Option::Some(value) = &self.paddings { + nd.set_attr_int_list("paddings", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `XlaConcatND` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("XlaConcatND", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_concats { + nd.set_attr_int_list("num_concats", value)?; + } + if let ::std::option::Option::Some(value) = &self.paddings { + nd.set_attr_int_list("paddings", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(XlaConcatNDInst{op}) + } +} +impl XlaConcatNDInst { + /// Returns the 'output' output of this 'XlaConcatND' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for XlaConcatNDInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `XlaConcatND::new().build(inputs, scope)`. -pub fn xla_concat_nd>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn xla_concat_nd>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { XlaConcatND::new().build(inputs, scope) } + /// Builder for the `XlaHostCompute` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct XlaHostCompute { @@ -132426,6 +159397,12 @@ pub struct XlaHostCompute { tpu_core: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'XlaHostCompute' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct XlaHostComputeInst { + /// An instance of a fully built XlaHostCompute Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl XlaHostCompute { /// Creates a new `XlaHostCompute`. @@ -132434,73 +159411,49 @@ impl XlaHostCompute { } /// Sets the `Tinputs` attribute. - pub fn Tinputs>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinputs>>(mut self, value: ArgType) -> Self { self.Tinputs = ::std::option::Option::Some(value.into()); self } /// Sets the `Toutputs` attribute. - pub fn Toutputs>>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutputs>>(mut self, value: ArgType) -> Self { self.Toutputs = ::std::option::Option::Some(value.into()); self } /// Sets the `ancestors` attribute. - pub fn ancestors>>( - mut self, - value: ArgType, - ) -> Self { + pub fn ancestors>>(mut self, value: ArgType) -> Self { self.ancestors = ::std::option::Option::Some(value.into()); self } /// Sets the `shapes` attribute. - pub fn shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn shapes>>(mut self, value: ArgType) -> Self { self.shapes = ::std::option::Option::Some(value.into()); self } /// Sets the `shape_inference_graph` attribute. - pub fn shape_inference_graph>( - mut self, - value: ArgType, - ) -> Self { + pub fn shape_inference_graph>(mut self, value: ArgType) -> Self { self.shape_inference_graph = ::std::option::Option::Some(value.into()); self } /// Sets the `key` attribute. - pub fn key>( - mut self, - value: ArgType, - ) -> Self { + pub fn key>(mut self, value: ArgType) -> Self { self.key = ::std::option::Option::Some(value.into()); self } /// Sets the `send_key` attribute. - pub fn send_key>( - mut self, - value: ArgType, - ) -> Self { + pub fn send_key>(mut self, value: ArgType) -> Self { self.send_key = ::std::option::Option::Some(value.into()); self } /// Sets the `recv_key` attribute. - pub fn recv_key>( - mut self, - value: ArgType, - ) -> Self { + pub fn recv_key>(mut self, value: ArgType) -> Self { self.recv_key = ::std::option::Option::Some(value.into()); self } @@ -132524,66 +159477,113 @@ impl XlaHostCompute { } /// Builds the `XlaHostCompute` operation. - pub fn build>( - &self, - inputs: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(inputs.into(), scope) } - - fn build_impl( - &self, - inputs: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("XlaHostCompute", |nd| { nd.add_input(inputs); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinputs { - nd.set_attr_type_list("Tinputs", value)?; - } - if let ::std::option::Option::Some(value) = &self.Toutputs { - nd.set_attr_type_list("Toutputs", value)?; - } - if let ::std::option::Option::Some(value) = &self.ancestors { - nd.set_attr_string_list("ancestors", value)?; - } - if let ::std::option::Option::Some(value) = &self.shapes { - nd.set_attr_shape_list("shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.shape_inference_graph { - nd.set_attr_string("shape_inference_graph", value)?; - } - if let ::std::option::Option::Some(value) = &self.key { - nd.set_attr_string("key", value)?; - } - if let ::std::option::Option::Some(value) = &self.send_key { - nd.set_attr_string("send_key", value)?; - } - if let ::std::option::Option::Some(value) = &self.recv_key { - nd.set_attr_string("recv_key", value)?; - } - if let ::std::option::Option::Some(value) = &self.cost_estimate_ns { - nd.set_attr_int("cost_estimate_ns", *value)?; - } - if let ::std::option::Option::Some(value) = &self.tpu_core { - nd.set_attr_int("tpu_core", *value)?; + if let ::std::option::Option::Some(value) = &self.Tinputs { + nd.set_attr_type_list("Tinputs", value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutputs { + nd.set_attr_type_list("Toutputs", value)?; + } + if let ::std::option::Option::Some(value) = &self.ancestors { + nd.set_attr_string_list("ancestors", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_inference_graph { + nd.set_attr_string("shape_inference_graph", value)?; + } + if let ::std::option::Option::Some(value) = &self.key { + nd.set_attr_string("key", value)?; + } + if let ::std::option::Option::Some(value) = &self.send_key { + nd.set_attr_string("send_key", value)?; + } + if let ::std::option::Option::Some(value) = &self.recv_key { + nd.set_attr_string("recv_key", value)?; + } + if let ::std::option::Option::Some(value) = &self.cost_estimate_ns { + nd.set_attr_int("cost_estimate_ns", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tpu_core { + nd.set_attr_int("tpu_core", *value)?; + } + ::std::result::Result::Ok(()) + }) + } + + /// Builds the `XlaHostCompute` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, inputs: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(inputs.into(), scope) + } + fn build_instance_impl(&self, inputs: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("XlaHostCompute", |nd| { + nd.add_input(inputs); + for op in &self.control_inputs { + nd.add_control_input(op); } - ::std::result::Result::Ok(()) - }) + if let ::std::option::Option::Some(value) = &self.Tinputs { + nd.set_attr_type_list("Tinputs", value)?; + } + if let ::std::option::Option::Some(value) = &self.Toutputs { + nd.set_attr_type_list("Toutputs", value)?; + } + if let ::std::option::Option::Some(value) = &self.ancestors { + nd.set_attr_string_list("ancestors", value)?; + } + if let ::std::option::Option::Some(value) = &self.shapes { + nd.set_attr_shape_list("shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.shape_inference_graph { + nd.set_attr_string("shape_inference_graph", value)?; + } + if let ::std::option::Option::Some(value) = &self.key { + nd.set_attr_string("key", value)?; + } + if let ::std::option::Option::Some(value) = &self.send_key { + nd.set_attr_string("send_key", value)?; + } + if let ::std::option::Option::Some(value) = &self.recv_key { + nd.set_attr_string("recv_key", value)?; + } + if let ::std::option::Option::Some(value) = &self.cost_estimate_ns { + nd.set_attr_int("cost_estimate_ns", *value)?; + } + if let ::std::option::Option::Some(value) = &self.tpu_core { + nd.set_attr_int("tpu_core", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(XlaHostComputeInst{op}) + } +} +impl XlaHostComputeInst { + /// Returns the 'outputs' output of this 'XlaHostCompute' operation. + pub fn outputs(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for XlaHostComputeInst{ + fn into(self) -> crate::Operation { + self.op } } - /// Shorthand for `XlaHostCompute::new().build(inputs, scope)`. -pub fn xla_host_compute>( - inputs: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn xla_host_compute>(inputs: O0, scope: &mut crate::Scope) -> crate::Result { XlaHostCompute::new().build(inputs, scope) } + /// Builder for the `XlaRecvFromHost` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct XlaRecvFromHost { @@ -132592,6 +159592,12 @@ pub struct XlaRecvFromHost { key: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'XlaRecvFromHost' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct XlaRecvFromHostInst { + /// An instance of a fully built XlaRecvFromHost Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl XlaRecvFromHost { /// Creates a new `XlaRecvFromHost`. @@ -132600,10 +159606,7 @@ impl XlaRecvFromHost { } /// Sets the `Toutput` attribute. - pub fn Toutput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Toutput>(mut self, value: ArgType) -> Self { self.Toutput = ::std::option::Option::Some(value.into()); self } @@ -132615,10 +159618,7 @@ impl XlaRecvFromHost { } /// Sets the `key` attribute. - pub fn key>( - mut self, - value: ArgType, - ) -> Self { + pub fn key>(mut self, value: ArgType) -> Self { self.key = ::std::option::Option::Some(value.into()); self } @@ -132630,33 +159630,69 @@ impl XlaRecvFromHost { } /// Builds the `XlaRecvFromHost` operation. - pub fn build(&self, scope: &mut crate::Scope) -> crate::Result { + pub fn build<>(&self, scope: &mut crate::Scope) -> crate::Result { self.build_impl(scope) } - fn build_impl(&self, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("XlaRecvFromHost", |nd| { for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Toutput { - nd.set_attr_type("Toutput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.shape { - nd.set_attr_shape("shape", value)?; - } - if let ::std::option::Option::Some(value) = &self.key { - nd.set_attr_string("key", value)?; - } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.key { + nd.set_attr_string("key", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `XlaRecvFromHost` operation and exposes the operation's inputs and outputs. + pub fn build_instance<>(&self, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(scope) + } + fn build_instance_impl(&self, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("XlaRecvFromHost", |nd| { + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Toutput { + nd.set_attr_type("Toutput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.shape { + nd.set_attr_shape("shape", value)?; + } + if let ::std::option::Option::Some(value) = &self.key { + nd.set_attr_string("key", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(XlaRecvFromHostInst{op}) + } +} +impl XlaRecvFromHostInst { + /// Returns the 'output' output of this 'XlaRecvFromHost' operation. + pub fn output(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for XlaRecvFromHostInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `XlaRecvFromHost::new().build(scope)`. -pub fn xla_recv_from_host(scope: &mut crate::Scope) -> crate::Result { +pub fn xla_recv_from_host<>(scope: &mut crate::Scope) -> crate::Result { XlaRecvFromHost::new().build(scope) } + /// Builder for the `XlaSendToHost` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct XlaSendToHost { @@ -132664,6 +159700,12 @@ pub struct XlaSendToHost { key: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'XlaSendToHost' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct XlaSendToHostInst { + /// An instance of a fully built XlaSendToHost Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl XlaSendToHost { /// Creates a new `XlaSendToHost`. @@ -132672,19 +159714,13 @@ impl XlaSendToHost { } /// Sets the `Tinput` attribute. - pub fn Tinput>( - mut self, - value: ArgType, - ) -> Self { + pub fn Tinput>(mut self, value: ArgType) -> Self { self.Tinput = ::std::option::Option::Some(value.into()); self } /// Sets the `key` attribute. - pub fn key>( - mut self, - value: ArgType, - ) -> Self { + pub fn key>(mut self, value: ArgType) -> Self { self.key = ::std::option::Option::Some(value.into()); self } @@ -132696,42 +159732,58 @@ impl XlaSendToHost { } /// Builds the `XlaSendToHost` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("XlaSendToHost", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.Tinput { - nd.set_attr_type("Tinput", *value)?; - } - if let ::std::option::Option::Some(value) = &self.key { - nd.set_attr_string("key", value)?; - } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key { + nd.set_attr_string("key", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `XlaSendToHost` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("XlaSendToHost", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.Tinput { + nd.set_attr_type("Tinput", *value)?; + } + if let ::std::option::Option::Some(value) = &self.key { + nd.set_attr_string("key", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(XlaSendToHostInst{op}) + } +} +impl XlaSendToHostInst { +} +impl Into for XlaSendToHostInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `XlaSendToHost::new().build(input, scope)`. -pub fn xla_send_to_host>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn xla_send_to_host>(input: O0, scope: &mut crate::Scope) -> crate::Result { XlaSendToHost::new().build(input, scope) } + /// Builder for the `XlaSplitND` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct XlaSplitND { @@ -132741,6 +159793,12 @@ pub struct XlaSplitND { paddings: ::std::option::Option<::std::vec::Vec>, control_inputs: ::std::vec::Vec, } +/// An instance of 'XlaSplitND' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct XlaSplitNDInst { + /// An instance of a fully built XlaSplitND Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl XlaSplitND { /// Creates a new `XlaSplitND`. @@ -132761,19 +159819,13 @@ impl XlaSplitND { } /// Sets the `num_splits` attribute. - pub fn num_splits>>( - mut self, - value: ArgType, - ) -> Self { + pub fn num_splits>>(mut self, value: ArgType) -> Self { self.num_splits = ::std::option::Option::Some(value.into()); self } /// Sets the `paddings` attribute. - pub fn paddings>>( - mut self, - value: ArgType, - ) -> Self { + pub fn paddings>>(mut self, value: ArgType) -> Self { self.paddings = ::std::option::Option::Some(value.into()); self } @@ -132785,54 +159837,94 @@ impl XlaSplitND { } /// Builds the `XlaSplitND` operation. - pub fn build>( - &self, - input: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input.into(), scope) } - - fn build_impl( - &self, - input: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("XlaSplitND", |nd| { nd.add_input(input); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.num_splits { - nd.set_attr_int_list("num_splits", value)?; - } - if let ::std::option::Option::Some(value) = &self.paddings { - nd.set_attr_int_list("paddings", value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_splits { + nd.set_attr_int_list("num_splits", value)?; + } + if let ::std::option::Option::Some(value) = &self.paddings { + nd.set_attr_int_list("paddings", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `XlaSplitND` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input.into(), scope) + } + fn build_instance_impl(&self, input: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("XlaSplitND", |nd| { + nd.add_input(input); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.num_splits { + nd.set_attr_int_list("num_splits", value)?; + } + if let ::std::option::Option::Some(value) = &self.paddings { + nd.set_attr_int_list("paddings", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(XlaSplitNDInst{op}) + } +} +impl XlaSplitNDInst { + /// Returns a Vector of Outputs for 'outputs' output of this XlaSplitND operation. + pub fn outputs(&self) -> crate::Result>{ + let dynamic_offset = (0) as i32; + let mut Outputs = vec![]; + for i in 0..self.op.get_attr_int("N")? as i32{ + Outputs.push(crate::Output { + operation: self.op.clone(), + index: i + }); + } + Ok(Outputs) + } +} +impl Into for XlaSplitNDInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `XlaSplitND::new().build(input, scope)`. -pub fn xla_split_nd>( - input: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn xla_split_nd>(input: O0, scope: &mut crate::Scope) -> crate::Result { XlaSplitND::new().build(input, scope) } + /// Builder for the `Xlog1py` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Xlog1py { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Xlog1py' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct Xlog1pyInst { + /// An instance of a fully built Xlog1py Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Xlog1py { /// Creates a new `Xlog1py`. @@ -132853,52 +159945,73 @@ impl Xlog1py { } /// Builds the `Xlog1py` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Xlog1py", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Xlog1py` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Xlog1py", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(Xlog1pyInst{op}) + } +} +impl Xlog1pyInst { + /// Returns the 'z' output of this 'Xlog1py' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for Xlog1pyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Xlog1py::new().build(x, y, scope)`. -pub fn xlog1py, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn xlog1py, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Xlog1py::new().build(x, y, scope) } + /// Builder for the `Xlogy` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Xlogy { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Xlogy' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct XlogyInst { + /// An instance of a fully built Xlogy Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Xlogy { /// Creates a new `Xlogy`. @@ -132919,52 +160032,73 @@ impl Xlogy { } /// Builds the `Xlogy` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - y: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), y.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - y: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Xlogy", |nd| { nd.add_input(x); nd.add_input(y); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Xlogy` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), y.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, y: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Xlogy", |nd| { + nd.add_input(x); + nd.add_input(y); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(XlogyInst{op}) + } +} +impl XlogyInst { + /// Returns the 'z' output of this 'Xlogy' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for XlogyInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Xlogy::new().build(x, y, scope)`. -pub fn xlogy, O1: ::std::convert::Into>( - x: O0, - y: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn xlogy, O1: ::std::convert::Into>(x: O0, y: O1, scope: &mut crate::Scope) -> crate::Result { Xlogy::new().build(x, y, scope) } + /// Builder for the `ZerosLike` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ZerosLike { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'ZerosLike' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ZerosLikeInst { + /// An instance of a fully built ZerosLike Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ZerosLike { /// Creates a new `ZerosLike`. @@ -132985,45 +160119,71 @@ impl ZerosLike { } /// Builds the `ZerosLike` operation. - pub fn build>( - &self, - x: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ZerosLike", |nd| { nd.add_input(x); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ZerosLike` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, x: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ZerosLike", |nd| { + nd.add_input(x); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ZerosLikeInst{op}) + } +} +impl ZerosLikeInst { + /// Returns the 'y' output of this 'ZerosLike' operation. + pub fn y(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ZerosLikeInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ZerosLike::new().build(x, scope)`. -pub fn zeros_like>( - x: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn zeros_like>(x: O0, scope: &mut crate::Scope) -> crate::Result { ZerosLike::new().build(x, scope) } + /// Builder for the `Zeta` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct Zeta { T: ::std::option::Option, control_inputs: ::std::vec::Vec, } +/// An instance of 'Zeta' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ZetaInst { + /// An instance of a fully built Zeta Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl Zeta { /// Creates a new `Zeta`. @@ -133044,46 +160204,61 @@ impl Zeta { } /// Builds the `Zeta` operation. - pub fn build< - O0: ::std::convert::Into, - O1: ::std::convert::Into, - >( - &self, - x: O0, - q: O1, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build, O1: ::std::convert::Into>(&self, x: O0, q: O1, scope: &mut crate::Scope) -> crate::Result { self.build_impl(x.into(), q.into(), scope) } - - fn build_impl( - &self, - x: crate::Output, - q: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, x: crate::Output, q: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("Zeta", |nd| { nd.add_input(x); nd.add_input(q); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.T { - nd.set_attr_type("T", *value)?; - } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `Zeta` operation and exposes the operation's inputs and outputs. + pub fn build_instance, O1: ::std::convert::Into>(&self, x: O0, q: O1, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(x.into(), q.into(), scope) + } + fn build_instance_impl(&self, x: crate::Output, q: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("Zeta", |nd| { + nd.add_input(x); + nd.add_input(q); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.T { + nd.set_attr_type("T", *value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ZetaInst{op}) + } +} +impl ZetaInst { + /// Returns the 'z' output of this 'Zeta' operation. + pub fn z(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ZetaInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `Zeta::new().build(x, q, scope)`. -pub fn zeta, O1: ::std::convert::Into>( - x: O0, - q: O1, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn zeta, O1: ::std::convert::Into>(x: O0, q: O1, scope: &mut crate::Scope) -> crate::Result { Zeta::new().build(x, q, scope) } + /// Builder for the `ZipDataset` operation. #[derive(::std::fmt::Debug, ::std::default::Default)] pub struct ZipDataset { @@ -133093,6 +160268,12 @@ pub struct ZipDataset { metadata: ::std::option::Option<::std::string::String>, control_inputs: ::std::vec::Vec, } +/// An instance of 'ZipDataset' Operation with it's Outputs exposed as methods. +#[derive(Debug, Clone)] +pub struct ZipDatasetInst { + /// An instance of a fully built ZipDataset Operation in a Tensorflow graph. + pub op: crate::Operation, +} impl ZipDataset { /// Creates a new `ZipDataset`. @@ -133101,19 +160282,13 @@ impl ZipDataset { } /// Sets the `output_types` attribute. - pub fn output_types>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_types>>(mut self, value: ArgType) -> Self { self.output_types = ::std::option::Option::Some(value.into()); self } /// Sets the `output_shapes` attribute. - pub fn output_shapes>>( - mut self, - value: ArgType, - ) -> Self { + pub fn output_shapes>>(mut self, value: ArgType) -> Self { self.output_shapes = ::std::option::Option::Some(value.into()); self } @@ -133125,10 +160300,7 @@ impl ZipDataset { } /// Sets the `metadata` attribute. - pub fn metadata>( - mut self, - value: ArgType, - ) -> Self { + pub fn metadata>(mut self, value: ArgType) -> Self { self.metadata = ::std::option::Option::Some(value.into()); self } @@ -133140,45 +160312,74 @@ impl ZipDataset { } /// Builds the `ZipDataset` operation. - pub fn build>( - &self, - input_datasets: O0, - scope: &mut crate::Scope, - ) -> crate::Result { + pub fn build>(&self, input_datasets: O0, scope: &mut crate::Scope) -> crate::Result { self.build_impl(input_datasets.into(), scope) } - - fn build_impl( - &self, - input_datasets: crate::Output, - scope: &mut crate::Scope, - ) -> crate::Result { + fn build_impl(&self, input_datasets: crate::Output, scope: &mut crate::Scope) -> crate::Result { scope.new_operation("ZipDataset", |nd| { nd.add_input(input_datasets); for op in &self.control_inputs { nd.add_control_input(op); } - if let ::std::option::Option::Some(value) = &self.output_types { - nd.set_attr_type_list("output_types", value)?; - } - if let ::std::option::Option::Some(value) = &self.output_shapes { - nd.set_attr_shape_list("output_shapes", value)?; - } - if let ::std::option::Option::Some(value) = &self.N { - nd.set_attr_int("N", *value)?; - } - if let ::std::option::Option::Some(value) = &self.metadata { - nd.set_attr_string("metadata", value)?; - } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } ::std::result::Result::Ok(()) }) } -} + /// Builds the `ZipDataset` operation and exposes the operation's inputs and outputs. + pub fn build_instance>(&self, input_datasets: O0, scope: &mut crate::Scope) -> crate::Result { + self.build_instance_impl(input_datasets.into(), scope) + } + fn build_instance_impl(&self, input_datasets: crate::Output, scope: &mut crate::Scope) -> crate::Result { + let op = scope.new_operation("ZipDataset", |nd| { + nd.add_input(input_datasets); + for op in &self.control_inputs { + nd.add_control_input(op); + } + if let ::std::option::Option::Some(value) = &self.output_types { + nd.set_attr_type_list("output_types", value)?; + } + if let ::std::option::Option::Some(value) = &self.output_shapes { + nd.set_attr_shape_list("output_shapes", value)?; + } + if let ::std::option::Option::Some(value) = &self.N { + nd.set_attr_int("N", *value)?; + } + if let ::std::option::Option::Some(value) = &self.metadata { + nd.set_attr_string("metadata", value)?; + } + ::std::result::Result::Ok(()) + })?; + Ok(ZipDatasetInst{op}) + } +} +impl ZipDatasetInst { + /// Returns the 'handle' output of this 'ZipDataset' operation. + pub fn handle(&self) -> crate::Output { + crate::Output { + operation: self.op.clone(), + index: 0 + } + } +} +impl Into for ZipDatasetInst{ + fn into(self) -> crate::Operation { + self.op + } +} /// Shorthand for `ZipDataset::new().build(input_datasets, scope)`. -pub fn zip_dataset>( - input_datasets: O0, - scope: &mut crate::Scope, -) -> crate::Result { +pub fn zip_dataset>(input_datasets: O0, scope: &mut crate::Scope) -> crate::Result { ZipDataset::new().build(input_datasets, scope) } + diff --git a/tensorflow-op-codegen/src/main.rs b/tensorflow-op-codegen/src/main.rs index d9a2713ec4..55aef518d6 100644 --- a/tensorflow-op-codegen/src/main.rs +++ b/tensorflow-op-codegen/src/main.rs @@ -1,3 +1,4 @@ +use std::collections::HashMap; use std::collections::HashSet; use std::env; use std::error::Error; @@ -18,6 +19,12 @@ struct Attr { attr_type: String, c_name: String, } +#[derive(Clone)] +struct Output { + rust_name: String, + number_attr: Option, + c_name: String, +} fn write_set_attr(w: &mut W, attr: &Attr, node_var: &str) -> Result<(), io::Error> { let c_name = &attr.c_name; @@ -221,6 +228,251 @@ fn write_attr(w: &mut W, attr: &Attr) -> Result<(), io::Error> { Ok(()) } +fn write_build_instance_fn( + w: &mut W, + op_name: &str, + args: &[String], + keywords: &HashSet, +) -> Result<(), io::Error> { + let mut escaper = Escaper::new(keywords); + let escaped_args: Vec<_> = args.iter().map(|arg| escaper.escape(&arg)).collect(); + + write!( + w, + " /// Builds the `{}` operation and exposes the operation's inputs and outputs.\n", + op_name + )?; + write!(w, " pub fn build_instance<")?; + for i in 0..args.len() { + if i > 0 { + write!(w, ", ")?; + } + write!(w, "O{}: ::std::convert::Into", i)?; + } + write!(w, ">(&self, ")?; + for (i, arg) in escaped_args.iter().enumerate() { + write!(w, "{}: O{}, ", arg, i)?; + } + let scope_var = escaper.escape("scope"); + write!( + w, + r#"{scope}: &mut crate::Scope) -> crate::Result<{op_name}Inst> {{ +"#, + scope = scope_var, + op_name = op_name, + )?; + write!(w, " self.build_instance_impl(")?; + for arg in &escaped_args { + write!(w, "{}.into(), ", arg)?; + } + write!(w, "{})\n", scope_var)?; + write!(w, " }}\n")?; + Ok(()) +} + +fn write_build_operation_struct( + w: &mut W, + op_name: &str, + attrs: &[Attr], + args: &[String], + outputs: Vec, + keywords: &HashSet, +) -> Result<(), io::Error> { + let mut escaper = Escaper::new(keywords); + let escaped_args: Vec<_> = args.iter().map(|arg| escaper.escape(&arg)).collect(); + + //TODO: also expose Inputs + write!( + w, + "/// An instance of '{}' Operation with it's Outputs exposed as methods.\n", + op_name + )?; + write!(w, "#[derive(Debug, Clone)]\n")?; + write!(w, "pub struct {}Inst", op_name)?; + write!(w, " {{\n")?; + write!( + w, + " /// An instance of a fully built {} Operation in a Tensorflow graph.\n", + op_name + )?; + write!(w, " pub op: crate::Operation,\n")?; + write!(w, "}}\n")?; + + Ok(()) +} + +fn write_build_instance_impl_fn( + w: &mut W, + op_name: &str, + args: &[String], + attrs: &[Attr], + outputs: Vec, + keywords: &HashSet, +) -> Result<(), io::Error> { + let mut escaper = Escaper::new(keywords); + let escaped_args: Vec<_> = args.iter().map(|arg| escaper.escape(&arg)).collect(); + write!(w, " fn build_instance_impl(&self, ")?; + for arg in &escaped_args { + write!(w, "{}: crate::Output, ", arg)?; + } + let scope_var = escaper.escape("scope"); + let node_var = escaper.escape("nd"); + write!( + w, + r#"{scope}: &mut crate::Scope) -> crate::Result<{op_name}Inst> {{ + let op = {scope}.new_operation({op_name:?}, |{node}| {{ +"#, + scope = scope_var, + op_name = op_name, + node = node_var, + )?; + for arg in escaped_args { + write!(w, " {}.add_input({});\n", node_var, arg)?; + } + write!(w, " for op in &self.control_inputs {{\n")?; + write!(w, " {}.add_control_input(op);\n", node_var)?; + write!(w, " }}\n")?; + for attr in attrs { + write_set_attr(w, attr, &node_var)?; + } + write!(w, " ::std::result::Result::Ok(())\n")?; + write!(w, " }})?;\n")?; + write!(w, " Ok({}Inst{{op}})\n", op_name)?; + write!(w, " }}\n")?; + Ok(()) +} + +///writes the impl for the output struct that includes slicing implementations for Outputs that have output.number_attr set +fn write_build_instance_struct_impl( + w: &mut W, + op_name: &str, + attrs: &[Attr], + args: &[String], + outputs: Vec, + keywords: &HashSet, +) -> Result<(), io::Error> { + let mut escaper = Escaper::new(keywords); + let escaped_args: Vec<_> = args.iter().map(|arg| escaper.escape(&arg)).collect(); + + write!(w, "impl {}Inst {{\n", op_name)?; + + let mut dynamic_offset: Vec = vec![]; + for (i, output) in outputs.iter().enumerate() { + //counts holds the number of times an entry is repeated in offset + let counts = dynamic_offset + .iter() + .fold(HashMap::new(), |mut counts, String| { + *counts.entry(String).or_insert(0) += 1; + counts + }); + //now make the string multiply each entry by its count instead of summing them n number of times + let mut scalar_offsets = + counts + .iter() + .fold(String::new(), |mut scalar_offset, (string, count)| { + //identity property + if count > &1 { + scalar_offset.push_str(&format!("{}*{}+", count, string)); + } else { + scalar_offset.push_str(&format!("{}+", string)); + } + scalar_offset + }); + scalar_offsets.push_str(&format!("{}", i)); + + if let Some(number_attr) = &output.number_attr { + //create a Vec for this index + write!( + w, + " /// Returns a Vector of Outputs for '{}' output of this {} operation.\n", + output.rust_name, op_name + )?; + write!( + w, + " pub fn {}(&self) -> crate::Result>{{\n", + output.rust_name + )?; + write!( + w, + " let dynamic_offset = ({}) as i32;\n", + scalar_offsets + )?; + write!(w, " let mut Outputs = vec![];\n",)?; + if dynamic_offset.is_empty() { + write!( + w, + " for i in {}..self.op.get_attr_int(\"{}\")? as i32{{\n", + i, number_attr + )?; + write!(w, " Outputs.push(crate::Output {{\n")?; + write!(w, " operation: self.op.clone(),\n")?; + write!(w, " index: i\n")?; + write!(w, " }});\n")?; + write!(w, " }}\n")?; + } else { + write!( + w, + " for i in dynamic_offset..dynamic_offset+self.op.get_attr_int(\"{}\")? as i32{{\n", + number_attr + )?; + write!(w, " Outputs.push(crate::Output {{\n")?; + write!(w, " operation: self.op.clone(),\n")?; + write!(w, " index: i\n")?; + write!(w, " }});\n")?; + write!(w, " }}\n")?; + } + write!(w, " Ok(Outputs)\n")?; + write!(w, " }}\n")?; + //add the current self.op.get_attr_int(number_attr) to dynamic_offset to keep the current index in the Operations Outputs + dynamic_offset.push(format!("self.op.get_attr_int(\"{}\")?", number_attr)); + } else { + //create a single output at the current dynamic_offset index + write!( + w, + " /// Returns the '{}' output of this '{}' operation.\n", + output.rust_name, op_name + )?; + //if scalar_offsets is just the i value, we dont return a result since this is statically indexed + if scalar_offsets == format!("{}", i) { + write!( + w, + " pub fn {}(&self) -> crate::Output {{\n", + output.rust_name + )?; + write!(w, " crate::Output {{\n",)?; + write!(w, " operation: self.op.clone(),\n")?; + write!(w, " index: {}\n", i)?; + write!(w, " }}\n")?; + write!(w, " }}\n")?; + } else { + write!( + w, + " pub fn {}(&self) -> crate::Result {{\n", + output.rust_name + )?; + write!( + w, + " let dynamic_offset = ({}) as i32;\n", + scalar_offsets + )?; + write!(w, " Ok(crate::Output {{\n",)?; + write!(w, " operation: self.op.clone(),\n")?; + write!(w, " index: dynamic_offset\n")?; + write!(w, " }})\n")?; + write!(w, " }}\n")?; + } + } + } + write!(w, "}}\n")?; + write!(w, "impl Into for {}Inst{{\n", op_name)?; + write!(w, " fn into(self) -> crate::Operation {{\n")?; + write!(w, " self.op\n")?; + write!(w, " }}\n")?; + write!(w, "}}\n")?; + + Ok(()) +} + fn define_op( w: &mut W, keywords: &HashSet, @@ -231,9 +483,11 @@ fn define_op( let fn_name = fn_escaper.escape(&snake_name(&op.name)); let name = struct_escaper.escape(&op.name); let op_name = op.name.clone(); + let mut op_outputs = vec![]; let args: Vec<_> = op.input_arg.iter().map(|arg| arg.name.clone()).collect(); let mut attrs = Vec::new(); let mut attr_escaper = Escaper::new(keywords); + let mut output_escaper = Escaper::new(keywords); for attr in op.attr.iter() { let rust_type = match &attr.field_type as &str { // See OpDef.AttrDef.type in $TENSORFLOW/tensorflow/core/framework/op_def.proto @@ -270,6 +524,19 @@ fn define_op( c_name: attr.name.clone(), }); } + for output in op.output_arg.iter() { + let mut number_attr = output.number_attr.clone(); + let mut number_attr_opt = None; + if !number_attr.is_empty() { + number_attr_opt = Some(number_attr.clone()); + } + op_outputs.push(Output { + rust_name: output_escaper.escape(&output.name), + number_attr: number_attr_opt, + c_name: output.name.clone(), + }); + } + write!(w, "/// Builder for the `{}` operation.\n", op_name)?; write!(w, "#[derive(::std::fmt::Debug, ::std::default::Default)]\n")?; write!(w, "pub struct {} {{\n", name)?; @@ -280,7 +547,13 @@ fn define_op( w, r#" control_inputs: ::std::vec::Vec, }} +"# + ); + write_build_operation_struct(w, &op_name, &attrs, &args, op_outputs.clone(), keywords)?; + write!( + w, + r#" impl {name} {{ /// Creates a new `{name}`. pub fn new() -> Self {{ @@ -304,11 +577,14 @@ impl {name} {{ "# )?; write_build_fn(w, &op_name, &args, &keywords)?; - write!(w, "\n")?; write_build_impl_fn(w, &op_name, &args, &attrs, &keywords)?; - write!(w, "}}\n")?; write!(w, "\n")?; + write_build_instance_fn(w, &op_name, &args, &keywords)?; + write_build_instance_impl_fn(w, &op_name, &args, &attrs, op_outputs.clone(), &keywords)?; + write!(w, "}}\n")?; + write_build_instance_struct_impl(w, &op_name, &attrs, &args, op_outputs, &keywords)?; write_short_fn(w, &name, &fn_name, &args, &keywords)?; + write!(w, "\n")?; Ok(()) }