# \#tensorflow

**URL:** https://discourse.julialang.org/tag/tensorflow/81.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Downloading transformer weights](https://discourse.julialang.org/t/downloading-transformer-weights/122893)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 0\
**Last updated:** [November 21, 2024, 12:26pm UTC](https://discourse.julialang.org/t/downloading-transformer-weights/122893 "2024-11-21T12:26:12Z")

</div>

I’d like to download the weighting matrices for an open source transformer model (BERT, GPT2…) and try and do the matrix equations from scatch in Julia. Any thoughts on the best way to do this? ChatGPT suggested eithe…

---

## [Issue understanding Lux recurrent cells](https://discourse.julialang.org/t/issue-understanding-lux-recurrent-cells/114249)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 1\
**Last updated:** [May 14, 2024, 4:03pm UTC](https://discourse.julialang.org/t/issue-understanding-lux-recurrent-cells/114249 "2024-05-14T16:03:43Z")

</div>

I am trying to turn the following code to Lux.jl def generator(gru\_units, dense\_units, sequence\_length, noise\_dimension, model\_dimension): # Inputs. inputs = tf.keras.layers.Input(shape=(sequence\_length, mod…

---

## [Translating tensorflow to Flux and SimpleChains and not getting the same results](https://discourse.julialang.org/t/translating-tensorflow-to-flux-and-simplechains-and-not-getting-the-same-results/96134)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 6\
**Last updated:** [March 24, 2023, 3:08pm UTC](https://discourse.julialang.org/t/translating-tensorflow-to-flux-and-simplechains-and-not-getting-the-same-results/96134 "2023-03-24T15:08:56Z")

</div>

For the past few days, I started working on an ML project. I looked at Flux.jl and SimpleChains.jl for doing pure Julia Deep Learning and TensorFlow, but I could not make them agree! The data: let say the model tries t…

---

## [Import TensorFlow lite model](https://discourse.julialang.org/t/import-tensorflow-lite-model/74572)

<div class="topic-metadata">

**Author:** [@tpoisot](https://discourse.julialang.org/u/tpoisot)\
**Replies:** 0\
**Last updated:** [January 13, 2022, 7:09pm UTC](https://discourse.julialang.org/t/import-tensorflow-lite-model/74572 "2022-01-13T19:09:23Z")

</div>

I have a model that’s available as a .tflite file, and I’d like to retrain it in Julia (preferably using Flux). Is there a standard way of importing a tflite file in Julia?

---

## [Flux is lagging far beyond tensorflow with a pretty basic use case](https://discourse.julialang.org/t/flux-is-lagging-far-beyond-tensorflow-with-a-pretty-basic-use-case/67942)

<div class="topic-metadata">

**Author:** [@egolep](https://discourse.julialang.org/u/egolep)\
**Replies:** 5\
**Last updated:** [September 9, 2021, 4:43pm UTC](https://discourse.julialang.org/t/flux-is-lagging-far-beyond-tensorflow-with-a-pretty-basic-use-case/67942 "2021-09-09T16:43:36Z")

</div>

I was trying to move from a Python ML/DL stack to Julia (so from something like sklearn+pytorch/tensorflow to MLJ+Flux). So I decided to rewrite the Kaggle courses in Julia, switching from the Python libraries to the J…

---

## [Julia slower than Matlab & Python? No](https://discourse.julialang.org/t/julia-slower-than-matlab-python-no/33128)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 119\
**Last updated:** [March 16, 2021, 1:00am UTC](https://discourse.julialang.org/t/julia-slower-than-matlab-python-no/33128 "2021-03-16T01:00:51Z")

</div>

A recent paper ML Software & Hardware for Econ finds Julia is often slower than Matlab & Numpy. Code for Option Pricing is here. Code for Dynamic Programming is here. Usually, writing Julia code similarly leads to eno…

---

## [Can anyone help me to add TensorFlow?](https://discourse.julialang.org/t/can-anyone-help-me-to-add-tensorflow/38957)

<div class="topic-metadata">

**Author:** [@Narasimman17](https://discourse.julialang.org/u/Narasimman17)\
**Replies:** 0\
**Last updated:** [May 7, 2020, 2:02pm UTC](https://discourse.julialang.org/t/can-anyone-help-me-to-add-tensorflow/38957 "2020-05-07T14:02:01Z")

</div>

Can anyone help me with this issue? I guess the python version I have and the TensorFlow version that I’m trying to install is incompatible.

---

## [TensorFlow Issue with Logistic Regression Example](https://discourse.julialang.org/t/tensorflow-issue-with-logistic-regression-example/33454)

<div class="topic-metadata">

**Author:** [@abianco](https://discourse.julialang.org/u/abianco)\
**Replies:** 0\
**Last updated:** [January 16, 2020, 8:00pm UTC](https://discourse.julialang.org/t/tensorflow-issue-with-logistic-regression-example/33454 "2020-01-16T20:00:33Z")

</div>

After a fresh installation of Julia on CentOS 7.2, I added TensorFlow, ran the “basic usage” test in README.md and passed it. Then, after installing also the Distributions and Printf packages, I tried to run the “logisti…

---

## [Flux vs Tensorflow training performance comparison?](https://discourse.julialang.org/t/flux-vs-tensorflow-training-performance-comparison/32926)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 5\
**Last updated:** [January 3, 2020, 7:38pm UTC](https://discourse.julialang.org/t/flux-vs-tensorflow-training-performance-comparison/32926 "2020-01-03T19:38:24Z")

</div>

Has anyone done a performance comparison between Flux and Tensorflow, on the speed of training a model? I mean taking some conveniently pre-defined model on some standard dataset (say MNIST) and training it using both li…

---

## [Equivalent for tf.keras.layers.Lambda in Tensorflow.jl/MXNet.jl](https://discourse.julialang.org/t/equivalent-for-tf-keras-layers-lambda-in-tensorflow-jl-mxnet-jl/8511)

<div class="topic-metadata">

**Author:** [@v-i-s-h](https://discourse.julialang.org/u/v-i-s-h)\
**Replies:** 1\
**Last updated:** [January 24, 2018, 4:55pm UTC](https://discourse.julialang.org/t/equivalent-for-tf-keras-layers-lambda-in-tensorflow-jl-mxnet-jl/8511 "2018-01-24T16:55:44Z")

</div>

Hi, I’m porting some code from Python using Tensorflow to Julia. I’m unable to find an equivalent for custom layer in TensorFlow.jl or in MXNet.jl. This is the exact code I want to translate: from tensorflow.python.ke…

---

## [TensorFlow.jl on a cluster](https://discourse.julialang.org/t/tensorflow-jl-on-a-cluster/7718)

<div class="topic-metadata">

**Author:** [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)\
**Replies:** 0\
**Last updated:** [December 12, 2017, 7:45pm UTC](https://discourse.julialang.org/t/tensorflow-jl-on-a-cluster/7718 "2017-12-12T19:45:19Z")

</div>

We have a cluster with 64 nodes and two 8-core processors. Is it possible to use multiple CPUs with TensorFlow.jl using either 16 cores on a single node or multiple nodes ? Are the corresponding functions from the Pyth…

---

## [TensorFlow.jl MNIST Tutorial fails.](https://discourse.julialang.org/t/tensorflow-jl-mnist-tutorial-fails/7476)

<div class="topic-metadata">

**Author:** [@rickhg12hs](https://discourse.julialang.org/u/rickhg12hs)\
**Replies:** 0\
**Last updated:** [December 3, 2017, 2:30pm UTC](https://discourse.julialang.org/t/tensorflow-jl-mnist-tutorial-fails/7476 "2017-12-03T14:30:44Z")

</div>

Ref: Github Issue Report Both MNIST tutorials (softmax & CNN) fail with TensorFlow.jl. I’m a ML noob and I’m not sure how to further diagnose the problem. Is this a Tensorflow.jl problem or perhaps a tutorial problem? …

---

## [Get\_variable with initializer xavier](https://discourse.julialang.org/t/get-variable-with-initializer-xavier/7042)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 1\
**Last updated:** [November 13, 2017, 3:04pm UTC](https://discourse.julialang.org/t/get-variable-with-initializer-xavier/7042 "2017-11-13T15:04:30Z")

</div>

I’m trying to emulate a python call to get\_variable() in Julia: Python: tf.get\_variable(name,size,initializer=tf.contrib.layers.xavier\_initializer(seed = 0)) Julia: get\_variable(size,…?..) but not getting the xavier…

---

## [TensorFlow: Basic example fails on "Variable"](https://discourse.julialang.org/t/tensorflow-basic-example-fails-on-variable/6560)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 5\
**Last updated:** [October 20, 2017, 9:23am UTC](https://discourse.julialang.org/t/tensorflow-basic-example-fails-on-variable/6560 "2017-10-20T09:23:42Z")

</div>

When using the basic example from https://malmaud.github.io/tfdocs/basic\_usage/ the only way I can get it to complete without error is by suppressing the y “Variable”. This version works correctly (but the test fails): u…

---

## [ANN: Augmentor.jl - Image Augmentation for Deep Learning](https://discourse.julialang.org/t/ann-augmentor-jl-image-augmentation-for-deep-learning/6150)

<div class="topic-metadata">

**Author:** [@Evizero](https://discourse.julialang.org/u/Evizero)\
**Replies:** 0\
**Last updated:** [September 29, 2017, 12:52am UTC](https://discourse.julialang.org/t/ann-augmentor-jl-image-augmentation-for-deep-learning/6150 "2017-09-29T00:52:06Z")

</div>

Hello everyone! I am happy to finally announce the latest machine learning package I have been working on for quite a while: Augmentor.jl Github: GitHub - Evizero/Augmentor.jl: A fast image augmentation library in Jul…

---

## [TensorFlow : CPU warnings](https://discourse.julialang.org/t/tensorflow-cpu-warnings/5993)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 4\
**Last updated:** [September 20, 2017, 2:12pm UTC](https://discourse.julialang.org/t/tensorflow-cpu-warnings/5993 "2017-09-20T14:12:14Z")

</div>

Each time I run a TF programme it runs fine but starts out warning me in about 20 lines of messages that I really should be putting my Intel CPU to better use by using the MKL instructions. So I put several hours into tr…

---

## [TensorFlow : explicit close session?](https://discourse.julialang.org/t/tensorflow-explicit-close-session/5952)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 2\
**Last updated:** [September 19, 2017, 1:54am UTC](https://discourse.julialang.org/t/tensorflow-explicit-close-session/5952 "2017-09-19T01:54:50Z")

</div>

The Python API calls for an explicit close of the session according to example code I have seen. The docs for Julia seem to indicate there is no close() on a session. Would this be a Python/Julia difference to add to the…

---

## [TensorFlow : train.restore](https://discourse.julialang.org/t/tensorflow-train-restore/5948)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 2\
**Last updated:** [September 18, 2017, 3:33pm UTC](https://discourse.julialang.org/t/tensorflow-train-restore/5948 "2017-09-18T15:33:45Z")

</div>

I’m trying to familiarize with the sample code which runs correctly. There is a line in the epoch iteration train.save(…) which saves a number of binary files labelled from 95 to 99. I understand that they can be recove…

---

## [t-SNE visualization](https://discourse.julialang.org/t/t-sne-visualization/3150)

<div class="topic-metadata">

**Author:** [@hpoit](https://discourse.julialang.org/u/hpoit)\
**Replies:** 0\
**Last updated:** [April 10, 2017, 9:25pm UTC](https://discourse.julialang.org/t/t-sne-visualization/3150 "2017-04-10T21:25:46Z")

</div>

Hi @malmaud, I’ve read all your files in TensorFlow.jl/docs/src/, thanks for that. Is there an advantage to integrating t-SNE to TensorFlow.jl? I’m not sure how I would use it separately either (haven’t studied it yet).…

---

## [Building LSTM](https://discourse.julialang.org/t/building-lstm/3153)

<div class="topic-metadata">

**Author:** [@hpoit](https://discourse.julialang.org/u/hpoit)\
**Replies:** 1\
**Last updated:** [April 11, 2017, 12:16pm UTC](https://discourse.julialang.org/t/building-lstm/3153 "2017-04-11T12:16:24Z")

</div>

How do I build the LSTM cell? Is it nn.rnn.LSTMCell(input, state, input\_dim=-1) ? Can I add that under RNN in https://github.com/malmaud/TensorFlow.jl/blob/master/docs/src/ops.md ? @malmaud

---

## [Dropout regularization](https://discourse.julialang.org/t/dropout-regularization/3154)

<div class="topic-metadata">

**Author:** [@hpoit](https://discourse.julialang.org/u/hpoit)\
**Replies:** 1\
**Last updated:** [April 11, 2017, 11:39am UTC](https://discourse.julialang.org/t/dropout-regularization/3154 "2017-04-11T11:39:00Z")

</div>

Hi Jon @malmaud, is nn.dropout(cell, Tensor(output\_keep\_prob)) only for multi-cell nn? If my LSTM has only one cell state, then is there a need for it?

---

## [Tensorflow.jl - Where is the wrapper of \`tensorflow::ops::Abs\`?](https://discourse.julialang.org/t/tensorflow-jl-where-is-the-wrapper-of-tensorflow-ops-abs/3095)

<div class="topic-metadata">

**Author:** [@hpoit](https://discourse.julialang.org/u/hpoit)\
**Replies:** 1\
**Last updated:** [April 6, 2017, 11:40pm UTC](https://discourse.julialang.org/t/tensorflow-jl-where-is-the-wrapper-of-tensorflow-ops-abs/3095 "2017-04-06T23:40:36Z")

</div>

Hi. From TensorFlow C++ API Reference | TensorFlow v2.9.1, module math\_ops, operator tensorflow::ops::Abs, where is the wrapper of Abs( const ::tensorflow::Scope & scope, ::tensorflow::Input x ) \`\`\` in https://gi…

---

## [TensorFlow.jl basic usage ERROR: UndefVarError: global\_variables\_initializer not defined](https://discourse.julialang.org/t/tensorflow-jl-basic-usage-error-undefvarerror-global-variables-initializer-not-defined/2951)

<div class="topic-metadata">

**Author:** [@hpoit](https://discourse.julialang.org/u/hpoit)\
**Replies:** 1\
**Last updated:** [March 29, 2017, 3:43pm UTC](https://discourse.julialang.org/t/tensorflow-jl-basic-usage-error-undefvarerror-global-variables-initializer-not-defined/2951 "2017-03-29T15:43:23Z")

</div>

julia\> using TensorFlow INFO: Precompiling module TensorFlow. julia\> sess=TensorFlow.Session() 2017-03-29 12:11:27.483376: W tensorflow/core/platform/cpu\_feature\_guard.cc:45\] The TensorFlow library wasn't compiled to us…
