Giter VIP home page Giter VIP logo

Comments (9)

asus4 avatar asus4 commented on June 13, 2024

@tabatinga0x00 Is it possible to share the TFLite model and the reproducible project?

In most cases, the exception at SetInputTensorData is caused by mismatching the data type (float, double, or short) or array length between the model and the C# code.

from tf-lite-unity-sample.

asus4 avatar asus4 commented on June 13, 2024

According to the tensorflow API docs,

The initializing order might be like this.

// first call resize input tensor
interpreter.ResizeInputTensor(0, new int[] { 1, inputSize });
// then allocate it.
interpreter.AllocateTensors();

from tf-lite-unity-sample.

tabatinga0xffff avatar tabatinga0xffff commented on June 13, 2024

@asus4 I'll share it.

// first call resize input tensor
interpreter.ResizeInputTensor(0, new int[] { 1, inputSize });
// then allocate it.
interpreter.AllocateTensors();

it hasn't worked

from tf-lite-unity-sample.

tabatinga0xffff avatar tabatinga0xffff commented on June 13, 2024

@asus4 have you seen my email? Should I post the code here?

from tf-lite-unity-sample.

asus4 avatar asus4 commented on June 13, 2024

@tabatinga0x00 Please understand that I don't provide personal support by email. However, if you create a public PR (Pull Request) or a reproducible repository, I can take a look at it.

from tf-lite-unity-sample.

asus4 avatar asus4 commented on June 13, 2024

Hi @tabatinga0xffff

I ported a YAMNet-based audio classification example form TensorFlow Lite examples in this PR:

The model architecture differs from your model but might help to solve your issue.

Screenshot 2024-03-20 at 14 38 26

from tf-lite-unity-sample.

tabatinga0xffff avatar tabatinga0xffff commented on June 13, 2024

@asus4

I copied the directory AudioClassification into Assets
updated manifest.json according to README

And arised this error:

Assets\AudioClassification\AudioClassification.cs(98,24): error CS1061: 'NativeSlice<AudioClassification.Label>' does not contain a definition for 'Sort' and no accessible extension method 'Sort' accepting a first argument of type 'NativeSlice<AudioClassification.Label>' could be found (are you missing a using directive or an assembly reference?)

from tf-lite-unity-sample.

tabatinga0xffff avatar tabatinga0xffff commented on June 13, 2024

My model, if you'd need it

Models.zip

from tf-lite-unity-sample.

asus4 avatar asus4 commented on June 13, 2024

@tabatinga0xffff Your custom model is not related to this kind of error. Did you install "com.unity.collections" ?

from tf-lite-unity-sample.

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.