question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

magenta.js with tensorflow.js

See original GitHub issue

I’m trying to use tensorflow.js alongside with magenta.js, to load my custom tfjs model, but it seems there is some compatibility issue.

Here is a codepen to illustrate the issue. https://codepen.io/naotokui/pen/VBxvvE

I copied Tero Parviainen’s pen and added <script src="https://cdnjs.cloudflare.com/ajax/libs/tensorflow/0.12.4/tf.min.js"> </script> to the html file.

Then I hit the generate sequence button, I got this error:

    at o (VM221 magentamusic.min.js:7)
    at i (VM221 magentamusic.min.js:7)
    at VM221 magentamusic.min.js:7
    at Array.forEach (<anonymous>)
    at t (VM221 magentamusic.min.js:7)
    at Object.n.assertArgumentsAreTensors (VM221 magentamusic.min.js:7)
    at n.concat (VM221 magentamusic.min.js:7)
    at VM221 magentamusic.min.js:7
    at Object.t.tidy (VM221 magentamusic.min.js:7)
    at Object.e.value [as concat] (VM221 magentamusic.min.js:7)

In the 2nd codepen, magenta.js is imported before tensorflow.js, then I got this error:

    at t.evaluateFeature (VM768 magentamusic.min.js:7)
    at t.get (VM768 magentamusic.min.js:7)
    at VM765 tf.min.js:2
    at VM765 tf.min.js:2
    at VM765 tf.min.js:2

https://codepen.io/naotokui/pen/yqjYXM

Any ideas?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adarobcommented, Aug 2, 2018

Yes, this is a good point. We will need to package the full tfjs and not just tfjs-core for this to work. @cghawthorne @teropa any objections?

0reactions
naotokuicommented, Aug 3, 2018

Thank you!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Magenta.js - TensorFlow
Magenta.js is a new JavaScript suite with a simple API for generating music and art with Magenta models. Since it's built on TensorFlow.js, ......
Read more >
Magenta.js: Music and Art Generation with Machine ... - GitHub
music: Contains TensorFlow.js implementations and support libraries for Magenta's musical note-based models including MusicVAE, MelodyRNN, DrumsRNN, ...
Read more >
Introducing Magenta.js and TensorFlow.js - Packt Subscription
In the previous chapters, we've covered Magenta in Python, its usage, and its inner workings. We'll now be looking at Google's Magenta.js, ...
Read more >
Music and AI in the Browser with TensorFlow js and Magenta js
Video recorded at DevFest Ukraine 2018. The conference that brings together people who shape the future of Android, Web and Cloud ...
Read more >
@magenta/image
@magenta/image. npm version. This JavaScript implementation of Magenta's image models uses TensorFlow.js for GPU-accelerated inference.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found