Skip to content

Commit

Permalink
* Include tag_constants.h and signature_constants.h for TensorFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Sep 13, 2018
1 parent dee6581 commit b783f13
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
@@ -1,4 +1,5 @@

* Prevent MKL-DNN from compiling code with `-march=native` ([pull #618](https://github.com/bytedeco/javacpp-presets/pull/618))
* Add an RPATH to `libmkldnn.so.0` to avoid loading issues on Linux ([issue deeplearning4j/deeplearning4j#6366](https://github.com/deeplearning4j/deeplearning4j/issues/6366))
* Fix logic in `tensorflow.Tensor.createIndexer()` to support scalar tensors
* Bundle `libgomp.so.1` in JAR file of MKL-DNN for Linux
Expand All @@ -8,7 +9,7 @@
* Bundle native resources (header files and import libraries) of MKL-DNN
* Make MSBuild compile more efficiently on multiple processors ([pull #599](https://github.com/bytedeco/javacpp-presets/pull/599))
* Add samples for Clang ([pull #598](https://github.com/bytedeco/javacpp-presets/pull/598))
* Include `graph_runner.h`, `shape_refiner.h`, `python_api.h`, and enable Python API for TensorFlow ([issue #602](https://github.com/bytedeco/javacpp-presets/issues/602))
* Include `tag_constants.h`, `signature_constants.h`, `graph_runner.h`, `shape_refiner.h`, `python_api.h`, and enable Python API for TensorFlow ([issue #602](https://github.com/bytedeco/javacpp-presets/issues/602))
* Add presets for Spinnaker 1.15.x ([pull #553](https://github.com/bytedeco/javacpp-presets/pull/553)), CPython 3.6.x, ONNX 1.2.2 ([pull #547](https://github.com/bytedeco/javacpp-presets/pull/547))
* Define `std::vector<tensorflow::OpDef>` type to `OpDefVector` for TensorFlow
* Link HDF5 with zlib on Windows also ([issue deeplearning4j/deeplearning4j#6017](https://github.com/deeplearning4j/deeplearning4j/issues/6017))
Expand Down
Expand Up @@ -168,6 +168,8 @@
"tensorflow/core/protobuf/saver.pb.h",
"tensorflow/core/protobuf/meta_graph.pb.h",
"tensorflow/cc/saved_model/loader.h",
"tensorflow/cc/saved_model/tag_constants.h",
"tensorflow/cc/saved_model/signature_constants.h",
"tensorflow_adapters.h",
"tensorflow/cc/ops/standard_ops.h",
"tensorflow/cc/ops/const_op.h",
Expand Down
123 changes: 123 additions & 0 deletions tensorflow/src/main/java/org/bytedeco/javacpp/tensorflow.java
Expand Up @@ -36307,6 +36307,129 @@ public native void unsafe_arena_set_allocated_tensor_info(
// #endif // TENSORFLOW_CC_SAVED_MODEL_LOADER_H_


// Parsed from tensorflow/cc/saved_model/tag_constants.h

/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

// #ifndef TENSORFLOW_CC_SAVED_MODEL_TAG_CONSTANTS_H_
// #define TENSORFLOW_CC_SAVED_MODEL_TAG_CONSTANTS_H_

/** Tag for the {@code gpu} graph. */
@Namespace("tensorflow") @MemberGetter public static native byte kSavedModelTagGpu(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kSavedModelTagGpu();

/** Tag for the {@code tpu} graph. */
@Namespace("tensorflow") @MemberGetter public static native byte kSavedModelTagTpu(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kSavedModelTagTpu();

/** Tag for the {@code serving} graph. */
@Namespace("tensorflow") @MemberGetter public static native byte kSavedModelTagServe(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kSavedModelTagServe();

/** Tag for the {@code training} graph. */
@Namespace("tensorflow") @MemberGetter public static native byte kSavedModelTagTrain(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kSavedModelTagTrain();

// namespace tensorflow

// #endif // TENSORFLOW_CC_SAVED_MODEL_TAG_CONSTANTS_H_


// Parsed from tensorflow/cc/saved_model/signature_constants.h

/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

// #ifndef TENSORFLOW_CC_SAVED_MODEL_SIGNATURE_CONSTANTS_H_
// #define TENSORFLOW_CC_SAVED_MODEL_SIGNATURE_CONSTANTS_H_

/** Key in the signature def map for {@code default} serving signatures. The default
* signature is used in inference requests where a specific signature was not
* specified. */
@Namespace("tensorflow") @MemberGetter public static native byte kDefaultServingSignatureDefKey(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kDefaultServingSignatureDefKey();

////////////////////////////////////////////////////////////////////////////////
/** Classification API constants.
<p>
* Classification inputs. */
@Namespace("tensorflow") @MemberGetter public static native byte kClassifyInputs(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kClassifyInputs();

/** Classification method name used in a SignatureDef. */
@Namespace("tensorflow") @MemberGetter public static native byte kClassifyMethodName(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kClassifyMethodName();

/** Classification classes output. */
@Namespace("tensorflow") @MemberGetter public static native byte kClassifyOutputClasses(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kClassifyOutputClasses();

/** Classification scores output. */
@Namespace("tensorflow") @MemberGetter public static native byte kClassifyOutputScores(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kClassifyOutputScores();

////////////////////////////////////////////////////////////////////////////////
/** Predict API constants.
<p>
* Predict inputs. */
@Namespace("tensorflow") @MemberGetter public static native byte kPredictInputs(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kPredictInputs();

/** Predict method name used in a SignatureDef. */
@Namespace("tensorflow") @MemberGetter public static native byte kPredictMethodName(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kPredictMethodName();

/** Predict outputs. */
@Namespace("tensorflow") @MemberGetter public static native byte kPredictOutputs(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kPredictOutputs();

////////////////////////////////////////////////////////////////////////////////
/** Regression API constants.
<p>
* Regression inputs. */
@Namespace("tensorflow") @MemberGetter public static native byte kRegressInputs(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kRegressInputs();

/** Regression method name used in a SignatureDef. */
@Namespace("tensorflow") @MemberGetter public static native byte kRegressMethodName(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kRegressMethodName();

/** Regression outputs. */
@Namespace("tensorflow") @MemberGetter public static native byte kRegressOutputs(int i);
@Namespace("tensorflow") @MemberGetter public static native @Cast("const char*") BytePointer kRegressOutputs();

////////////////////////////////////////////////////////////////////////////////

// namespace tensorflow

// #endif // TENSORFLOW_CC_SAVED_MODEL_SIGNATURE_CONSTANTS_H_


// Parsed from tensorflow/cc/ops/standard_ops.h

/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
Expand Down

0 comments on commit b783f13

Please sign in to comment.