Code Monkey home page Code Monkey logo

Comments (6)

galeone avatar galeone commented on August 20, 2024

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.

galeone avatar galeone commented on August 20, 2024

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.

KwansuKim avatar KwansuKim commented on August 20, 2024

Thanks for quick answer! I'm gonna try it according to your comment.

from tfgo.

KwansuKim avatar KwansuKim commented on August 20, 2024

@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.

galeone avatar galeone commented on August 20, 2024

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.

KwansuKim avatar KwansuKim commented on August 20, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.