Comments (13)
I adjusted the order of header files as follows:
#include "tensorflow/lite/array.h"
#include "tensorflow/lite/builtin_ops.h"
#include "tensorflow/lite/c/c_api_types.h"
#include "tensorflow/lite/core/c/builtin_op_data.h"
#include "tensorflow/lite/core/c/common.h"
#include "tensorflow/lite/core/subgraph.h"
#include "tensorflow/lite/kernels/kernel_util.h"
#include "tensorflow/lite/util.h"
Additionally, I repeatedly executed the Bazel command and made multiple adjustments to the positions of these two functions until the compilation passed successfully.
from tensorflow.
I adjusted the order of header files as follows: #include "tensorflow/lite/array.h" #include "tensorflow/lite/builtin_ops.h" #include "tensorflow/lite/c/c_api_types.h" #include "tensorflow/lite/core/c/builtin_op_data.h" #include "tensorflow/lite/core/c/common.h" #include "tensorflow/lite/core/subgraph.h" #include "tensorflow/lite/kernels/kernel_util.h" #include "tensorflow/lite/util.h" Additionally, I repeatedly executed the Bazel command and made multiple adjustments to the positions of these two functions until the compilation passed successfully.
我也遇到相同的问题,请问你是如何修改这个文件的,能否把这个文件的全部代码发出来?
from tensorflow.
I adjusted the order of header files as follows: #include "tensorflow/lite/array.h" #include "tensorflow/lite/builtin_ops.h" #include "tensorflow/lite/c/c_api_types.h" #include "tensorflow/lite/core/c/builtin_op_data.h" #include "tensorflow/lite/core/c/common.h" #include "tensorflow/lite/core/subgraph.h" #include "tensorflow/lite/kernels/kernel_util.h" #include "tensorflow/lite/util.h" Additionally, I repeatedly executed the Bazel command and made multiple adjustments to the positions of these two functions until the compilation passed successfully.
我也遇到相同的问题,请问你是如何修改这个文件的,能否把这个文件的全部代码发出来?
from tensorflow.
I adjusted the order of header files as follows: #include "tensorflow/lite/array.h" #include "tensorflow/lite/builtin_ops.h" #include "tensorflow/lite/c/c_api_types.h" #include "tensorflow/lite/core/c/builtin_op_data.h" #include "tensorflow/lite/core/c/common.h" #include "tensorflow/lite/core/subgraph.h" #include "tensorflow/lite/kernels/kernel_util.h" #include "tensorflow/lite/util.h" Additionally, I repeatedly executed the Bazel command and made multiple adjustments to the positions of these two functions until the compilation passed successfully.
我也遇到相同的问题,请问你是如何修改这个文件的,能否把这个文件的全部代码发出来?
调整了这个文件里 stablehlo_reduce_window.txt
StridedReduce 和ReduceWindowImpl 两个函数的先后位置\tensorflow_src\tensorflow\lite\kernels\stablehlo_reduce_window.cc
Reversed the order of the functions StridedReduce and StridedReduce and ReduceWindowImpl in the file tensorflow_src\tensorflow\lite\kernels\stablehlo_reduce_window.cc.
from tensorflow.
Hi @GuoHuanyu, I'm actually running into a different issue when I compile... I suspect our environments are not matching. Did you follow these steps https://www.tensorflow.org/install/source_windows for your environment? Did you run the command in PowerShell under admin privileges or Through some other interface? Are you in the r2.16 branch or in master/nightly? Are you following any instructions/documentation to do this? Thanks for your help.
from tensorflow.
Hi @GuoHuanyu, I'm actually running into a different issue when I compile... I suspect our environments are not matching. Did you follow these steps https://www.tensorflow.org/install/source_windows for your environment? Did you run the command in PowerShell under admin privileges or Through some other interface? Are you in the r2.16 branch or in master/nightly? Are you following any instructions/documentation to do this? Thanks for your help.
- In above issues, i use the Developer Command Prompt for Visual Studio to execute the command
bazel build --config=monolithic --define=with_select_tf_ops=true -c opt //tensorflow/lite:libtensorflowlite.so
,bazel build -c opt //tensorflow/lite:tensorflowlite.dll
. its ok for my environment. - My environment includes Visual Studio 2019, Bazelisk, and Python 3.11.
- i follow these steps https://www.tensorflow.org/install/source_windows for my envirmonment to execute the command
python ./configure.py
,bazel build //tensorflow/tools/pip_package:build_pip_package
using the source code from =https://github.com/tensorflow/tensorflow/releases/tag/v2.16.1. - I am still encountering an error in stablehlo_reduce_window.cc. I fix it by reversing the order of the StridedReduce and ReduceWindowImpl functions, but the build process continues to fail with Developer Command Prompt or Developer PowerShell for Visual Studio in administrator mode,
cl.exe D8022 error
- Giving up
from tensorflow.
Hi @GuoHuanyu, apologies for the frustration, while I look more into this -- have you tried building/progressing with WSL instead? Generally speaking that will be a smoother experience.
from tensorflow.
Hi @GuoHuanyu, apologies for the frustration, while I look more into this -- have you tried building/progressing with WSL instead? Generally speaking that will be a smoother experience.
I haven't heard of or used WSL before. I would find some time to configure and compile based on WSL. Thank you for providing another good method!
from tensorflow.
Hi @GuoHuanyu, another alternative if you need the tensorflow lite dll is building with cmake instead: https://www.tensorflow.org/lite/guide/build_cmake, let me know if that works for you or unblocks you. Thanks.
from tensorflow.
Hi @GuoHuanyu, another alternative if you need the tensorflow lite dll is building with cmake instead: https://www.tensorflow.org/lite/guide/build_cmake, let me know if that works for you or unblocks you. Thanks.
- Thank you for your timely and professional response.
- I've experimented with reversing the order of the StridedReduce and ReduceWindowImpl functions and managed to successfully compile TensorFlow Lite using the commands
cmake ../tensorflow_src/tensorflow/lite
andcmake --build . -j
in the Developer PowerShell for Visual Studio. - However, this only produced a tensorflow-lite.lib file of 247MB, and I did not get the corresponding tensorflow-lite.dll.
- That's why I resorted to using
bazel build -c opt //tensorflow/lite:tensorflowlite.dll
, which yielded both a lib and a dll file. I can obtain a dll withcmake ../tensorflow_src/tensorflow/lite/c
andcmake --build . -j
, but I am unsure if it corresponds to the previously generated tensorflow-lite.lib. That's why I usedbazel build -c opt //tensorflow/lite:tensorflowlite.dll.
- If there is a way to generate both the lib and dll files using cmake, I believe it would be a better solution.
from tensorflow.
Hi @GuoHuanyu, if bazel build -c opt //tensorflow/lite:tensorflowlite.dll
fits your needs, I would say just try it out and see if you run into any other issues. If you required source changes to get that working, and you feel it is something that should be generally fixed (we may need some compile time condition that checks for Windows or something), please create a PR with your fixes so that we may fix it more generally (or at least get started with the review process). Typically, users don't need the static library ... may I understand your use case/context better -- just to ensure you are using best practices, the .lib may not be necessary.
from tensorflow.
Hi @GuoHuanyu, if
bazel build -c opt //tensorflow/lite:tensorflowlite.dll
fits your needs, I would say just try it out and see if you run into any other issues. If you required source changes to get that working, and you feel it is something that should be generally fixed (we may need some compile time condition that checks for Windows or something), please create a PR with your fixes so that we may fix it more generally (or at least get started with the review process). Typically, users don't need the static library ... may I understand your use case/context better -- just to ensure you are using best practices, the .lib may not be necessary.
Ok,i will create a PR with my fixes, thank your timely response.
from tensorflow.
This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.
from tensorflow.
Related Issues (20)
- TimeDistributed layer with nested model no longer working in TensorFlow 2.16.1
- Loading of a model with a Bidirectional LSTM layer no longer working in TensorFlow 2.16.1
- Documentation for RaggedTensors does not match Input layer documentation HOT 2
- Tensorflow doesn't work on my data HOT 2
- Segmentation fault when using tflite_model_maker searcher.TextDataLoader.create(EmbeddingModel, l2_normalize=True)
- ValueError: Only instances of `keras.Layer` can be added to a Sequential model. " Keras version - 3.5.0" HOT 2
- model.summary() broken for custom models subclassed from tf.keras.Model HOT 2
- opal_wrapper-wrapper-data.txt not found HOT 2
- Unable to run Object Detection API i.e. AttributeError: module 'keras._tf_keras.keras.layers' has no attribute 'experimental' HOT 3
- loss growing to negative infinity val accuracy remaining constant, testing accuracy above 100% HOT 3
- TFLite Op type not registered (RegexSplitWithOffsets) in Swift
- Unexpected input dimension (tflite C_API library) HOT 5
- Cannot convert model to tflite
- IntegerLookup layer performance issue when inited with vocabulary HOT 5
- `Check failed` in `tf.raw_ops.CropAndResize` when `boxes` and `box_ind` are empty.
- `Check failed` and other errors in `tf.unstack` when dtype of `axis` is `uint64`. HOT 2
- `Check failed` in `tf.strings.unsorted_segment_join` when the rank of `inputs` is larger than 1 and the value of `num_segments` is too large. HOT 1
- Some `Check Failed` errors in `tf.raw_ops.Unbatch` HOT 2
- `Overflow` in `tf.raw_ops.DenseBincount` when the value of `size` is too large. HOT 1
- `Check failed` in `tf.raw_ops.UnbatchGrad` when the input of `original_input` is empty.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow.