Announcement

Collapse
No announcement yet.

TensorFlow

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    I do not understand this type of error?
    Attached Files

    Leave a comment:


  • replied
    Originally posted by David.Bromberg View Post
    * Is there C/C++ API support? As in, do I have to use blueprints to communicate with the plugin, or can I just write code?
    The plugin is structured around a blueprint actor component called Tensorflow Component which wraps threading and communication to an embedded python layer. This way all of your machine learning can use largely unmodified tensorflow python files and on the unreal side you just have to worry about how to structure your data for your model. Basic usage instructions can be found here: https://github.com/getnamo/tensorflo...rflowcomponent

    Because the component is put together in blueprint it would be troublesome to use it in C++ directly, you may need write a wrapper that has a C++ base and is overwritten in blueprint. It would probably make sense to refactor the Tensorflow component into a C++ base so that it can be called from both ends (a good enhancement issue).

    Originally posted by David.Bromberg View Post
    * What format does a trained network take in this scenario- is it a .uasset? I'm more interested in using this library as a way to run already-trained tensor flow networks in engine rather than as a way to train, so packaging is an important question.
    The trained network will be your usual .pb or checkpoints as all your machine learning should be vanilla tensorflow. The plugin already does package correctly.

    Originally posted by David.Bromberg View Post
    * You mention only supporting Windows platform at this point. Is that for training only, or also for running a network? Theoretically it shouldn't be that big of a deal to get that aspect running on consoles? Or is this a dependency on the Python plugin?
    It is limited to windows atm, because it uses a cmd subprocess to handle pip dependencies without blocking anything, this can probably be expanded to multiple platforms (Source can be found https://github.com/getnamo/UnrealEng...ipts/upypip.py). The pip and python dependency would make console support hard atm.

    That said wider support has been on my mind, specifically inference.

    Originally I thought of including a tensorflow dll directly in this plugin, but the api was moving too rapidly back then and there were no dlls to download, so the python approach was chosen to allow for easy updates to latest builds. The scene has changed since then and while the repository does include a tensorflow dll, I believe it will probably be best to split native tensorflow into a fresh plugin that will be inference focused, something like tensorflow-native-ue4? It would probably use the c api with some c++ wrapper and simplify loading your model, running inference and getting data in ue4 format. I made a blank plugin just now for that: https://github.com/getnamo/tensorflow-native-ue4, but it will take some time to bring it to a functional build. Contributions welcome if you want to help, there would need to be native builds of the library for whatever target hardware you're looking for.

    Edit: https://github.com/getnamo/tensorflow-native-ue4 is now functional if you want to use the tensorflow c_api directly, but there are no convenience unreal type bindings yet. Will come back to this later.
    Last edited by getnamo; 03-12-2019, 07:28 PM.

    Leave a comment:


  • replied
    Hi there!
    I have a few newb questions about this (apologies):

    * Is there C/C++ API support? As in, do I have to use blueprints to communicate with the plugin, or can I just write code?
    * What format does a trained network take in this scenario- is it a .uasset? I'm more interested in using this library as a way to run already-trained tensor flow networks in engine rather than as a way to train, so packaging is an important question.
    * You mention only supporting Windows platform at this point. Is that for training only, or also for running a network? Theoretically it shouldn't be that big of a deal to get that aspect running on consoles? Or is this a dependency on the Python plugin?

    Thanks for your help understanding.
    -David

    Leave a comment:


  • replied
    Originally posted by envenger View Post
    Is tensorflow 2.0 supported and would I need to change something to get it download by pip?
    In theory just changing "tensorflow": "1.10.0", to "2.0.0" inside https://github.com/getnamo/tensorflo...upymodule.json should do what you're looking for, but there may be gremlins in the new tf API, kindly open a github issue with details (https://github.com/getnamo/tensorflow-ue4/issues) if you run into problems.

    Leave a comment:


  • replied
    Is tensorflow 2.0 supported and would I need to change something to get it download by pip?

    Leave a comment:


  • replied
    This is awesome!

    Leave a comment:


  • replied
    Originally posted by Metusalemski View Post
    This is incredibly cool coding ! Can one use ue4 node editor as general c++ visual coding platform, by following this gourgeous implementation ? Is it basically about linking dll functions to the blueprint nodes ?
    The unreal side for communicating data is typically done in blueprint (node editor) via a TensorflowComponent and the machine learning is done in python (which is what tensorflow uses so you can copy paste examples).


    Originally posted by AnaRhisT94 View Post

    Have you released the pong game yet? I'm currently developing a simple 2d game with a stick that tries to avoid enemies that are moving in the environment by pulling up/down the stick.

    Implemented it in a separate branch of the example project: https://github.com/getnamo/tensorflo...es/tree/qlearn. All the pieces are there, it's just missing a trained network to work in theory.

    Leave a comment:


  • replied
    This is incredibly cool coding ! Can one use ue4 node editor as general c++ visual coding platform, by following this gourgeous implementation ? Is it basically about linking dll functions to the blueprint nodes ?

    Leave a comment:


  • replied
    Originally posted by getnamo View Post
    Recent update:
    With the v0.10.1 (https://github.com/getnamo/tensorflo...ses/tag/0.10.1) release the plugin now supports packaging. Let me know if there are any issues with this.
    Have you released the pong game yet? I'm currently developing a simple 2d game with a stick that tries to avoid enemies that are moving in the environment by pulling up/down the stick.

    Leave a comment:


  • replied
    Recent update:
    With the v0.10.1 (https://github.com/getnamo/tensorflo...ses/tag/0.10.1) release the plugin now supports packaging. Let me know if there are any issues with this.

    Leave a comment:


  • replied
    Originally posted by HaBe2305 View Post

    Now that you say it, this absolutely makes sense. I tried to run tensorboard from inside UE, the idea that I easily could run it from a standalone python console as well on the logs didn't come to my mind at that time. Thanks for the enlightenment.

    I'll experiment with the inbuilt chromium browser first. I wanted to adopt the workflow and setup Unity uses (external python distro via Anaconda) anyways since they have some nice goodies in their SDK like curiosity reinforced learning, circulum learning, imitation learning etc, and I'll certainly contribute it to your repo as soon as it's stable.
    Do you prefer pull requests from a branch, a fork or another way?
    Sounds good . A pull request on master is fine, I can always retarget it to a working branch if it breaks too much

    Leave a comment:


  • replied
    Originally posted by getnamo View Post

    https://github.com/getnamo/tensorflo...SimpleBoard.py is the only experiment I did with tensorboard. My understanding is that you have to run tensorboard separately to host the webpage and then using something like the above, you can feed in all the data it needs for visualization. There isn't anything in the plugin currently to bring that visualization into ue4, but you could use something like https://github.com/AaronShea/BLUI or the inbuilt chromium to display the webpage inside ue4. If you get something working consider contributing a simple example to https://github.com/getnamo/tensorflow-ue4-examples/
    Now that you say it, this absolutely makes sense. I tried to run tensorboard from inside UE, the idea that I easily could run it from a standalone python console as well on the logs didn't come to my mind at that time. Thanks for the enlightenment.

    I'll experiment with the inbuilt chromium browser first. I wanted to adopt the workflow and setup Unity uses (external python distro via Anaconda) anyways since they have some nice goodies in their SDK like curiosity reinforced learning, circulum learning, imitation learning etc, and I'll certainly contribute it to your repo as soon as it's stable.
    Do you prefer pull requests from a branch, a fork or another way?
    Last edited by HaBe2305; 09-22-2018, 05:23 PM.

    Leave a comment:


  • replied
    Originally posted by HaBe2305 View Post
    First of all, thank you very much getnamo for your tremendous amount of work you're giving away basically for free (the couple of bucks on the marketplace are merely symbolic in this regard). I've started to play with Reinforcement Learning and tensorflow using Unity and the Learning Agents preview they provide, but now have switched to Unreal because of - well, many reasons.

    So already working with tensorflow, I was and still am excited that the Unreal environment also has integration already. Big thanks again for making this possible!

    I also was used to having tensorboard for better understanding what is going on with my learning agent. I've tried for a day now to get tensorboard running (writing out logs with the simple MNIST example from https://www.tensorflow.org/guide/sum...nd_tensorboard worked flawlessly), but I'm totally lost now, also because I'm just beginning writing python code, coming from a C++ and C# background. Have you tested running tensorboard already and could kindly give some guideline or tips how to make it work?
    https://github.com/getnamo/tensorflo...SimpleBoard.py is the only experiment I did with tensorboard. My understanding is that you have to run tensorboard separately to host the webpage and then using something like the above, you can feed in all the data it needs for visualization. There isn't anything in the plugin currently to bring that visualization into ue4, but you could use something like https://github.com/AaronShea/BLUI or the inbuilt chromium to display the webpage inside ue4. If you get something working consider contributing a simple example to https://github.com/getnamo/tensorflow-ue4-examples/
    Last edited by getnamo; 09-22-2018, 04:08 PM.

    Leave a comment:


  • replied
    First of all, thank you very much getnamo for your tremendous amount of work you're giving away basically for free (the couple of bucks on the marketplace are merely symbolic in this regard). I've started to play with Reinforcement Learning and tensorflow using Unity and the Learning Agents preview they provide, but now have switched to Unreal because of - well, many reasons.

    So already working with tensorflow, I was and still am excited that the Unreal environment also has integration already. Big thanks again for making this possible!

    I also was used to having tensorboard for better understanding what is going on with my learning agent. I've tried for a day now to get tensorboard running (writing out logs with the simple MNIST example from https://www.tensorflow.org/guide/sum...nd_tensorboard worked flawlessly), but I'm totally lost now, also because I'm just beginning writing python code, coming from a C++ and C# background. Have you tested running tensorboard already and could kindly give some guideline or tips how to make it work?

    Leave a comment:


  • replied
    Packaging support is a known missing feature. Progress is tracked here: https://github.com/getnamo/tensorflow-ue4/issues/16, contributions welcome

    Leave a comment:

Working...
X