Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Robert Plummer
    @robertleeplummerjr
    Hi @michaelonubogu! That is a lot of categories. Would there be something we could look at?
    Michael Onubogu
    @michaelonubogu
    Hey @robertleeplummerjr I created a repo located here: https://github.com/michaelonubogu/brainjs-category-training that has the logic I wrote to train my net. It is ready to run as is you just have to (1) Clone the repo (2) npm install (3) run "npm run start" or if u have vscode, just hit the play button. It will start training the model with pre-saved training data I added to the repo. The logic is in typescript, and it uses nest.js (https://docs.nestjs.com/). I appreciate the help. Right now I only selected 7 categories - each with 100 data points, so about 700-800 records of training data. I can get more training data if needed. I get that from Bing's Search API. Appreciate any insight you have
    The start method is located in src/util/train-neural-net.jsob.ts and is called "onApplicationBootstrap()"
    Robert Plummer
    @robertleeplummerjr
    @michaelonubogu, fantastic!
    What are your current hang-ups?
    Michael Onubogu
    @michaelonubogu
    Also, the exorbitant "20,000" number I wrote earlier comes from the notion that I want to use this to eventually classify video games (well, If I get there hehe). And there are a boat load of games out there
    Michael Onubogu
    @michaelonubogu
    @robertleeplummerjr Didn't see your second message there. I'm not sure if my error threshold is acceptable - i think it isn't though because when I test it, it gives me pretty inaccurate results. Also, when I set it to train for 5 million iterations, I saw the error threshold come down, and then around the 3 million iteration range, I saw it steadily go back up again
    The last error threshold I saw it at was about 0.024. I was trying to understand the best practices approaching this. Do I just allow it to train for as long as it would take? i.e. 10s of millions of iterations? Do I tweak and add hidden layers as I go. Is there a sequence/patterns to adding hidden layers that I need to go by?
    Michael Onubogu
    @michaelonubogu
    I'm also not familiar with whether to use an LSTM, RNN, Neural Network etc. I believe for this problem, Im using a neural net. Is this the right direction to go. Sorry for the spams of questions
    Robert Plummer
    @robertleeplummerjr
    Use a LSTM.
    When you see the error start to climb, that is overfitting, and you’ll want to stop.
    If you see the error go down and down, and stop, you’ll want to adjust the hidden layers.
    Can you share some of your project setup?
    Michael Onubogu
    @michaelonubogu
    Apologies again for the delay. Doing what you suggested, and I'm currently using a recurrent LSTM. I don't believe I can use LSTM with train stream so I modified my logic a little bit.
    I'll push what I have right now to GitHub and then share this test project with you. I can also share the bigger project I took this snippet from, but that needs some config files and redis to run.
    Robert Plummer
    @robertleeplummerjr
    That’d be most helpful!
    Michael Onubogu
    @michaelonubogu

    @robertleeplummerjr So here's the POC repo - https://github.com/michaelonubogu/brainjs-category-training

    I just modified it to use LSTM and I'm currently training it right now - though it's taking a while because of my slow laptop. I also changed it to take strings as inputs, and not encoded values like it did b4. Just have to run npm run start and it will start training and log the data to console. The training data is also stored in a json file within the data folder. Another thing is I'm not sure it's good data to begin with honestly.

    Robert Plummer
    @robertleeplummerjr
    I imagine without using streaming, you are running out of memory perhaps?
    Michael Onubogu
    @michaelonubogu
    Yep
    Just out of curiosity, is it a technical limitation/feasibility problem that train stream doesn't work with LSTM? If it isn't, I've thought about maybe trying to see if I could attempt to add that in via PR - though honestly, when I tried reading through the source, I swear I probably passed out at some of it's complexity
    Robert Plummer
    @robertleeplummerjr
    lol
    Yea, that was borrowed from recurrent.js.
    I implemented it to understand the limitations of how we are currently building neural networks.
    After seeing how complex they are, I was better able to grasp how to simplify them.
    Not totally working yet, as I’m still buttoning up gpu.js.
    Robert Plummer
    @robertleeplummerjr

    Just out of curiosity, is it a technical limitation/feasibility problem that train stream doesn't work with LSTM?

    The LSTM should work fine with a train stream, but likely it is very slow.

    I've thought about maybe trying to see if I could attempt to add that in via PR

    Likely that was the older source. That code is important to keep working, but we’d like to migrate to the newer classes, as they’ve been built to run using GPU.js.

    In other words, we want it to be faster and simpler.
    And we want the source to be easily accessible, so it is easy to understand how to learn what is going on, and potentially how to customize.
    Michael Onubogu
    @michaelonubogu
    wow I'm super excited for what you're doing for v2! I read through the road map and that sounds awesome! GPU support for node.js at 95% is incredible!
    Robert Plummer
    @robertleeplummerjr
    It is now 99.99%.
    Updating.
    Done.
    Michael Onubogu
    @michaelonubogu
    Wait...you've just finished adding GPU support for v2? :thumbsup:
    :O
    I have to ask, do you have v2 in some alpha form available for the masses to try out?
    because I would be super interested in trying it out - especially within node
    Michael Onubogu
    @michaelonubogu

    I was reading through the new usage for the Recurrent class, and I wanted to ask about the constant peephole found here

    const { input, lstm, peephole, output } = layer;

    What is it's function for an LSTM?

    Robert Plummer
    @robertleeplummerjr
    I think that was an early try on a name that we didn’t end up using
    Michael Onubogu
    @michaelonubogu
    gotcha
    Ken ケン
    @KenSeezPC
    Hey! Someone has a link to the documentation? Or there is none?
    Robert Plummer
    @robertleeplummerjr
    Documentation is here: https://github.com/BrainJS/brain.js
    Janus Reith
    @janus-reith

    Hi, I'm pretty new to ML and brain.js seems to be easy to use.

    Im looking for a specific usecase to implement: I have a text and want to extract multiple specifications from that.
    I wonder if it is feasible to implement that with brainjs? I tried it with LSTM but only got NaN when I had multiple outputs for my input

    It would be awesome if it could work in such a way:
    Input: "Intel Core i7-7500U 2,70 GHz, 16 GB DDR4"
    Output: { cpuManufactor: "Intel", cpuClockRate: "2,70", "memorySize": 16, "memoryType": "DDR4" }

    The input wouln't always have the same length or contain the same information.
    Is something like that possible with brain.js?

    If it wouldn't work this way I could settle for a less dynamic pattern like:
    Output: { cpuManufactorIntel: 1, cpuClockRateIs270: 1, memorySizeIs16: 1 memoryTypeIsDDR4: 1 }

    However, getting near the first example would be awesome.
    I searched the github repo but didn't realy find anything.
    I found the tweet author example, but this seemed to only work with one input/output

    As the concept behind this text classification is pretty general and not related to my specific data I believe something similar to this must be implemented somewhere already.

    Thanks in advance for your help!

    Markus Roth
    @MarkusTrooper_twitter
    @janus-reith try wit.ai
    I don't think entity extraction works with brain.js
    Alfredo Ramirez
    @istudiomobile
    Does brain.js supports Typescript?
    Robert Plummer
    @robertleeplummerjr
    Yes.
    Definitions for FeedForward, Recurrent, layers, and praxis will be in for v2.