HISE Logo Forum
    • Categories
    • Register
    • Login

    Simple ML neural network

    Scheduled Pinned Locked Moved General Questions
    134 Posts 18 Posters 11.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dan KorneffD
      Dan Korneff @Christoph Hart
      last edited by

      @Christoph-Hart The structure does look like TensorFlow, but the script is using torch libraries to create the model:

      torch
      torch.optim
      torch.cuda
      torch.optim.Adam
      torch.optim
      

      I was using this example code to load the model:

      const var pt = Engine.createNeuralNetwork("PytorchNetwork");;
      
      // Load the model layout & weights that were exported as JSON
      const var modelJSON = pythonRoot.getChildFile("model_keras.json").loadAsObject();
      
      // Load the model & weights:
      pt.loadPytorchModel(modelJSON);
      

      when I load the model into the Neural node, HISE checks out.
      spongebob-meme-1.jpg

      I've run through the MNIST dataset tutorial a couple times to get a basic idea of how TorchStudio works, but I'm not sure how to adapt the scripts to work there.

      Dan Korneff - Producer / Mixer / Audio Nerd

      1 Reply Last reply Reply Quote 0
      • C
        ccbl
        last edited by

        I asked Jatin to have a quick look through the thread to see if he could see any issues, he just had this to say.

        "Hmmm, it seems to me that the model JSON file that is being loaded into the "Neural Node" is structured as a TensorFlow-style JSON file, but it's being loaded with the HISE's loadPytorchModel() method? I don't really know what the Neural Node does internally, so idk how much I can help beyond that."

        griffinboyG 1 Reply Last reply Reply Quote 0
        • Dan KorneffD
          Dan Korneff
          last edited by

          Using loadTensorFlowModel() was indeed the solution. I'll try to make some tutorials on training and loading models this weekend.

          Dan Korneff - Producer / Mixer / Audio Nerd

          LindonL A C orangeO 4 Replies Last reply Reply Quote 4
          • LindonL
            Lindon @Dan Korneff
            last edited by

            @Dan-Korneff that would be very cool. Do these models include the ability to define parameters(like tone controls on an amp)? Or are they static snap shots?

            HISE Development for hire.
            www.channelrobot.com

            Dan KorneffD 1 Reply Last reply Reply Quote 0
            • Dan KorneffD
              Dan Korneff @Lindon
              last edited by

              @Lindon said in Simple ML neural network:

              @Dan-Korneff that would be very cool. Do these models include the ability to define parameters(like tone controls on an amp)? Or are they static snap shots?

              The training scripts can create parameterized models, but I've only tested a static model so far.
              Once I get my sea legs I'll pull in @Christoph-Hart to figure out multiple parameters.

              Dan Korneff - Producer / Mixer / Audio Nerd

              1 Reply Last reply Reply Quote 1
              • A
                aaronventure @Dan Korneff
                last edited by

                @Dan-Korneff man this sounds great, thanks.

                how are you finding the results so far comparing the capture and the model output?

                Dan KorneffD 1 Reply Last reply Reply Quote 0
                • Dan KorneffD
                  Dan Korneff @aaronventure
                  last edited by

                  @aaronventure I haven't gotten that far yet. Still in the "does this even work" stage 😀

                  Dan Korneff - Producer / Mixer / Audio Nerd

                  1 Reply Last reply Reply Quote 2
                  • griffinboyG
                    griffinboy @ccbl
                    last edited by

                    @ccbl

                    Chowdhury? I'd love to talk to him! His dsp is very inspiring

                    C 1 Reply Last reply Reply Quote 0
                    • S
                      scottmire
                      last edited by

                      Apologies if this has already been discussed....but I would think this would be low hanging fruit:

                      Link Preview Image
                      GitHub - Tr3m/nam-juce: A JUCE implementation of the Neural Amp Modeler Plugin

                      A JUCE implementation of the Neural Amp Modeler Plugin - Tr3m/nam-juce

                      favicon

                      GitHub (github.com)

                      A 1 Reply Last reply Reply Quote 1
                      • A
                        aaronventure @scottmire
                        last edited by

                        @scottmire keep in mind that this is GPLv3 licensed

                        S 1 Reply Last reply Reply Quote 0
                        • C
                          ccbl @Dan Korneff
                          last edited by

                          @Dan-Korneff What sample rate were you using? I'd love to train at 96khz or even 192khz for aliasing reduction reasons. My ultimate plan is to stack several smaller models of individual components together sandwiched between regular DSP so I think reducing aliasing should be important in this case.

                          Dan KorneffD 1 Reply Last reply Reply Quote 0
                          • C
                            ccbl @griffinboy
                            last edited by

                            @griffinboy Here's the link to their discord channel for RTNeural

                            https://discord.gg/enmpURqR

                            1 Reply Last reply Reply Quote 1
                            • Dan KorneffD
                              Dan Korneff @ccbl
                              last edited by

                              @ccbl I'm only experimenting with 48K at the moment. Feel free to look at my repository scripts to figure out the sample rate stuff. I'm taking baby steps with this stuff while I finish up other projects.

                              Dan Korneff - Producer / Mixer / Audio Nerd

                              1 Reply Last reply Reply Quote 1
                              • S
                                scottmire @aaronventure
                                last edited by

                                @aaronventure NAM itself is MIT licensed and this is simply a JUCE implementation of the NAM Player....so, I have no idea how they could enforce a GPLv3 license. But...I'm definitely no expert.

                                d.healeyD 1 Reply Last reply Reply Quote 0
                                • d.healeyD
                                  d.healey @scottmire
                                  last edited by

                                  @scottmire MIT is a weak license so you can take MIT code and relicense it pretty much however you like. If you are releasing a GPL project then all code in that project needs to be GPL. So the developer of nam-JUCE has relicensed NAM as GPL within their project.

                                  Libre Wave - Freedom respecting instruments and effects
                                  My Patreon - HISE tutorials
                                  YouTube Channel - Public HISE tutorials

                                  S 1 Reply Last reply Reply Quote 0
                                  • S
                                    scottmire @d.healey
                                    last edited by

                                    @d-healey Ahhh got it. Thanks for the clarification.

                                    1 Reply Last reply Reply Quote 0
                                    • orangeO
                                      orange @Dan Korneff
                                      last edited by

                                      @Dan-Korneff said in Simple ML neural network:

                                      Using loadTensorFlowModel() was indeed the solution. I'll try to make some tutorials on training and loading models this weekend.

                                      @Dan-Korneff @Christoph-Hart
                                      Is there any progress? We look forward to using this neural model in a guitar amp simulation :)

                                      develop Branch / XCode 13.1
                                      macOS Monterey / M1 Max

                                      Christoph HartC Dan KorneffD 2 Replies Last reply Reply Quote 1
                                      • Christoph HartC
                                        Christoph Hart @orange
                                        last edited by

                                        @orange Jatin said in the GitHub issue that he's thinking about adding the wavenet model to RTNeural, when that's the case, I'll resume the work to support NAM models.

                                        1 Reply Last reply Reply Quote 5
                                        • Dan KorneffD
                                          Dan Korneff @orange
                                          last edited by

                                          @orange I had to take a couple days vacation over here. Back in the office Monday :)

                                          Dan Korneff - Producer / Mixer / Audio Nerd

                                          1 Reply Last reply Reply Quote 1
                                          • O
                                            Orvillain
                                            last edited by

                                            @Christoph-Hart Looks like Jatin has made some progress with this:
                                            https://github.com/jatinchowdhury18/RTNeural/issues/143#issuecomment-2472915024

                                            So does this bring us closer to being able to load NAM models into RTNeural inside Hise???

                                            L 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            28

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            102.3k

                                            Posts