diff --git a/pom.xml b/pom.xml
index 9cae184350a..e26bb73311a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,12 +29,41 @@
+ tensorflow-tools
tensorflow-core
-
+
+ 1.8
+ 1.8
+ 4.12
+ 1.21
+
+
+
+
+
+ junit
+ junit
+ ${junit.version}
+
+
+ org.openjdk.jmh
+ jmh-core
+ ${jmh.version}
+ test
+
+
+ org.openjdk.jmh
+ jmh-generator-annprocess
+ ${jmh.version}
+ test
+
+
+
+
@@ -64,6 +93,7 @@
+
@@ -72,6 +102,7 @@
http://www.tensorflow.org
+
diff --git a/tensorflow-core/tensorflow-core-api/pom.xml b/tensorflow-core/tensorflow-core-api/pom.xml
index 4e26ca21853..d5c82ff9179 100644
--- a/tensorflow-core/tensorflow-core-api/pom.xml
+++ b/tensorflow-core/tensorflow-core-api/pom.xml
@@ -26,6 +26,11 @@
${project.version}
true
+
+ org.tensorflow
+ tensorflow-tools
+ ${project.version}
+
junit
junit
@@ -71,10 +76,6 @@
maven-compiler-plugin
3.8.0
-
- 1.7
- 1.7
-
default-compile
@@ -94,7 +95,7 @@
- org/tensorflow/c_api/presets/*.java
+ org/tensorflow/internal/c_api/presets/*.java
@@ -199,7 +200,7 @@
${javacpp.parser.skip}
${project.basedir}/src/gen/java
- org.tensorflow.c_api.presets.*
+ org.tensorflow.internal.c_api.presets.*
@@ -209,9 +210,9 @@
build
- ${project.build.directory}/native/org/tensorflow/c_api/${javacpp.platform}${javacpp.platform.extension}/
+ ${project.build.directory}/native/org/tensorflow/internal/c_api/${javacpp.platform}${javacpp.platform.extension}/
${javacpp.compiler.skip}
- org.tensorflow.c_api.**
+ org.tensorflow.internal.c_api.**
true
true
@@ -222,6 +223,9 @@
maven-surefire-plugin
2.22.0
+
+ -Djava.library.path=${project.build.directory}/native/org/tensorflow/internal/c_api/${javacpp.platform}${javacpp.platform.extension}
+
${project.build.directory}/native/
@@ -254,16 +258,16 @@
- org/tensorflow/c_api/${javacpp.platform}${javacpp.platform.extension}/
+ org/tensorflow/internal/c_api/${javacpp.platform}${javacpp.platform.extension}/
${project.build.directory}/native
- org/tensorflow/c_api/${javacpp.platform}${javacpp.platform.extension}/*.exp
- org/tensorflow/c_api/${javacpp.platform}${javacpp.platform.extension}/*.lib
- org/tensorflow/c_api/${javacpp.platform}${javacpp.platform.extension}/*.obj
- org/tensorflow/c_api/${javacpp.platform}${javacpp.platform.extension}/*mklml*
- org/tensorflow/c_api/${javacpp.platform}${javacpp.platform.extension}/*iomp5*
- org/tensorflow/c_api/${javacpp.platform}${javacpp.platform.extension}/*msvcr120*
+ org/tensorflow/internal/c_api/${javacpp.platform}${javacpp.platform.extension}/*.exp
+ org/tensorflow/internal/c_api/${javacpp.platform}${javacpp.platform.extension}/*.lib
+ org/tensorflow/internal/c_api/${javacpp.platform}${javacpp.platform.extension}/*.obj
+ org/tensorflow/internal/c_api/${javacpp.platform}${javacpp.platform.extension}/*mklml*
+ org/tensorflow/internal/c_api/${javacpp.platform}${javacpp.platform.extension}/*iomp5*
+ org/tensorflow/internal/c_api/${javacpp.platform}${javacpp.platform.extension}/*msvcr120*
diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveBcastRecv.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveBcastRecv.pbtxt
index 8ada333e446..a5c7a7ffaba 100644
--- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveBcastRecv.pbtxt
+++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveBcastRecv.pbtxt
@@ -3,4 +3,8 @@ op {
endpoint {
name: "collective.BroadcastRecv"
}
+ out_arg: {
+ name: "data"
+ rename_to: "output"
+ }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveBcastSend.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveBcastSend.pbtxt
index 18b4bef345e..628ad951a5b 100644
--- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveBcastSend.pbtxt
+++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveBcastSend.pbtxt
@@ -3,4 +3,8 @@ op {
endpoint {
name: "collective.BroadcastSend"
}
+ out_arg: {
+ name: "data"
+ rename_to: "output"
+ }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveGather.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveGather.pbtxt
new file mode 100644
index 00000000000..5be0737f80a
--- /dev/null
+++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveGather.pbtxt
@@ -0,0 +1,7 @@
+op {
+ graph_op_name: "CollectiveGather"
+ out_arg: {
+ name: "data"
+ rename_to: "output"
+ }
+}
\ No newline at end of file
diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveReduce.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveReduce.pbtxt
index 6226cc05ec3..84251a19aa5 100644
--- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveReduce.pbtxt
+++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_CollectiveReduce.pbtxt
@@ -3,4 +3,8 @@ op {
endpoint {
name: "collective.AllReduce"
}
+ out_arg: {
+ name: "data"
+ rename_to: "output"
+ }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_KafkaDataset.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_KafkaDataset.pbtxt
new file mode 100644
index 00000000000..5f0da216cbb
--- /dev/null
+++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_KafkaDataset.pbtxt
@@ -0,0 +1,6 @@
+op {
+ graph_op_name: "KafkaDataset"
+ endpoint {
+ name: "data.KafkaDataset"
+ }
+}
diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_NcclAllReduce.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_NcclAllReduce.pbtxt
index c7133d4a4a8..26ee24f6cde 100644
--- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_NcclAllReduce.pbtxt
+++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_NcclAllReduce.pbtxt
@@ -1,3 +1,7 @@
op {
graph_op_name: "NcclAllReduce"
+ out_arg: {
+ name: "data"
+ rename_to: "output"
+ }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_NcclReduce.pbtxt b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_NcclReduce.pbtxt
index 18dc8901778..42c6e131c14 100644
--- a/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_NcclReduce.pbtxt
+++ b/tensorflow-core/tensorflow-core-api/src/bazel/api_def/api_def_NcclReduce.pbtxt
@@ -1,3 +1,7 @@
op {
graph_op_name: "NcclReduce"
+ out_arg: {
+ name: "data"
+ rename_to: "output"
+ }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/java_defs.h b/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/java_defs.h
index 0f1002b5953..8a3e16dbf3a 100644
--- a/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/java_defs.h
+++ b/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/java_defs.h
@@ -97,22 +97,25 @@ class Type {
static Type IterableOf(const Type& type) {
return Interface("Iterable").add_parameter(type);
}
+ static Type DataTypeOf(const Type& type) {
+ return Class("DataType", "org.tensorflow").add_parameter(type);
+ }
static Type ForDataType(DataType data_type) {
switch (data_type) {
case DataType::DT_BOOL:
- return Class("Boolean");
+ return Class("TBool", "org.tensorflow.types");
case DataType::DT_STRING:
- return Class("String");
+ return Class("TString", "org.tensorflow.types");
case DataType::DT_FLOAT:
- return Class("Float");
+ return Class("TFloat", "org.tensorflow.types");
case DataType::DT_DOUBLE:
- return Class("Double");
+ return Class("TDouble", "org.tensorflow.types");
case DataType::DT_UINT8:
- return Class("UInt8", "org.tensorflow.types");
+ return Class("TUInt8", "org.tensorflow.types");
case DataType::DT_INT32:
- return Class("Integer");
+ return Class("TInt32", "org.tensorflow.types");
case DataType::DT_INT64:
- return Class("Long");
+ return Class("TInt64", "org.tensorflow.types");
case DataType::DT_RESOURCE:
// TODO(karllessard) create a Resource utility class that could be
// used to store a resource and its type (passed in a second argument).
diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/op_generator.cc b/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/op_generator.cc
index 92cb406e868..997ad561113 100644
--- a/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/op_generator.cc
+++ b/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/op_generator.cc
@@ -124,24 +124,16 @@ void WriteSetAttrDirective(const AttributeSpec& attr, bool optional,
.EndLine()
.BeginBlock("for (int i = 0; i < " + array_name + ".length; ++i)")
.Append(array_name + "[i] = ");
- if (attr.type().kind() == Type::GENERIC) {
- writer->Append("DataType.fromClass(" + var_name + ".get(i));");
- } else {
- writer->Append(var_name + ".get(i);");
- }
+ writer->Append(var_name + ".get(i);");
writer->EndLine()
.EndBlock()
.Append("opBuilder.setAttr(\"" + attr.op_def_name() + "\", ")
.Append(array_name + ");")
.EndLine();
} else {
- writer->Append("opBuilder.setAttr(\"" + attr.op_def_name() + "\", ");
- if (attr.var().type().name() == "Class") {
- writer->Append("DataType.fromClass(" + var_name + "));");
- } else {
- writer->Append(var_name + ");");
- }
- writer->EndLine();
+ writer->Append("opBuilder.setAttr(\"" + attr.op_def_name() + "\", ")
+ .Append(var_name + ");")
+ .EndLine();
}
}
@@ -179,7 +171,7 @@ void RenderSecondaryFactoryMethod(const OpSpec& op, const Type& op_class,
if (attr.type().kind() == Type::GENERIC &&
default_types.find(attr.type().name()) != default_types.end()) {
factory_statement << default_types.at(attr.type().name()).name()
- << ".class";
+ << ".DTYPE";
} else {
AddArgument(attr.var(), attr.description(), &factory, &factory_doc);
factory_statement << attr.var().name();
@@ -345,11 +337,10 @@ void RenderInterfaceImpl(const OpSpec& op, RenderMode mode,
if (mode == OPERAND) {
bool cast2obj = output.type().wildcard();
- Type return_type =
- Type::Class("Output", "org.tensorflow")
- .add_parameter(cast2obj ? Type::Class("Object") : output.type());
+ Type return_type = Type::Class("Output", "org.tensorflow")
+ .add_parameter(cast2obj ? Type::Class("TType", "org.tensorflow.types.family") : output.type());
Method as_output = Method::Create("asOutput", return_type)
- .add_annotation(Annotation::Create("Override"));
+ .add_annotation(Annotation::Create("Override"));
if (cast2obj) {
as_output.add_annotation(
Annotation::Create("SuppressWarnings").attributes("\"unchecked\""));
@@ -365,7 +356,7 @@ void RenderInterfaceImpl(const OpSpec& op, RenderMode mode,
} else if (mode == LIST_OPERAND) {
Type operand = Type::Interface("Operand", "org.tensorflow");
if (output.type().wildcard()) {
- operand.add_parameter(Type::Class("Object"));
+ operand.add_parameter(Type::Class("TType", "org.tensorflow.types.family"));
} else {
operand.add_parameter(output.type());
}
@@ -429,7 +420,7 @@ void GenerateOp(const OpSpec& op, const EndpointSpec& endpoint,
RenderMode mode = DEFAULT;
if (op.outputs().size() == 1) {
const ArgumentSpec& output = op.outputs().front();
- Type operand_type(output.type().wildcard() ? Type::Class("Object")
+ Type operand_type(output.type().wildcard() ? Type::Class("TType", "org.tensorflow.types.family")
: output.type());
Type operand_inf(Type::Interface("Operand", "org.tensorflow")
.add_parameter(operand_type));
diff --git a/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/op_specs.cc b/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/op_specs.cc
index 004c6b1bfa6..5bb63109df5 100644
--- a/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/op_specs.cc
+++ b/tensorflow-core/tensorflow-core-api/src/bazel/op_generator/op_specs.cc
@@ -86,7 +86,8 @@ class TypeResolver {
if (next_generic_letter_ > 'Z') {
next_generic_letter_ = 'A';
}
- return Type::Generic(string(1, generic_letter));
+ return Type::Generic(string(1, generic_letter))
+ .add_supertype(Type::Class("TType", "org.tensorflow.types.family"));
}
};
@@ -148,7 +149,7 @@ std::pair TypeResolver::TypesOf(const OpDef_AttrDef& attr_def,
types = MakeTypePair(Type::Class("Boolean"), Type::Boolean());
} else if (attr_type == "shape") {
- types = MakeTypePair(Type::Class("Shape", "org.tensorflow"));
+ types = MakeTypePair(Type::Class("Shape", "org.tensorflow.tools"));
} else if (attr_type == "tensor") {
types = MakeTypePair(Type::Class("Tensor", "org.tensorflow")
@@ -157,7 +158,7 @@ std::pair TypeResolver::TypesOf(const OpDef_AttrDef& attr_def,
} else if (attr_type == "type") {
Type type = *iterable_out ? Type::Wildcard() : NextGeneric();
if (IsRealNumbers(attr_def.allowed_values())) {
- type.add_supertype(Type::Class("Number"));
+ type.add_supertype(Type::Class("TNumber", "org.tensorflow.types.family"));
}
types = MakeTypePair(type, Type::Enum("DataType", "org.tensorflow"));
@@ -305,7 +306,7 @@ AttributeSpec CreateAttribute(const OpDef_AttrDef& attr_def,
bool iterable = false;
std::pair types = type_resolver->TypesOf(attr_def, &iterable);
Type var_type = types.first.kind() == Type::GENERIC
- ? Type::ClassOf(types.first)
+ ? Type::DataTypeOf(types.first)
: types.first;
if (iterable) {
var_type = Type::ListOf(var_type);
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/AudioOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/AudioOps.java
index e284ca9edb6..6d4c1fdd75b 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/AudioOps.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/AudioOps.java
@@ -5,6 +5,9 @@
import org.tensorflow.op.audio.DecodeWav;
import org.tensorflow.op.audio.EncodeWav;
import org.tensorflow.op.audio.Mfcc;
+import org.tensorflow.types.TFloat;
+import org.tensorflow.types.TInt32;
+import org.tensorflow.types.TString;
/**
* An API for building {@code audio} operations as {@link Op Op}s
@@ -18,33 +21,6 @@ public final class AudioOps {
this.scope = scope;
}
- /**
- * Builds an {@link AudioSpectrogram} operation
- *
- * @param input Float representation of audio data.
- * @param windowSize How wide the input window is in samples. For the highest efficiency
- * @param stride How widely apart the center of adjacent sample windows should be.
- * @param options carries optional attributes values
- * @return a new instance of AudioSpectrogram
- * @see org.tensorflow.op.audio.AudioSpectrogram
- */
- public AudioSpectrogram audioSpectrogram(Operand input, Long windowSize, Long stride,
- AudioSpectrogram.Options... options) {
- return AudioSpectrogram.create(scope, input, windowSize, stride, options);
- }
-
- /**
- * Builds an {@link EncodeWav} operation
- *
- * @param audio 2-D with shape `[length, channels]`.
- * @param sampleRate Scalar containing the sample frequency.
- * @return a new instance of EncodeWav
- * @see org.tensorflow.op.audio.EncodeWav
- */
- public EncodeWav encodeWav(Operand audio, Operand sampleRate) {
- return EncodeWav.create(scope, audio, sampleRate);
- }
-
/**
* Builds an {@link DecodeWav} operation
*
@@ -53,7 +29,7 @@ public EncodeWav encodeWav(Operand audio, Operand sampleRate) {
* @return a new instance of DecodeWav
* @see org.tensorflow.op.audio.DecodeWav
*/
- public DecodeWav decodeWav(Operand contents, DecodeWav.Options... options) {
+ public DecodeWav decodeWav(Operand contents, DecodeWav.Options... options) {
return DecodeWav.create(scope, contents, options);
}
@@ -66,8 +42,35 @@ public DecodeWav decodeWav(Operand contents, DecodeWav.Options... option
* @return a new instance of Mfcc
* @see org.tensorflow.op.audio.Mfcc
*/
- public Mfcc mfcc(Operand spectrogram, Operand sampleRate,
+ public Mfcc mfcc(Operand spectrogram, Operand sampleRate,
Mfcc.Options... options) {
return Mfcc.create(scope, spectrogram, sampleRate, options);
}
+
+ /**
+ * Builds an {@link EncodeWav} operation
+ *
+ * @param audio 2-D with shape `[length, channels]`.
+ * @param sampleRate Scalar containing the sample frequency.
+ * @return a new instance of EncodeWav
+ * @see org.tensorflow.op.audio.EncodeWav
+ */
+ public EncodeWav encodeWav(Operand audio, Operand sampleRate) {
+ return EncodeWav.create(scope, audio, sampleRate);
+ }
+
+ /**
+ * Builds an {@link AudioSpectrogram} operation
+ *
+ * @param input Float representation of audio data.
+ * @param windowSize How wide the input window is in samples. For the highest efficiency
+ * @param stride How widely apart the center of adjacent sample windows should be.
+ * @param options carries optional attributes values
+ * @return a new instance of AudioSpectrogram
+ * @see org.tensorflow.op.audio.AudioSpectrogram
+ */
+ public AudioSpectrogram audioSpectrogram(Operand input, Long windowSize, Long stride,
+ AudioSpectrogram.Options... options) {
+ return AudioSpectrogram.create(scope, input, windowSize, stride, options);
+ }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/BitwiseOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/BitwiseOps.java
index 51798c83e24..37b1105fb83 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/BitwiseOps.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/BitwiseOps.java
@@ -7,6 +7,7 @@
import org.tensorflow.op.bitwise.Invert;
import org.tensorflow.op.bitwise.LeftShift;
import org.tensorflow.op.bitwise.RightShift;
+import org.tensorflow.types.family.TNumber;
/**
* An API for building {@code bitwise} operations as {@link Op Op}s
@@ -21,50 +22,50 @@ public final class BitwiseOps {
}
/**
- * Builds an {@link Invert} operation
+ * Builds an {@link BitwiseOr} operation
*
* @param x
- * @return a new instance of Invert
- * @see org.tensorflow.op.bitwise.Invert
+ * @param y
+ * @return a new instance of BitwiseOr
+ * @see org.tensorflow.op.bitwise.BitwiseOr
*/
- public Invert invert(Operand x) {
- return Invert.create(scope, x);
+ public BitwiseOr bitwiseOr(Operand x, Operand y) {
+ return BitwiseOr.create(scope, x, y);
}
/**
- * Builds an {@link BitwiseAnd} operation
+ * Builds an {@link BitwiseXor} operation
*
* @param x
* @param y
- * @return a new instance of BitwiseAnd
- * @see org.tensorflow.op.bitwise.BitwiseAnd
+ * @return a new instance of BitwiseXor
+ * @see org.tensorflow.op.bitwise.BitwiseXor
*/
- public BitwiseAnd bitwiseAnd(Operand x, Operand y) {
- return BitwiseAnd.create(scope, x, y);
+ public BitwiseXor bitwiseXor(Operand x, Operand y) {
+ return BitwiseXor.create(scope, x, y);
}
/**
- * Builds an {@link BitwiseOr} operation
+ * Builds an {@link BitwiseAnd} operation
*
* @param x
* @param y
- * @return a new instance of BitwiseOr
- * @see org.tensorflow.op.bitwise.BitwiseOr
+ * @return a new instance of BitwiseAnd
+ * @see org.tensorflow.op.bitwise.BitwiseAnd
*/
- public BitwiseOr bitwiseOr(Operand x, Operand y) {
- return BitwiseOr.create(scope, x, y);
+ public BitwiseAnd bitwiseAnd(Operand x, Operand y) {
+ return BitwiseAnd.create(scope, x, y);
}
/**
- * Builds an {@link LeftShift} operation
+ * Builds an {@link Invert} operation
*
* @param x
- * @param y
- * @return a new instance of LeftShift
- * @see org.tensorflow.op.bitwise.LeftShift
+ * @return a new instance of Invert
+ * @see org.tensorflow.op.bitwise.Invert
*/
- public LeftShift leftShift(Operand x, Operand y) {
- return LeftShift.create(scope, x, y);
+ public Invert invert(Operand x) {
+ return Invert.create(scope, x);
}
/**
@@ -75,19 +76,19 @@ public LeftShift leftShift(Operand x, Operand y) {
* @return a new instance of RightShift
* @see org.tensorflow.op.bitwise.RightShift
*/
- public RightShift rightShift(Operand x, Operand y) {
+ public RightShift rightShift(Operand x, Operand y) {
return RightShift.create(scope, x, y);
}
/**
- * Builds an {@link BitwiseXor} operation
+ * Builds an {@link LeftShift} operation
*
* @param x
* @param y
- * @return a new instance of BitwiseXor
- * @see org.tensorflow.op.bitwise.BitwiseXor
+ * @return a new instance of LeftShift
+ * @see org.tensorflow.op.bitwise.LeftShift
*/
- public BitwiseXor bitwiseXor(Operand x, Operand y) {
- return BitwiseXor.create(scope, x, y);
+ public LeftShift leftShift(Operand x, Operand y) {
+ return LeftShift.create(scope, x, y);
}
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java
index 6bb3e67e93f..79893582201 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DataOps.java
@@ -1,20 +1,25 @@
package org.tensorflow.op;
import java.util.List;
+import org.tensorflow.DataType;
import org.tensorflow.Operand;
-import org.tensorflow.Shape;
import org.tensorflow.op.data.AnonymousIterator;
import org.tensorflow.op.data.DeserializeIterator;
import org.tensorflow.op.data.IteratorGetNext;
import org.tensorflow.op.data.IteratorGetNextAsOptional;
import org.tensorflow.op.data.IteratorGetNextSync;
import org.tensorflow.op.data.IteratorToStringHandle;
+import org.tensorflow.op.data.KafkaDataset;
import org.tensorflow.op.data.MakeIterator;
import org.tensorflow.op.data.OptionalFromValue;
import org.tensorflow.op.data.OptionalGetValue;
import org.tensorflow.op.data.OptionalHasValue;
import org.tensorflow.op.data.OptionalNone;
import org.tensorflow.op.data.SerializeIterator;
+import org.tensorflow.tools.Shape;
+import org.tensorflow.types.TBool;
+import org.tensorflow.types.TInt64;
+import org.tensorflow.types.TString;
/**
* An API for building {@code data} operations as {@link Op Op}s
@@ -29,53 +34,44 @@ public final class DataOps {
}
/**
- * Builds an {@link OptionalNone} operation
- *
- * @return a new instance of OptionalNone
- * @see org.tensorflow.op.data.OptionalNone
- */
- public OptionalNone optionalNone() {
- return OptionalNone.create(scope);
- }
-
- /**
- * Builds an {@link AnonymousIterator} operation
+ * Builds an {@link KafkaDataset} operation
*
- * @param outputTypes
- * @param outputShapes
- * @return a new instance of AnonymousIterator
- * @see org.tensorflow.op.data.AnonymousIterator
+ * @param topics A `tf.string` tensor containing one or more subscriptions,
+ * @param servers A list of bootstrap servers.
+ * @param group The consumer group id.
+ * @param eof If True, the kafka reader will stop on EOF.
+ * @param timeout The timeout value for the Kafka Consumer to wait
+ * @param configGlobal A `tf.string` tensor containing global configuration
+ * @param configTopic A `tf.string` tensor containing topic configuration
+ * @return a new instance of KafkaDataset
+ * @see org.tensorflow.op.data.KafkaDataset
*/
- public AnonymousIterator anonymousIterator(List> outputTypes, List outputShapes) {
- return AnonymousIterator.create(scope, outputTypes, outputShapes);
+ public KafkaDataset kafkaDataset(Operand topics, Operand servers,
+ Operand group, Operand eof, Operand timeout,
+ Operand configGlobal, Operand configTopic) {
+ return KafkaDataset.create(scope, topics, servers, group, eof, timeout, configGlobal, configTopic);
}
/**
- * Builds an {@link OptionalGetValue} operation
+ * Builds an {@link DeserializeIterator} operation
*
- * @param optional
- * @param outputTypes
- * @param outputShapes
- * @return a new instance of OptionalGetValue
- * @see org.tensorflow.op.data.OptionalGetValue
+ * @param resourceHandle A handle to an iterator resource.
+ * @param serialized A variant tensor storing the state of the iterator contained in the
+ * @return a new instance of DeserializeIterator
+ * @see org.tensorflow.op.data.DeserializeIterator
*/
- public OptionalGetValue optionalGetValue(Operand> optional, List> outputTypes,
- List outputShapes) {
- return OptionalGetValue.create(scope, optional, outputTypes, outputShapes);
+ public DeserializeIterator deserializeIterator(Operand> resourceHandle, Operand> serialized) {
+ return DeserializeIterator.create(scope, resourceHandle, serialized);
}
/**
- * Builds an {@link IteratorGetNext} operation
+ * Builds an {@link OptionalNone} operation
*
- * @param iterator
- * @param outputTypes
- * @param outputShapes
- * @return a new instance of IteratorGetNext
- * @see org.tensorflow.op.data.IteratorGetNext
+ * @return a new instance of OptionalNone
+ * @see org.tensorflow.op.data.OptionalNone
*/
- public IteratorGetNext iteratorGetNext(Operand> iterator, List> outputTypes,
- List outputShapes) {
- return IteratorGetNext.create(scope, iterator, outputTypes, outputShapes);
+ public OptionalNone optionalNone() {
+ return OptionalNone.create(scope);
}
/**
@@ -99,7 +95,7 @@ public OptionalFromValue optionalFromValue(Iterable> components) {
* @see org.tensorflow.op.data.IteratorGetNextAsOptional
*/
public IteratorGetNextAsOptional iteratorGetNextAsOptional(Operand> iterator,
- List> outputTypes, List outputShapes) {
+ List> outputTypes, List outputShapes) {
return IteratorGetNextAsOptional.create(scope, iterator, outputTypes, outputShapes);
}
@@ -114,20 +110,6 @@ public IteratorToStringHandle iteratorToStringHandle(Operand> resourceHandle)
return IteratorToStringHandle.create(scope, resourceHandle);
}
- /**
- * Builds an {@link IteratorGetNextSync} operation
- *
- * @param iterator
- * @param outputTypes
- * @param outputShapes
- * @return a new instance of IteratorGetNextSync
- * @see org.tensorflow.op.data.IteratorGetNextSync
- */
- public IteratorGetNextSync iteratorGetNextSync(Operand> iterator, List> outputTypes,
- List outputShapes) {
- return IteratorGetNextSync.create(scope, iterator, outputTypes, outputShapes);
- }
-
/**
* Builds an {@link OptionalHasValue} operation
*
@@ -139,6 +121,17 @@ public OptionalHasValue optionalHasValue(Operand> optional) {
return OptionalHasValue.create(scope, optional);
}
+ /**
+ * Builds an {@link SerializeIterator} operation
+ *
+ * @param resourceHandle A handle to an iterator resource.
+ * @return a new instance of SerializeIterator
+ * @see org.tensorflow.op.data.SerializeIterator
+ */
+ public SerializeIterator serializeIterator(Operand> resourceHandle) {
+ return SerializeIterator.create(scope, resourceHandle);
+ }
+
/**
* Builds an {@link MakeIterator} operation
*
@@ -152,25 +145,57 @@ public MakeIterator makeIterator(Operand> dataset, Operand> iterator) {
}
/**
- * Builds an {@link DeserializeIterator} operation
+ * Builds an {@link OptionalGetValue} operation
*
- * @param resourceHandle A handle to an iterator resource.
- * @param serialized A variant tensor storing the state of the iterator contained in the
- * @return a new instance of DeserializeIterator
- * @see org.tensorflow.op.data.DeserializeIterator
+ * @param optional
+ * @param outputTypes
+ * @param outputShapes
+ * @return a new instance of OptionalGetValue
+ * @see org.tensorflow.op.data.OptionalGetValue
*/
- public DeserializeIterator deserializeIterator(Operand> resourceHandle, Operand> serialized) {
- return DeserializeIterator.create(scope, resourceHandle, serialized);
+ public OptionalGetValue optionalGetValue(Operand> optional, List> outputTypes,
+ List outputShapes) {
+ return OptionalGetValue.create(scope, optional, outputTypes, outputShapes);
}
/**
- * Builds an {@link SerializeIterator} operation
+ * Builds an {@link IteratorGetNext} operation
*
- * @param resourceHandle A handle to an iterator resource.
- * @return a new instance of SerializeIterator
- * @see org.tensorflow.op.data.SerializeIterator
+ * @param iterator
+ * @param outputTypes
+ * @param outputShapes
+ * @return a new instance of IteratorGetNext
+ * @see org.tensorflow.op.data.IteratorGetNext
*/
- public SerializeIterator serializeIterator(Operand> resourceHandle) {
- return SerializeIterator.create(scope, resourceHandle);
+ public IteratorGetNext iteratorGetNext(Operand> iterator, List> outputTypes,
+ List outputShapes) {
+ return IteratorGetNext.create(scope, iterator, outputTypes, outputShapes);
+ }
+
+ /**
+ * Builds an {@link AnonymousIterator} operation
+ *
+ * @param outputTypes
+ * @param outputShapes
+ * @return a new instance of AnonymousIterator
+ * @see org.tensorflow.op.data.AnonymousIterator
+ */
+ public AnonymousIterator anonymousIterator(List> outputTypes,
+ List outputShapes) {
+ return AnonymousIterator.create(scope, outputTypes, outputShapes);
+ }
+
+ /**
+ * Builds an {@link IteratorGetNextSync} operation
+ *
+ * @param iterator
+ * @param outputTypes
+ * @param outputShapes
+ * @return a new instance of IteratorGetNextSync
+ * @see org.tensorflow.op.data.IteratorGetNextSync
+ */
+ public IteratorGetNextSync iteratorGetNextSync(Operand> iterator, List> outputTypes,
+ List outputShapes) {
+ return IteratorGetNextSync.create(scope, iterator, outputTypes, outputShapes);
}
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java
index 7766fefed69..083b065f112 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/DtypesOps.java
@@ -1,9 +1,12 @@
package org.tensorflow.op;
+import org.tensorflow.DataType;
import org.tensorflow.Operand;
import org.tensorflow.op.dtypes.AsString;
import org.tensorflow.op.dtypes.Cast;
import org.tensorflow.op.dtypes.Complex;
+import org.tensorflow.types.family.TNumber;
+import org.tensorflow.types.family.TType;
/**
* An API for building {@code dtypes} operations as {@link Op Op}s
@@ -26,7 +29,8 @@ public final class DtypesOps {
* @return a new instance of Cast
* @see org.tensorflow.op.dtypes.Cast
*/
- public Cast cast(Operand x, Class DstT, Cast.Options... options) {
+ public Cast cast(Operand x, DataType DstT,
+ Cast.Options... options) {
return Cast.create(scope, x, DstT, options);
}
@@ -38,7 +42,7 @@ public Cast cast(Operand x, Class DstT, Cast.Options... options)
* @return a new instance of AsString
* @see org.tensorflow.op.dtypes.AsString
*/
- public AsString asString(Operand input, AsString.Options... options) {
+ public AsString asString(Operand input, AsString.Options... options) {
return AsString.create(scope, input, options);
}
@@ -51,7 +55,8 @@ public AsString asString(Operand input, AsString.Options... options) {
* @return a new instance of Complex
* @see org.tensorflow.op.dtypes.Complex
*/
- public Complex complex(Operand real, Operand imag, Class Tout) {
+ public Complex complex(Operand real, Operand imag,
+ DataType Tout) {
return Complex.create(scope, real, imag, Tout);
}
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java
index 98e4a46455c..18f0229a9c7 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/annotations/org/tensorflow/op/ImageOps.java
@@ -1,6 +1,7 @@
package org.tensorflow.op;
import java.util.List;
+import org.tensorflow.DataType;
import org.tensorflow.Operand;
import org.tensorflow.op.image.AdjustContrast;
import org.tensorflow.op.image.AdjustHue;
@@ -31,7 +32,13 @@
import org.tensorflow.op.image.ResizeNearestNeighbor;
import org.tensorflow.op.image.RgbToHsv;
import org.tensorflow.op.image.SampleDistortedBoundingBox;
-import org.tensorflow.types.UInt8;
+import org.tensorflow.types.TFloat;
+import org.tensorflow.types.TInt32;
+import org.tensorflow.types.TInt64;
+import org.tensorflow.types.TString;
+import org.tensorflow.types.TUInt8;
+import org.tensorflow.types.family.TNumber;
+import org.tensorflow.types.family.TType;
/**
* An API for building {@code image} operations as {@link Op Op}s
@@ -46,43 +53,30 @@ public final class ImageOps {
}
/**
- * Builds an {@link AdjustHue} operation
- *
- * @param images Images to adjust. At least 3-D.
- * @param delta A float delta to add to the hue.
- * @return a new instance of AdjustHue
- * @see org.tensorflow.op.image.AdjustHue
- */
- public AdjustHue adjustHue(Operand images, Operand delta) {
- return AdjustHue.create(scope, images, delta);
- }
-
- /**
- * Builds an {@link EncodePng} operation
+ * Builds an {@link DrawBoundingBoxes} operation
*
- * @param image 3-D with shape `[height, width, channels]`.
- * @param options carries optional attributes values
- * @return a new instance of EncodePng
- * @see org.tensorflow.op.image.EncodePng
+ * @param images 4-D with shape `[batch, height, width, depth]`. A batch of images.
+ * @param boxes 3-D with shape `[batch, num_bounding_boxes, 4]` containing bounding
+ * @return a new instance of DrawBoundingBoxes
+ * @see org.tensorflow.op.image.DrawBoundingBoxes
*/
- public EncodePng encodePng(Operand image, EncodePng.Options... options) {
- return EncodePng.create(scope, image, options);
+ public DrawBoundingBoxes drawBoundingBoxes(Operand images,
+ Operand boxes) {
+ return DrawBoundingBoxes.create(scope, images, boxes);
}
/**
- * Builds an {@link SampleDistortedBoundingBox} operation
+ * Builds an {@link ResizeBilinear} operation
*
- * @param imageSize 1-D, containing `[height, width, channels]`.
- * @param boundingBoxes 3-D with shape `[batch, N, 4]` describing the N bounding boxes
- * @param minObjectCovered The cropped area of the image must contain at least this
+ * @param images 4-D with shape `[batch, height, width, channels]`.
+ * @param size = A 1-D int32 Tensor of 2 elements: `new_height, new_width`. The
* @param options carries optional attributes values
- * @return a new instance of SampleDistortedBoundingBox
- * @see org.tensorflow.op.image.SampleDistortedBoundingBox
+ * @return a new instance of ResizeBilinear
+ * @see org.tensorflow.op.image.ResizeBilinear
*/
- public SampleDistortedBoundingBox sampleDistortedBoundingBox(
- Operand imageSize, Operand boundingBoxes, Operand minObjectCovered,
- SampleDistortedBoundingBox.Options... options) {
- return SampleDistortedBoundingBox.create(scope, imageSize, boundingBoxes, minObjectCovered, options);
+ public ResizeBilinear resizeBilinear(Operand images, Operand size,
+ ResizeBilinear.Options... options) {
+ return ResizeBilinear.create(scope, images, size, options);
}
/**
@@ -92,138 +86,156 @@ public SampleDistortedBoundingBox sampleDistortedBoundingB
* @return a new instance of DecodeGif
* @see org.tensorflow.op.image.DecodeGif
*/
- public DecodeGif decodeGif(Operand contents) {
+ public DecodeGif decodeGif(Operand contents) {
return DecodeGif.create(scope, contents);
}
/**
- * Builds an {@link RandomCrop} operation
+ * Builds an {@link RgbToHsv} operation
*
- * @param image 3-D of shape `[height, width, channels]`.
- * @param size 1-D of length 2 containing: `crop_height`, `crop_width`..
+ * @param images 1-D or higher rank. RGB data to convert. Last dimension must be size 3.
+ * @return a new instance of RgbToHsv
+ * @see org.tensorflow.op.image.RgbToHsv
+ */
+ public RgbToHsv rgbToHsv(Operand images) {
+ return RgbToHsv.create(scope, images);
+ }
+
+ /**
+ * Builds an {@link HsvToRgb} operation
+ *
+ * @param images 1-D or higher rank. HSV data to convert. Last dimension must be size 3.
+ * @return a new instance of HsvToRgb
+ * @see org.tensorflow.op.image.HsvToRgb
+ */
+ public HsvToRgb hsvToRgb(Operand images) {
+ return HsvToRgb.create(scope, images);
+ }
+
+ /**
+ * Builds an {@link CropAndResizeGradBoxes} operation
+ *
+ * @param grads A 4-D tensor of shape `[num_boxes, crop_height, crop_width, depth]`.
+ * @param image A 4-D tensor of shape `[batch, image_height, image_width, depth]`.
+ * @param boxes A 2-D tensor of shape `[num_boxes, 4]`. The `i`-th row of the tensor
+ * @param boxInd A 1-D tensor of shape `[num_boxes]` with int32 values in `[0, batch)`.
* @param options carries optional attributes values
- * @return a new instance of RandomCrop
- * @see org.tensorflow.op.image.RandomCrop
+ * @return a new instance of CropAndResizeGradBoxes
+ * @see org.tensorflow.op.image.CropAndResizeGradBoxes
*/
- public RandomCrop randomCrop(Operand image, Operand size,
- RandomCrop.Options... options) {
- return RandomCrop.create(scope, image, size, options);
+ public CropAndResizeGradBoxes cropAndResizeGradBoxes(Operand grads,
+ Operand image, Operand boxes, Operand boxInd,
+ CropAndResizeGradBoxes.Options... options) {
+ return CropAndResizeGradBoxes.create(scope, grads, image, boxes, boxInd, options);
}
/**
- * Builds an {@link DecodePng} operation
+ * Builds an {@link DecodeBmp} operation
*
- * @param contents 0-D. The PNG-encoded image.
- * @param dtype
+ * @param contents 0-D. The BMP-encoded image.
* @param options carries optional attributes values
- * @return a new instance of DecodePng
- * @see org.tensorflow.op.image.DecodePng
+ * @return a new instance of DecodeBmp
+ * @see org.tensorflow.op.image.DecodeBmp
*/
- public DecodePng decodePng(Operand contents, Class dtype,
- DecodePng.Options... options) {
- return DecodePng.create(scope, contents, dtype, options);
+ public DecodeBmp decodeBmp(Operand contents, DecodeBmp.Options... options) {
+ return DecodeBmp.create(scope, contents, options);
}
/**
- * Builds an {@link NonMaxSuppression} operation
+ * Builds an {@link ExtractGlimpse} operation
*
- * @param boxes A 2-D float tensor of shape `[num_boxes, 4]`.
- * @param scores A 1-D float tensor of shape `[num_boxes]` representing a single
- * @param maxOutputSize A scalar integer tensor representing the maximum number of
- * @param iouThreshold A 0-D float tensor representing the threshold for deciding whether
- * @param scoreThreshold A 0-D float tensor representing the threshold for deciding when to remove
+ * @param input A 4-D float tensor of shape `[batch_size, height, width, channels]`.
+ * @param size A 1-D tensor of 2 elements containing the size of the glimpses
+ * @param offsets A 2-D integer tensor of shape `[batch_size, 2]` containing
* @param options carries optional attributes values
- * @return a new instance of NonMaxSuppression
- * @see org.tensorflow.op.image.NonMaxSuppression
+ * @return a new instance of ExtractGlimpse
+ * @see org.tensorflow.op.image.ExtractGlimpse
*/
- public NonMaxSuppression nonMaxSuppression(Operand boxes,
- Operand scores, Operand maxOutputSize, Operand iouThreshold,
- Operand scoreThreshold, NonMaxSuppression.Options... options) {
- return NonMaxSuppression.create(scope, boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, options);
+ public ExtractGlimpse extractGlimpse(Operand input, Operand size,
+ Operand offsets, ExtractGlimpse.Options... options) {
+ return ExtractGlimpse.create(scope, input, size, offsets, options);
}
/**
- * Builds an {@link ResizeBilinear} operation
+ * Builds an {@link ResizeBicubic} operation
*
* @param images 4-D with shape `[batch, height, width, channels]`.
* @param size = A 1-D int32 Tensor of 2 elements: `new_height, new_width`. The
* @param options carries optional attributes values
- * @return a new instance of ResizeBilinear
- * @see org.tensorflow.op.image.ResizeBilinear
+ * @return a new instance of ResizeBicubic
+ * @see org.tensorflow.op.image.ResizeBicubic
*/
- public ResizeBilinear resizeBilinear(Operand images, Operand size,
- ResizeBilinear.Options... options) {
- return ResizeBilinear.create(scope, images, size, options);
+ public ResizeBicubic resizeBicubic(Operand images, Operand size,
+ ResizeBicubic.Options... options) {
+ return ResizeBicubic.create(scope, images, size, options);
}
/**
* Builds an {@link DecodePng} operation
*
* @param contents 0-D. The PNG-encoded image.
+ * @param dtype
* @param options carries optional attributes values
* @return a new instance of DecodePng
* @see org.tensorflow.op.image.DecodePng
*/
- public DecodePng decodePng(Operand contents, DecodePng.Options... options) {
- return DecodePng.create(scope, contents, options);
+ public DecodePng decodePng(Operand contents, DataType dtype,
+ DecodePng.Options... options) {
+ return DecodePng.create(scope, contents, dtype, options);
}
/**
- * Builds an {@link ExtractJpegShape} operation
+ * Builds an {@link RandomCrop} operation
*
- * @param contents 0-D. The JPEG-encoded image.
- * @return a new instance of ExtractJpegShape
- * @see org.tensorflow.op.image.ExtractJpegShape
+ * @param image 3-D of shape `[height, width, channels]`.
+ * @param size 1-D of length 2 containing: `crop_height`, `crop_width`..
+ * @param options carries optional attributes values
+ * @return a new instance of RandomCrop
+ * @see org.tensorflow.op.image.RandomCrop
*/
- public ExtractJpegShape extractJpegShape(Operand contents) {
- return ExtractJpegShape.create(scope, contents);
+ public RandomCrop randomCrop(Operand image, Operand size,
+ RandomCrop.Options... options) {
+ return RandomCrop.create(scope, image, size, options);
}
/**
- * Builds an {@link AdjustContrast} operation
+ * Builds an {@link DecodeAndCropJpeg} operation
*
- * @param images Images to adjust. At least 3-D.
- * @param contrastFactor A float multiplier for adjusting contrast.
- * @return a new instance of AdjustContrast
- * @see org.tensorflow.op.image.AdjustContrast
+ * @param contents 0-D. The JPEG-encoded image.
+ * @param cropWindow 1-D. The crop window: [crop_y, crop_x, crop_height, crop_width].
+ * @param options carries optional attributes values
+ * @return a new instance of DecodeAndCropJpeg
+ * @see org.tensorflow.op.image.DecodeAndCropJpeg
*/
- public AdjustContrast adjustContrast(Operand images,
- Operand contrastFactor) {
- return AdjustContrast.create(scope, images, contrastFactor);
+ public DecodeAndCropJpeg decodeAndCropJpeg(Operand contents, Operand cropWindow,
+ DecodeAndCropJpeg.Options... options) {
+ return DecodeAndCropJpeg.create(scope, contents, cropWindow, options);
}
/**
- * Builds an {@link CropAndResizeGradImage} operation
+ * Builds an {@link ExtractJpegShape} operation
*
- * @param grads A 4-D tensor of shape `[num_boxes, crop_height, crop_width, depth]`.
- * @param boxes A 2-D tensor of shape `[num_boxes, 4]`. The `i`-th row of the tensor
- * @param boxInd A 1-D tensor of shape `[num_boxes]` with int32 values in `[0, batch)`.
- * @param imageSize A 1-D tensor with value `[batch, image_height, image_width, depth]`
- * @param T
- * @param options carries optional attributes values
- * @return a new instance of CropAndResizeGradImage
- * @see org.tensorflow.op.image.CropAndResizeGradImage
+ * @param contents 0-D. The JPEG-encoded image.
+ * @param outputType (Optional) The output type of the operation (int32 or int64).
+ * @return a new instance of ExtractJpegShape
+ * @see org.tensorflow.op.image.ExtractJpegShape
*/
- public CropAndResizeGradImage cropAndResizeGradImage(Operand grads,
- Operand boxes, Operand boxInd, Operand imageSize, Class T,
- CropAndResizeGradImage.Options... options) {
- return CropAndResizeGradImage.create(scope, grads, boxes, boxInd, imageSize, T, options);
+ public ExtractJpegShape extractJpegShape(Operand contents,
+ DataType outputType) {
+ return ExtractJpegShape.create(scope, contents, outputType);
}
/**
- * Builds an {@link CropAndResize} operation
+ * Builds an {@link EncodeJpegVariableQuality} operation
*
- * @param image A 4-D tensor of shape `[batch, image_height, image_width, depth]`.
- * @param boxes A 2-D tensor of shape `[num_boxes, 4]`. The `i`-th row of the tensor
- * @param boxInd A 1-D tensor of shape `[num_boxes]` with int32 values in `[0, batch)`.
- * @param cropSize A 1-D tensor of 2 elements, `size = [crop_height, crop_width]`. All
- * @param options carries optional attributes values
- * @return a new instance of CropAndResize
- * @see org.tensorflow.op.image.CropAndResize
+ * @param images Images to adjust. At least 3-D.
+ * @param quality An int quality to encode to.
+ * @return a new instance of EncodeJpegVariableQuality
+ * @see org.tensorflow.op.image.EncodeJpegVariableQuality
*/
- public CropAndResize cropAndResize(Operand image, Operand boxes,
- Operand boxInd, Operand cropSize, CropAndResize.Options... options) {
- return CropAndResize.create(scope, image, boxes, boxInd, cropSize, options);
+ public EncodeJpegVariableQuality encodeJpegVariableQuality(Operand images,
+ Operand quality) {
+ return EncodeJpegVariableQuality.create(scope, images, quality);
}
/**
@@ -234,130 +246,142 @@ public CropAndResize cropAndResize(Operand image, Operand<
* @return a new instance of AdjustSaturation
* @see org.tensorflow.op.image.AdjustSaturation
*/
- public AdjustSaturation adjustSaturation(Operand images,
- Operand scale) {
+ public AdjustSaturation adjustSaturation(Operand images,
+ Operand scale) {
return AdjustSaturation.create(scope, images, scale);
}
/**
- * Builds an {@link DecodeAndCropJpeg} operation
+ * Builds an {@link ResizeArea} operation
*
- * @param contents 0-D. The JPEG-encoded image.
- * @param cropWindow 1-D. The crop window: [crop_y, crop_x, crop_height, crop_width].
+ * @param images 4-D with shape `[batch, height, width, channels]`.
+ * @param size = A 1-D int32 Tensor of 2 elements: `new_height, new_width`. The
* @param options carries optional attributes values
- * @return a new instance of DecodeAndCropJpeg
- * @see org.tensorflow.op.image.DecodeAndCropJpeg
+ * @return a new instance of ResizeArea
+ * @see org.tensorflow.op.image.ResizeArea
*/
- public DecodeAndCropJpeg decodeAndCropJpeg(Operand contents, Operand cropWindow,
- DecodeAndCropJpeg.Options... options) {
- return DecodeAndCropJpeg.create(scope, contents, cropWindow, options);
+ public ResizeArea resizeArea(Operand images, Operand size,
+ ResizeArea.Options... options) {
+ return ResizeArea.create(scope, images, size, options);
}
/**
- * Builds an {@link DecodeJpeg} operation
+ * Builds an {@link EncodePng} operation
*
- * @param contents 0-D. The JPEG-encoded image.
+ * @param image 3-D with shape `[height, width, channels]`.
* @param options carries optional attributes values
- * @return a new instance of DecodeJpeg
- * @see org.tensorflow.op.image.DecodeJpeg
+ * @return a new instance of EncodePng
+ * @see org.tensorflow.op.image.EncodePng
*/
- public DecodeJpeg decodeJpeg(Operand contents, DecodeJpeg.Options... options) {
- return DecodeJpeg.create(scope, contents, options);
+ public EncodePng encodePng(Operand image, EncodePng.Options... options) {
+ return EncodePng.create(scope, image, options);
}
/**
- * Builds an {@link ExtractGlimpse} operation
+ * Builds an {@link NonMaxSuppression} operation
*
- * @param input A 4-D float tensor of shape `[batch_size, height, width, channels]`.
- * @param size A 1-D tensor of 2 elements containing the size of the glimpses
- * @param offsets A 2-D integer tensor of shape `[batch_size, 2]` containing
+ * @param boxes A 2-D float tensor of shape `[num_boxes, 4]`.
+ * @param scores A 1-D float tensor of shape `[num_boxes]` representing a single
+ * @param maxOutputSize A scalar integer tensor representing the maximum number of
+ * @param iouThreshold A 0-D float tensor representing the threshold for deciding whether
+ * @param scoreThreshold A 0-D float tensor representing the threshold for deciding when to remove
* @param options carries optional attributes values
- * @return a new instance of ExtractGlimpse
- * @see org.tensorflow.op.image.ExtractGlimpse
+ * @return a new instance of NonMaxSuppression
+ * @see org.tensorflow.op.image.NonMaxSuppression
*/
- public ExtractGlimpse extractGlimpse(Operand input, Operand size,
- Operand offsets, ExtractGlimpse.Options... options) {
- return ExtractGlimpse.create(scope, input, size, offsets, options);
+ public NonMaxSuppression nonMaxSuppression(
+ Operand boxes, Operand scores, Operand maxOutputSize, Operand iouThreshold,
+ Operand scoreThreshold, NonMaxSuppression.Options... options) {
+ return NonMaxSuppression.create(scope, boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, options);
}
/**
- * Builds an {@link DecodeBmp} operation
+ * Builds an {@link QuantizedResizeBilinear} operation
*
- * @param contents 0-D. The BMP-encoded image.
+ * @param images 4-D with shape `[batch, height, width, channels]`.
+ * @param size = A 1-D int32 Tensor of 2 elements: `new_height, new_width`. The
+ * @param min
+ * @param max
* @param options carries optional attributes values
- * @return a new instance of DecodeBmp
- * @see org.tensorflow.op.image.DecodeBmp
+ * @return a new instance of QuantizedResizeBilinear
+ * @see org.tensorflow.op.image.QuantizedResizeBilinear
*/
- public DecodeBmp decodeBmp(Operand contents, DecodeBmp.Options... options) {
- return DecodeBmp.create(scope, contents, options);
+ public QuantizedResizeBilinear quantizedResizeBilinear(Operand images,
+ Operand size, Operand min, Operand max,
+ QuantizedResizeBilinear.Options... options) {
+ return QuantizedResizeBilinear.create(scope, images, size, min, max, options);
}
/**
- * Builds an {@link ExtractJpegShape} operation
+ * Builds an {@link CropAndResize} operation
*
- * @param contents 0-D. The JPEG-encoded image.
- * @param outputType (Optional) The output type of the operation (int32 or int64).
- * @return a new instance of ExtractJpegShape
- * @see org.tensorflow.op.image.ExtractJpegShape
+ * @param image A 4-D tensor of shape `[batch, image_height, image_width, depth]`.
+ * @param boxes A 2-D tensor of shape `[num_boxes, 4]`. The `i`-th row of the tensor
+ * @param boxInd A 1-D tensor of shape `[num_boxes]` with int32 values in `[0, batch)`.
+ * @param cropSize A 1-D tensor of 2 elements, `size = [crop_height, crop_width]`. All
+ * @param options carries optional attributes values
+ * @return a new instance of CropAndResize
+ * @see org.tensorflow.op.image.CropAndResize
*/
- public