# TensorFlow

**URL:** <https://forums.unrealengine.com/t/tensorflow/100206>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [September 21, 2017, 7:23pm UTC](https://forums.unrealengine.com/t/tensorflow/100206 "2017-09-21T19:23:13Z")\
**Posts on this page:** 14\
**Page:** 3

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [December 4, 2019, 5:52am UTC](https://forums.unrealengine.com/t/tensorflow/100206/41 "2019-12-04T05:52:29Z")

</div>

**Machine Learning Remote Plugin (remote variant of tensorflow-ue4)**\*\* Released.\*\*

The remote variant of the plugin is now functional, check out: [GitHub - getnamo/machine-learning-remote-ue4: Machine Learning plugin for the Unreal Engine, encapsula](https://github.com/getnamo/machine-learning-remote-ue4) for the plugin and [GitHub - getnamo/ml-remote-server: Server component of https://github.com/getnamo/machine-learning-rem](https://github.com/getnamo/ml-remote-server) for the complement server. The plugin should be usable in a much wider variety of platforms (anywhere the [socket.io](http://socket.io) plugin can be used so: win, linux, mac, android, ios) and you can host your server part anywhere that supports python 3 (typically linux, win, mac).

If you wanted a lighter client or a more flexible backend this should be the one to check out. Let me know if you use it and if you’re missing some API.

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [December 4, 2019, 5:58am UTC](https://forums.unrealengine.com/t/tensorflow/100206/42 "2019-12-04T05:58:37Z")

</div>

> [@TechLord](#):
>
> This is awesome. I want to train different with AIs with different Game Lore/World Datasets to drive NPC Chatbots. I’m open to any conversation on this topic.

You would probably be interested in models like gpt-2 [Better language models and their implications](https://openai.com/blog/better-language-models/) which now has the full 1.5B parameter model released: [GPT-2: 1.5B release](https://openai.com/blog/gpt-2-1-5b-release/) (it’s super heavy though). This can predict fairly decently additional text based on a snippet of input text. It can even answer some questions about a text (reading comprehension).

Below was an example I used for testing reading comprehension. Everything below SAMPLE 1 is generated by gpt-2 in response to the text above it.

https://pbs.twimg.com/media/EIuZ9eGUcAEyuHo?format=png

---

<div class="post-metadata">

**Author:** ![TechLord](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/techlord/32/1040563_2.png) [@TechLord](https://forums.unrealengine.com/u/TechLord)\
**Post date:** [December 4, 2019, 8:22am UTC](https://forums.unrealengine.com/t/tensorflow/100206/43 "2019-12-04T08:22:41Z")

</div>

@getnamo Thanks for your insight.

> [@getnamo](#):
>
> You would probably be interested in models like gpt-2 [Better language models and their implications](https://openai.com/blog/better-language-models/) which now has the full 1.5B parameter model released: [GPT-2: 1.5B release](https://openai.com/blog/gpt-2-1-5b-release/) (it’s super heavy though). This can predict fairly decently additional text based on a snippet of input text. It can even answer some questions about a text (reading comprehension).
> 
> Below was an example I used for testing reading comprehension. Everything below SAMPLE 1 is generated by gpt-2 in response to the text above it.
> 
> https://pbs.twimg.com/media/EIuZ9eGUcAEyuHo?format=png

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [December 23, 2019, 10:52pm UTC](https://forums.unrealengine.com/t/tensorflow/100206/44 "2019-12-23T22:52:24Z")

</div>

I’m happy to announce that the Tensorflow plugin was selected as a MegaGrants recipient: [Epic MegaGrants reaches $13 million milestone in 2019 - Unreal Engine](https://www.unrealengine.com/en-US/blog/epic-megagrants-reaches-13-million-milestone-in-2019)

This should help make the multi-variant component refactor (tracked at [Refactor to support Native and Remote variants · Issue #53 · getnamo/tensorflow-ue4 · GitHub](https://github.com/getnamo/tensorflow-ue4/issues/53)) a reality. The remote variant has already been implemented and released, we now just have the native variant currently outstanding. Keep an eye out on the issue to track progress for this upgrade. Let me know if there is some specific API you’d be interested in having in either case.

---

<div class="post-metadata">

**Author:** ![Ben\_Cykyria](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ben_cykyria/32/700751_2.png) [@Ben\_Cykyria](https://forums.unrealengine.com/u/Ben_Cykyria)\
**Post date:** [December 29, 2019, 2:09pm UTC](https://forums.unrealengine.com/t/tensorflow/100206/45 "2019-12-29T14:09:11Z")

</div>

That’s great! Congratulations!

I’m looking forward to the native plugin. Just getting into ML. It’s a tough journey.:rolleyes:

---

<div class="post-metadata">

**Author:** ![envenger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@envenger](https://forums.unrealengine.com/u/envenger)\
**Post date:** [March 25, 2020, 3:33pm UTC](https://forums.unrealengine.com/t/tensorflow/100206/46 "2020-03-25T15:33:16Z")

</div>

With the python plugin being dead, what’s the plan next to upgrade this.

---

<div class="post-metadata">

**Author:** ![FAHR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fahr/32/728633_2.png) [@FAHR](https://forums.unrealengine.com/u/FAHR)\
**Post date:** [March 27, 2020, 6:25pm UTC](https://forums.unrealengine.com/t/tensorflow/100206/47 "2020-03-27T18:25:43Z")

</div>

How did you manage to upload those gifs?

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [April 1, 2020, 10:31pm UTC](https://forums.unrealengine.com/t/tensorflow/100206/48 "2020-04-01T22:31:29Z")

</div>

> [@FAHR](#):
>
> How did you manage to upload those gifs?

https://i.imgur.com/Roqll8Q.png

Insert image, paste url to e.g. imgur and do not retrieve locally.

> [@envenger](#):
>
> With the python plugin being dead, what’s the plan next to upgrade this.

I haven’t had a chance to look at the UnrealEnginePython breaking changes for 4.24 yet, but will likely look into making the split between [GitHub - getnamo/MachineLearningRemote-Unreal: Machine Learning plugin for the Unreal Engine, encapsulating calls to remote python servers running e.g. Tensorflow/Pytorch.](https://github.com/getnamo/machine-learning-remote-ue4) which would still use your local python but via [socket.io](http://socket.io) transparently and [GitHub - getnamo/TensorFlowNative-Unreal: Tensorflow Plugin for Unreal Engine using C API for inference focus.](https://github.com/getnamo/tensorflow-native-ue4) for native/inference focus.

The remote is ready to use on e.g. windows systems, I need to squash a bug or two to make it run well on linux. The inference focused plugin needs BP api work.

---

<div class="post-metadata">

**Author:** ![gustmes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gustmes](https://forums.unrealengine.com/u/gustmes)\
**Post date:** [May 18, 2020, 2:19am UTC](https://forums.unrealengine.com/t/tensorflow/100206/49 "2020-05-18T02:19:50Z")

</div>

Hey,

I tried using the plugin for unreal version 4.23, the project loads up to 71% and then disappears. When I do a debug build from Visual Studio, I get the following error:

Fatal Python error: Py\_Initialize: unable to load the file system codec

I have python 3.8 installed on my machine, do you know what is the source of this error or what can I do to make the plugin work?  
Thanks

---

<div class="post-metadata">

**Author:** ![vegdrop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vegdrop](https://forums.unrealengine.com/u/vegdrop)\
**Post date:** [August 8, 2020, 9:29am UTC](https://forums.unrealengine.com/t/tensorflow/100206/50 "2020-08-08T09:29:09Z")

</div>

Hey,

I’m starting working with tensorflow plugin. I would like to use neural style transfer techniques.  
My question is : Is there currently a way to input an image rather than a json?

---

<div class="post-metadata">

**Author:** ![getnamo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/getnamo/32/1194624_2.png) [@getnamo](https://forums.unrealengine.com/u/getnamo)\
**Post date:** [September 4, 2020, 3:41pm UTC](https://forums.unrealengine.com/t/tensorflow/100206/51 "2020-09-04T15:41:35Z")

</div>

> [@vegdrop](#):
>
> Hey,
> 
> I’m starting working with tensorflow plugin. I would like to use neural style transfer techniques.  
> My question is : Is there currently a way to input an image rather than a json?

Current pipeline uses json for transport. If you input an image it will convert into a Json array value of floats which can easily be loaded into numpy.

1. a binary serialized image is an enhancement has been on the docket for a while: [float array pointer pass · Issue #7 · getnamo/TensorFlow-Unreal · GitHub](https://github.com/getnamo/tensorflow-ue4/issues/7). Likely with the push toward tcp oriented data pipe, just serializing this instead of pointer pass is more likely.
2. ideally we’d have a way to mark a texture as a shareable and then be able to re-use this pointer in tensorflow, I’m unsure if tensorflow has ops that supports this in theory.

If you come up with a better solutions, code contributions are welcome!

---

<div class="post-metadata">

**Author:** ![Analysierer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Analysierer](https://forums.unrealengine.com/u/Analysierer)\
**Post date:** [September 11, 2021, 7:25pm UTC](https://forums.unrealengine.com/t/tensorflow/100206/52 "2021-09-11T19:25:14Z")

</div>

Will it work with UE5?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d68c455a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d68c455a](https://forums.unrealengine.com/u/anonymous_user_d68c455a)\
**Post date:** [June 26, 2022, 12:26pm UTC](https://forums.unrealengine.com/t/tensorflow/100206/53 "2022-06-26T12:26:42Z")

</div>

I am a newer on unreal engine.  
there is one problem in unreal engine as following, is there some way to use python and tensorflow on the runing mode??

* * *

> **[Scripting the Editor using Python](https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/ScriptingAndAutomation/Python/)**
>
> Describes how to use Python in the Unreal Editor to script content production tasks.

Unlike Blueprints, the Python environment is only available **in the Unreal Editor** , not when your Project is running in the Unreal Engine in any mode, including Play In Editor, Standalone Game, cooked executable, etc. That means that you can use Python freely for scripting and automating the Editor or building asset production pipelines, but you cannot currently use it as a gameplay scripting language.

---

<div class="post-metadata">

**Author:** ![Alimohammadlog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alimohammadlog](https://forums.unrealengine.com/u/Alimohammadlog)\
**Post date:** [July 6, 2024, 6:17pm UTC](https://forums.unrealengine.com/t/tensorflow/100206/54 "2024-07-06T18:17:05Z")

</div>

how to launch this on ue5.3

[Previous page](https://forums.unrealengine.com/t/tensorflow/100206.md?page=2)
