Comments (6)
Isn't possible to use tf.NewTensor
and feed it as input to the saved model?
I do this in the example you can see in the README.
Is this the thing you are looking for or do I misunderstand your question?
from tfgo.
Now that I'm thinking about the proto/example thing clearly, I remember that I explicitly removed (a long time ago!) that part, because it's tensorflow itself that only supports SavedModels and the proto/example was there for feeding the estimators/frozen models. That type of model is not supported anymore by TensorFlow and therefore I removed them in this commit 132f4f1
You must use a SavedModel and feed the tensors using tf.NewTensor
as shown in the readme
from tfgo.
Thanks for quick answer! I'm gonna try it according to your comment.
from tfgo.
@galeone Could you help me to resolve the below build issue?
go: finding module for package github.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto go: finding module for package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto go: finding module for package github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_proto serving/ml/tensorflow imports github.com/galeone/tfgo imports github.com/tensorflow/tensorflow/tensorflow/go imports github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto: module github.com/tensorflow/tensorflow@latest found (v2.9.1+incompatible), but does not contain package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto serving/ml/tensorflow imports github.com/galeone/tfgo imports github.com/tensorflow/tensorflow/tensorflow/go tested by github.com/tensorflow/tensorflow/tensorflow/go.test imports github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_proto: module github.com/tensorflow/tensorflow@latest found (v2.9.1+incompatible), but does not contain package github.com/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_proto serving/ml/tensorflow imports github.com/galeone/tfgo imports github.com/tensorflow/tensorflow/tensorflow/go tested by github.com/tensorflow/tensorflow/tensorflow/go.test imports github.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto: module github.com/tensorflow/tensorflow@latest found (v2.9.1+incompatible), but does not contain package github.com/tensorflow/tensorflow/tensorflow/go/core/framework/types_go_proto
from tfgo.
You're using tensorflow, the official package - it's broken. You must use the fork I maintain instead:
github.com/galeone/tensorflow/tensorflow/go
As you can see the tf
package in the example, comes from this package, not from the official one
from tfgo.
@galeone How can I make a tensor to input a model in case a model's input values involve different types like string, float32 at the same time?
The following feature list is a sample I'd like to implement. With tensor.example, it would be possible to do it but now I'm not sure how to do it without tensor.example.
"feature_a": "string_1"
"feature_b": "string_2"
"feature_c": 34.23
"feature_d": [1.0, 2.0, 3.0, 4.0]
from tfgo.
Related Issues (20)
- loading model HOT 2
- cc1.exe: sorry, unimplemented: 64-bit mode not compiled in HOT 1
- Error: W tensorflow/core/framework/op_kernel.cc:1745] OP_REQUIRES failed at lookup_table_op.cc:929 : FAILED_PRECONDITION: Table not initialized. HOT 1
- SparseTensor support HOT 2
- Failed to go get tfgo HOT 3
- Potential memory leak on reloading model HOT 8
- libtensorflow.so: .dynsym local symbol at index 3 (>= sh_info of 3) HOT 2
- Matching between output tensor name and prediction HOT 7
- Thread safety HOT 2
- Panic vs Error HOT 2
- Reading jpg image from disk and passing as input to a pretrained model loaded from disk HOT 4
- Error building "Getting Started" example: rebuild TensorFlow with the appropriate compiler flags HOT 5
- Can I use tfgo for tensorflow 2.11.x? HOT 2
- Convert opencv's `mat` to tfgo's `tensor` HOT 7
- Dark Souls level frustration with compilation project with this library HOT 1
- Discrepancy between python and go outputs HOT 2
- tfgo Object detection
- Choose output layer of model . HOT 1
- Panic when loading a keras LSTM Model HOT 2
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 tfgo.