Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 16:43
    googlebot labeled #1204
  • 16:43
    googlebot unlabeled #1204
  • 16:40
    googlebot labeled #1204
  • 16:40
    tomknig review_requested #1204
  • 16:40
    tomknig review_requested #1204
  • 16:40
    tomknig review_requested #1204
  • 16:40
    tomknig opened #1204
  • 15:15
    TensorFlow-Docs-Copybara closed #986
  • 12:28
    kokoro-team unlabeled #1190
  • 12:28
    tfdocsbot labeled #1190
  • 12:28
    tfdocsbot labeled #1190
  • 06:53
    tulasiram58827 closed #1203
  • 06:09
    googlebot labeled #1203
  • 06:09
    googlebot unlabeled #1203
  • 06:01
    googlebot labeled #1203
  • 06:01
    tulasiram58827 review_requested #1203
  • 06:01
    tulasiram58827 review_requested #1203
  • 06:01
    tulasiram58827 review_requested #1203
  • 06:01
    tulasiram58827 opened #1203
  • 05:39
    kimziou77 synchronize #1155
Vishesh Mangla
@XtremeGood
because matrices are 1000* 1000 dimensions
Also in tf 2.0 contrib is removed
where can I find integrate.odeint?
HarikrishnanBalagopal
@HarikrishnanBalagopal
@lamberta is non eager still supported in tensorflow 2?
Sean Morgan
@seanpmorgan
So you can decorate eager functions with @tf.function to build a graph representation under the hood. Alternatively public API from TF 1.x is available using tf.compat.v1 https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/compat/v1
So you can still run sessions/graphs if you really want
HarikrishnanBalagopal
@HarikrishnanBalagopal
def testing():
    model = Sequential([
        Input(shape=(1,)),
        Dense(2),
        Dense(1, activation='sigmoid')
    ])
    model.compile('adam', tf.keras.losses.BinaryCrossentropy(), metrics=[tf.keras.metrics.BinaryAccuracy()])

    xs = np.linspace(-1, 1, 100)
    ys = np.where(xs <= 0, 1, 0)
    plt.plot(xs, ys)

    results = model.evaluate(xs, ys)
    print('before training test loss, test acc:', results)
    yps = model.predict(xs)
    print(np.mean(yps), yps[:10].flatten())

    model.fit(xs, ys, batch_size=100, epochs=400, verbose=0)

    results = model.evaluate(xs, ys)
    print('after training, test loss, test acc:', results)
    yps = model.predict(xs)
    print(np.mean(yps), yps[:10].flatten())

testing()
This prints 100% accuracy before and after training.
100/100 [==============================] - 0s 1ms/sample - loss: 0.4602 - binary_accuracy: 1.0000
before training test loss, test acc: [0.4602195370197296, 1.0]
0.49999997 [0.75605214 0.7518128  0.7475245  0.7431873  0.73880166 0.7343679
 0.72988635 0.72535753 0.7207818  0.7161597 ]
100/100 [==============================] - 0s 137us/sample - loss: 0.2889 - binary_accuracy: 1.0000
after training, test loss, test acc: [0.28886041820049285, 1.0]
0.50000006 [0.9287006  0.9251896  0.92152035 0.91768706 0.9136842  0.90950584
 0.90514624 0.9005994  0.89585984 0.8909216 ]
HarikrishnanBalagopal
@HarikrishnanBalagopal
Well it does SOMETIMES
HarikrishnanBalagopal
@HarikrishnanBalagopal
@lamberta I think this example is very poor https://www.tensorflow.org/guide/datasets#using_high-level_apis
HarikrishnanBalagopal
@HarikrishnanBalagopal
filenames = ["/var/data/file1.tfrecord", "/var/data/file2.tfrecord"]
dataset = tf.data.TFRecordDataset(filenames)
dataset = dataset.map(...)
dataset = dataset.shuffle(buffer_size=10000)
dataset = dataset.batch(32)
dataset = dataset.repeat(num_epochs)
iterator = dataset.make_one_shot_iterator()

next_example, next_label = iterator.get_next()
loss = model_function(next_example, next_label)

training_op = tf.train.AdagradOptimizer(...).minimize(loss)

with tf.train.MonitoredTrainingSession(...) as sess:
  while not sess.should_stop():
    sess.run(training_op)
1) The label is given to the model and the loss is calculated inside the model function.
2) There is no evaluate operation so training progress is not printed.
3) The number of epochs is fixed and decided by repeating the dataset instead of in the training loop.
HarikrishnanBalagopal
@HarikrishnanBalagopal
The documentation https://www.tensorflow.org/api_docs/python/tf/keras/layers/LayerNormalization says that you can give a tuple as input to axis
but the code tries to manipulate the elements of self.axis which doesn't work since tuples are immutable
HarikrishnanBalagopal
@HarikrishnanBalagopal
I created an issue tensorflow/tensorflow#32311
HarikrishnanBalagopal
@HarikrishnanBalagopal
has it been removed?
now tf.config.optimizer_set_jit(True) gives an error saying AttributeError: module 'tensorflow._api.v1.config' has no attribute 'optimizer_set_jit'
Billy Lamberta
@lamberta
@HarikrishnanBalagopal Good question. Can you ask the XLA list? https://groups.google.com/forum/#!forum/xla-dev May need a doc update
gumnn
@arita37
Is there a possibility to have rectified ADAM in TensorFlow ?
PyTorch has already the implementation done.
Sean Morgan
@seanpmorgan
RAdam should be available in tensorflow/addosn within a week or two:
tensorflow/addons#422
gumnn
@arita37
thanks very much.
Pytorch have already it.... for months...so
Sean Morgan
@seanpmorgan
The initial code from the paper's author was in PyTorch so makes sense to me. Not sure what your intentions are for baiting here but this is an open source community and many of us work for free... Have a nice day :)
miffyrcee
@miffyrcee
Is there any offline documentation for zeal's tf2.0.0 stable version? My network environment is too bad.
Billy Lamberta
@lamberta
@miffyrcee Hello. The source notebooks and markdown for the TF2 guides/tutorials are in the tensorflow/docs GitHub repo—which you can download: https://github.com/tensorflow/docs/tree/master/site/en
You can select the branch to see the Markdown API docs. Though, looks like we still need to add the TF2 ref docs. Will work on that, thanks :)
miffyrcee
@miffyrcee
@lamberta Ok! Thanks a lot.I will try a later.
aohan237
@aohan237
hi i have a question about how to assign eagerTensor slice value? prediction[:,:,0]=tf.math.sigmoid(prediction[:,:,0]) will raise exception
'tensorflow.python.framework.ops.EagerTensor' object does not support item assignment
Sean Morgan
@seanpmorgan
You would want a tf.Variable if you want a mutable object
Tensors are produced values from computations
Mohammed Sharuk
@mhdSharuk
Hey guys,I'm new to gitter chat platform
I have an idea that integrates with the tensorflow's tensorboard.Does anyone know how to contribute my idea to the tensorboard???
Billy Lamberta
@lamberta
Hi @mhdSharuk, there is a SIG TensorBoard you might be interested in: https://groups.google.com/a/tensorflow.org/d/forum/sig-tensorboard
They also have community meetings
Mohammed Sharuk
@mhdSharuk
Thanks,will check this out
Reuben Morais
@reuben
hello y'all. I can't find the docs' source for 1.15 or 2.0 stable on the repo, did they get migrated somewhere else for these releases?
ah, I guess for 2.0 they're supposed to be generated from the installed package version
but will that also work for 1.15?
Sayak Paul
@sayakpaul
I tried it in this notebook: https://colab.research.google.com/drive/1LhIUA8_XbMd1gF2xGFB_50FLHoebY0MK. I found that the VAE was learning an average representation of the inputs fed to it.
image.png
I think adding this kind of visualization actually helps in many cases. In this case, we can clearly see that the model might require longer training and a bit of hyperparameter tuning (KLD factor specifically).
The above suggestion was shared by Francois himself, though. So, what I am suggesting here is incorporating helper function that lets you visualize the representation the VAE learned.

The following might be helpful:

##########################
### VISUALIZATION
##########################

n_images = 15
image_width = 28

fig, axes = plt.subplots(nrows=2, ncols=n_images, 
                         sharex=True, sharey=True, figsize=(20, 2.5))
orig_images = x_batch_train[:n_images].numpy()
decoded_images = reconstructed[:n_images].numpy()

for i in range(n_images):
    for ax, img in zip(axes, [orig_images, decoded_images]):
        curr_img = img[i]
        ax[i].imshow(curr_img.reshape((image_width, image_width)), cmap='binary')

Courtesy: Sebastian Raschka

Srishti
@copperwiring
Quick question:
How to address issues like this:tensorflow/tensorflow#34002
Also, I did reply to the message but was wondering if it's not very helpful, can this be closed?
Srishti
@copperwiring
@lamberta
They also don't seem to follow code of conduct
Srishti
@copperwiring
@lamberta I have been trying to work with docker for tensorflow (https://www.tensorflow.org/install/docker) and I feel some information on documentation may be helpful. One big add-o could be the examples. Few times, the user is directed to https://docs.docker.com/engine/reference/run/ but currently trying to work with docker, I felt a few additions in the documentation could help someone new to docker and trying to work with TensorFlow, a lot. I do find my clarifications on stack overflow, but some additions to the docs may help save time for others. Do you think it is something worth contributing?
Billy Lamberta
@lamberta
@copperwiring Sure! That file is here: https://github.com/tensorflow/docs/blob/master/site/en/install/docker.md
Please send a PR if you think it clarifies. I'd like to avoid it becoming a Docker tutorial so if we can link off to their material for deep dives, I think that's best. But feel free to surface relevant details if you think it helps.
(thanks for the pointer to the other PR, i've passed it along to the Issue maintainers)