profile
viewpoint
oanush @tensorflow @google Bengaluru,India

issue commenttensorflow/tensorflow

'Tensor' object has no attribute 'numpy'

@TheUnixDude , import tensorflowhas attribute numpy, hence when tried running the tutorials, I was able to execute without any issues. Please try running the code again and let us know your feedback.Thank you!

TheUnixDude

comment created time in 2 months

issue commenttensorflow/tensorflow

TensorFlow 2.0 - ValueError: tf.function-decorated

@arjun-majumdar , Can you please take a look at the link of Stack-overflow and let me know if it helps.Thanks!

arjun-majumdar

comment created time in 2 months

issue commenttensorflow/tensorflow

Error:55: Could not load dynamic library 'libcudnn.so.7

@Lip651 , Feel free to close the issue if it is resolved.

Lip651

comment created time in 2 months

issue closedtensorflow/tensorflow

ModuleNotFoundError: No module named 'pycocotools._mask' PLEASE HELP ME!!!!

I am running a Windows 10 x64 machine and I do find the _mask.pyx file in the path specified but it still can't find it for some reason! I have followed the instructions off of this website. Any help is much appreciated, I have run the build.py off of the cocoAPI since I am on windows. I have tried to install pycotools through pip. I have gone through every website with this issue mentioned and nothing has worked!!!! Thanks!

Describe the current behavior its giving me this error:

Traceback (most recent call last):
File "model_main.py", line 25, in <module>
from object_detection import model_lib
File "C:\Python37\models\research\object_detection\model_lib.py", line 27, in <module>
from object_detection import eval_util
File "C:\Python37\models\research\object_detection\eval_util.py", line 33, in <module>
from object_detection.metrics import coco_evaluation
File "C:\Python37\models\research\object_detection\metrics\coco_evaluation.py", line 25, in <module>
from object_detection.metrics import coco_tools
File "C:\Python37\models\research\object_detection\metrics\coco_tools.py", line 51, in <module>
from pycocotools import coco
File "C:\Python37\models\research\pycocotools\coco.py", line 55, in <module>
from . import mask as maskUtils
File "C:\Python37\models\research\pycocotools\mask.py", line 3, in <module>
import pycocotools._mask as _mask
ModuleNotFoundError: No module named 'pycocotools._mask'

Describe the expected behavior It should run this command: python model_main.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssdlite_mobilenet_v2_coco.config

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. Idk

Other info / logs I included the logs above I really need help soon!!!

closed time in 2 months

Brayden1000

issue commenttensorflow/tensorflow

ModuleNotFoundError: No module named 'pycocotools._mask' PLEASE HELP ME!!!!

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

Brayden1000

comment created time in 2 months

issue commenttensorflow/tensorflow

ModuleNotFoundError: No module named 'pycocotools._mask' PLEASE HELP ME!!!!

@Brayden1000 , Any update on the issue ?Thanks!

Brayden1000

comment created time in 2 months

issue commenttensorflow/tensorflow

Text Classification RNN tutorial doesn't run under TF2.1

@hohl , Any update on the issue ?Thanks!

hohl

comment created time in 2 months

issue commenttensorflow/tensorflow

Custom metric in tf.keras.Model compile() gives error, but works when run_eagerly=True

I was able to replicate the issue for tf-nightly.Thanks!

dmus

comment created time in 2 months

issue commenttensorflow/tensorflow

ERROR: No matching distribution found for tensorboard<2.2.0,>=2.1.0 (from tensorflow)

@DachuanZhao , Please try !pip uninstall tensorflow and try installing tensorflow again, kindly find the gist for reference.Thanks!

DachuanZhao

comment created time in 2 months

issue closedtensorflow/tensorflow

regarding hosting of .h5 model using tfserving

hi, can I host .h5 model through tf serving, or it just supports .tfsavedformat models for hosting. please let me know if I can host it , and if you can suggest me an article for the support

closed time in 2 months

divyag11

issue commenttensorflow/tensorflow

regarding hosting of .h5 model using tfserving

@divyag11 , Hi this issue looks like is related to tf-serving, can you please open new issue in serving repo?Thanks!

divyag11

comment created time in 2 months

issue commenttensorflow/tensorflow

Regression: contrib.boosted_trees.estimator_batch modules are not available in 1.15.2

Issue replicating for latest tf-1.15.2,Thanks!

lostmsu

comment created time in 2 months

issue commenttensorflow/tensorflow

Keras `predict` with sigmoid output returns probabilities instead of labels

@Kodiologist , Any update on the issue ?Thanks!

Kodiologist

comment created time in 2 months

issue commenttensorflow/tensorflow

GradientTape.gradient fails when tf.gather is used after LSTM/GRU in tf.function

Issue replicating for tf-nightly, thanks!

foxik

comment created time in 2 months

issue commenttensorflow/tensorflow

Dll load failed

@angelineaish , Hi, please provide the information asked in the template. Also please refer the comment1 comment2 from @mihaimaruseac for similar issue and let us know if it helps.

angelineaish

comment created time in 2 months

issue commenttensorflow/tensorflow

model.summary() Does not Work in Some Cases

@yourtheron , Thank you for raising bug, can you please provide us an example to reproduce the issue?

yourtheron

comment created time in 2 months

issue commenttensorflow/tensorflow

Validation and Evaluation Metric Issues in TensorFlow when Transfer Learning

@Jon573 , Just provide us the complete code with link of data-set used so that we can reproduce the issue.Thanks!

Jon573

comment created time in 2 months

issue commenttensorflow/tensorflow

model.fit outputs an extra "Epoch 1/x" for each epoch

@bersbersbers , Any update on the issue ?Thanks!

bersbersbers

comment created time in 2 months

issue closedtensorflow/tensorflow

Tensorflow import issue

error code

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\USER\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_init_.py", line 24, in <module> from tensorflow.python import * File "C:\Users\USER\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python_init_.py", line 52, in <module> from tensorflow.core.framework.graph_pb2 import * File "C:\Users\USER\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module> from google.protobuf import descriptor as _descriptor File "C:\Users\USER\AppData\Local\Programs\Python\Python36\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module> from google.protobuf.pyext import _message ImportError: DLL load failed: The specified procedure could not be found.

python version 3.6 tensorflow version 1.5(installed via pip) visual studio c++ installed using a 64 bit machine

closed time in 2 months

arnabnag2000

issue commenttensorflow/tensorflow

Tensorflow import issue

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

arnabnag2000

comment created time in 2 months

issue closedtensorflow/tensorflow

OOM error when running ops on large tensors in TF2.0

<em>Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template</em>

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 2.0.0
  • Python version: 3.7.6
  • Bazel version (if compiling from source): N/A
  • GCC/Compiler version (if compiling from source): N/A
  • CUDA/cuDNN version: 10.0.130 / 7.6.0
  • GPU model and memory: Nvidia GeForce GTX 1060

Describe the current behavior

I want to allocate a large tensor (in the 100Ms of elements) and perform an operation on it such as tf.exp. However, when I apply an operation to my tensor it appears that TF is reallocating the entire thing, causing an OOM. This behavior is not limited to tf.exp, I believe it is common across all ops. Is there any way to force TF not to do such a massive reallocation?

Describe the expected behavior

TF should return the result of tf.exp without error.

Code to reproduce the issue

Running:

x = tf.ones([1, 25088, 25088])
tf.exp(x)

Gives me the following error:

2020-01-08 15:06:32.805387: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at cwise_ops_common.h:259 : Resource exhausted: OOM when allocating tensor with shape[1,25088,25088] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/evan/opt/miniconda3/envs/tf-gpu-2.0.0/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_math_ops.py", line 3970, in exp
    _six.raise_from(_core._status_to_exception(e.code, message), None)
  File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[1,25088,25088] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc [Op:Exp]

In PyTorch, I could run the following identical code without error:

x = torch.ones((1,25088,25088))
torch.exp(x)

closed time in 2 months

evancasey

issue commenttensorflow/tensorflow

OOM error when running ops on large tensors in TF2.0

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

evancasey

comment created time in 2 months

issue closedtensorflow/tensorflow

ERROR: Could not find a version that satisfies the requirement tensorflow

<em>Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em>

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Mac Air, Moave (10.14.5 )

  • TensorFlow installed from (source or binary): installed using: pip3 install tensorflow

  • TensorFlow version: 2.0

  • Python version: 3.6.5 64Bit

  • Installed using: pip

Describe the problem Using in RStudio, I installed R packages:

devtools::install_github('rstudio/tensorflow')

devtools::install_github('rstudio/keras')

tried:

install_tensorflow() tensorflow::install_tensorflow()

but both gave me an error message:

ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.0 (from versions: none) ERROR: No matching distribution found for tensorflow==2.0.0 Error: Error installing package(s): 'tensorflow==2.0.0'

I checked page after page and found that I needed 3.6.x version of python, so I reverted and it did nothing. I re-installed tensorflow and nothing changed.

When I checked on python tensorflow worled but for some reason I can't get it to work on RStudio.

Any help please?

Thanks Mark

closed time in 2 months

MarkJThomas

issue commenttensorflow/tensorflow

ERROR: Could not find a version that satisfies the requirement tensorflow

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

MarkJThomas

comment created time in 2 months

issue closedtensorflow/tensorflow

RuntimeError: Mixing different tf.distribute.Strategy objects: <tensorflow.python.distribute.mirrored_strategy.MirroredStrategyV1 object at 0x7f50aed5d160> is not <tensorflow.python.distribute.mirrored_strategy.MirroredStrategyV1 object at 0x7f5230440748>

`def train_net(): mirror_strategy = tf.distribute.MirroredStrategy( cross_device_ops=config.cross_device_ops ) with mirror_strategy.scope():

for i in range(1, config.num_step+1): train_net(config, stage_cfg, args.fast_mode, merge_num=i)```

closed time in 2 months

Hukongtao

issue commenttensorflow/tensorflow

RuntimeError: Mixing different tf.distribute.Strategy objects: <tensorflow.python.distribute.mirrored_strategy.MirroredStrategyV1 object at 0x7f50aed5d160> is not <tensorflow.python.distribute.mirrored_strategy.MirroredStrategyV1 object at 0x7f5230440748>

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

Hukongtao

comment created time in 2 months

issue commenttensorflow/tensorflow

TF2.0 to 2.1 breaking for tf.image.random_jpeg_quality

@klanderson , Please feel free to close the issue if its resolved.Thanks!

klanderson

comment created time in 2 months

issue commenttensorflow/tensorflow

Broken link "Share your TensorFlow Lite story"

@Dok11 , I just tried accessing the link worked fine without any issues, can you try again and let us know?Thanks!

Dok11

comment created time in 2 months

issue commenttensorflow/tensorflow

tf.lite.converter.convert() Erroe

@pramodjayram, Please switch to latest versions of tf 2.0 or 2.1 and try adding

converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS,
                                       tf.lite.OpsSet.SELECT_TF_OPS]

in the code, and let us know if it helps. Please find refer #35590 similar issue.Thanks!

pramodjayram

comment created time in 2 months

issue commenttensorflow/tensorflow

Error while converting to tflite

@Sapnil98 m Please try including the code before tflite=converter.convert()

converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS,
                                       tf.lite.OpsSet.SELECT_TF_OPS]

For more information refer #35590 If the issue is still not resolved please provide us the complete code snippet used.Thanks!

Sapnil98

comment created time in 2 months

issue commenttensorflow/tensorflow

Tensorflow predict call crashes when loading a model with gevent enabled

Tried replicating the issue from given code,it just keeps running without any output.Thanks!

Intellicode

comment created time in 2 months

issue closedtensorflow/tensorflow

Keras Hub Layer Does Not Work with Functional API. Throws Exception.

TensorFlow Version: 2.1 Python Version: 3.76 OS: Windows 10 Issue: Keras Hub Layer Does Not Work with Functional API. Throws Exception. Unable to load IMDB dataset. See below code and exception:

import tensorflow as tf
from tensorflow.keras.layers import Dense, Concatenate, RepeatVector, Activation, Dot, Bidirectional, Flatten, Embedding, Input, SpatialDropout1D, LSTM, Dropout, Lambda, Conv2D, Conv1D, Attention, AdditiveAttention, GlobalAveragePooling1D, TimeDistributed, AveragePooling1D
from tensorflow.keras.models import Model
from tensorflow.keras.backend import backend
import tensorflow_hub as hub
from tensorflow.keras.datasets import imdb
from tensorflow.keras.preprocessing.sequence import pad_sequences
import numpy as np
import tensorflow_datasets as tfds

def cnn_classifier():
    # Encode each timestep
    # embedding = Embedding(10000, 300, trainable=True)(input)

    embedding = "https://tfhub.dev/google/tf2-preview/gnews-swivel-20dim/1"
    input = Input(shape=(None,), name="Input")
    hub_layer = hub.KerasLayer(embedding, trainable=True)(input)
    cnn = Conv1D(64,3, padding="same", activation="relu")(hub_layer)
    cnn = Conv1D(32, 3, padding="same", activation="relu")(cnn)
    cnn = Conv1D(16, 3, padding="same", activation="relu")(cnn)
    cnn = Flatten()(cnn)
    output = Dense(1, activation="sigmoid")(cnn)

    model = Model(input, output)
    model.compile(loss="binary_crossentropy",
                  optimizer="adam",
                  metrics=["accuracy"])
    model.summary()
    return model

model = cnn_classifier()

train_validation_split = tfds.Split.TRAIN.subsplit([8, 2])

(train_data, validation_data), test_data = tfds.load(
    name="imdb_reviews",
    split=(train_validation_split, tfds.Split.TEST),
    as_supervised=True)

#train_data = pad_sequences(train_data, maxlen=1100, dtype='int32', padding='post', truncating='post', value=0.0)
#test_data = pad_sequences(test_data, maxlen=1100, dtype='int32', padding='post', truncating='post', value=0.0)

model.fit(train_data.shuffle(25000).batch(512),
                    epochs=20,
                    validation_data=validation_data.batch(512),
                    verbose=10)

Exception:

2020-01-17 15:46:42.273900: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
WARNING:tensorflow:AutoGraph could not transform <tensorflow.python.saved_model.function_deserialization.RestoredFunction object at 0x0000029880A70D88> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output.
Cause: Python inputs incompatible with input_signature:
  inputs: (
    Tensor("Input:0", shape=(None, None), dtype=float32))
  input_signature: (
    TensorSpec(shape=(None,), dtype=tf.string, name=None))
WARNING:tensorflow:AutoGraph could not transform <tensorflow.python.saved_model.function_deserialization.RestoredFunction object at 0x0000029880A70D88> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output.
Cause: Python inputs incompatible with input_signature:
  inputs: (
    Tensor("Input:0", shape=(None, None), dtype=float32))
  input_signature: (
    TensorSpec(shape=(None,), dtype=tf.string, name=None))
Traceback (most recent call last):
  File "C:/Development/Projects/TensorFlow_2.0_Hierarchical_Attention/Classifiers.py", line 47, in <module>
    model = cnn_classifier()
  File "C:/Development/Projects/TensorFlow_2.0_Hierarchical_Attention/Classifiers.py", line 17, in cnn_classifier
    hub_layer = hub.KerasLayer(embedding, trainable=True)(input)
  File "C:\Development\Python\Python37\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 773, in __call__
    outputs = call_fn(cast_inputs, *args, **kwargs)
  File "C:\Development\Python\Python37\lib\site-packages\tensorflow_core\python\autograph\impl\api.py", line 237, in wrapper
    raise e.ag_error_metadata.to_exception(e)
ValueError: in converted code:

    C:\Development\Python\Python37\lib\site-packages\tensorflow_hub\keras_layer.py:209 call  *
        result = f()
    C:\Development\Python\Python37\lib\site-packages\tensorflow_core\python\saved_model\load.py:438 _call_attribute
        return instance.__call__(*args, **kwargs)
    C:\Development\Python\Python37\lib\site-packages\tensorflow_core\python\eager\def_function.py:568 __call__
        result = self._call(*args, **kwds)
    C:\Development\Python\Python37\lib\site-packages\tensorflow_core\python\eager\def_function.py:606 _call
        results = self._stateful_fn(*args, **kwds)
    C:\Development\Python\Python37\lib\site-packages\tensorflow_core\python\eager\function.py:2362 __call__
        graph_function, args, kwargs = self._maybe_define_function(args, kwargs)
    C:\Development\Python\Python37\lib\site-packages\tensorflow_core\python\eager\function.py:2661 _maybe_define_function
        *args, **kwargs)
    C:\Development\Python\Python37\lib\site-packages\tensorflow_core\python\eager\function.py:2185 canonicalize_function_inputs
        self._flat_input_signature)
    C:\Development\Python\Python37\lib\site-packages\tensorflow_core\python\eager\function.py:2252 _convert_inputs_to_signature
        format_error_message(inputs, input_signature))

    ValueError: Python inputs incompatible with input_signature:
      inputs: (
        Tensor("Input:0", shape=(None, None), dtype=float32))
      input_signature: (
        TensorSpec(shape=(None,), dtype=tf.string, name=None))


Process finished with exit code 1

<em>Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template</em>

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
  • TensorFlow installed from (source or binary):
  • TensorFlow version (use command below):
  • Python version:
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory:

You can collect some of this information using our environment capture script You can also obtain the TensorFlow version with: 1. TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)" 2. TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the current behavior

Describe the expected behavior

Code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem.

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

closed time in 2 months

nectario

issue closedtensorflow/tensorflow

'AttentionWrapper' object has no attribute 'zero_state'

This template is for miscellaneous issues not covered by the other issue categories.

For questions on how to work with TensorFlow, or support for problems that are not verified bugs in TensorFlow, please go to StackOverflow.

If you are reporting a vulnerability, please use the dedicated reporting process.

For high-level discussions about TensorFlow, please post to discuss@tensorflow.org, for questions about the development or internal workings of TensorFlow, or if you would like to know how to contribute to TensorFlow, please post to developers@tensorflow.org.

closed time in 2 months

Neel125

issue commenttensorflow/tensorflow

'AttentionWrapper' object has no attribute 'zero_state'

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

Neel125

comment created time in 2 months

issue commenttensorflow/tensorflow

Saving tf.keras.Sequential model fails with RNN containing more than one GRUCell

@oanush, Thank you for your quick response. I tried with my 2.0.0-dev20190731 installation. It seems to work, but I am getting warnings:

WARNING:tensorflow:Entity <function Function._initialize_uninitialized_variables.<locals>.initialize_variables at 0x7fc8b0cd21e0> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: module 'gast' has no attribute 'Num'
WARNING:tensorflow:Entity <function Function._initialize_uninitialized_variables.<locals>.initialize_variables at 0x7fc871a55048> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: module 'gast' has no attribute 'Num'
WARNING:tensorflow:Entity <function Function._initialize_uninitialized_variables.<locals>.initialize_variables at 0x7fc8701499d8> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: module 'gast' has no attribute 'Num'
WARNING:tensorflow:Entity <function Function._initialize_uninitialized_variables.<locals>.initialize_variables at 0x7fc871af60d0> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: module 'gast' has no attribute 'Num'
WARNING:tensorflow:Entity <function Function._initialize_uninitialized_variables.<locals>.initialize_variables at 0x7fc84c67e1e0> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: module 'gast' has no attribute 'Num'
WARNING:tensorflow:Entity <function Function._initialize_uninitialized_variables.<locals>.initialize_variables at 0x7fc84c401158> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: module 'gast' has no attribute 'Num'
WARNING:tensorflow:Entity <function Function._initialize_uninitialized_variables.<locals>.initialize_variables at 0x7fc8146d6ea0> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: module 'gast' has no attribute 'Num'
2020-01-22 08:16:48.048918: W tensorflow/python/util/util.cc:288] Sets are not currently considered sequences, but this may change in the future, so consider avoiding using them.
WARNING:tensorflow:Entity <function canonicalize_signatures.<locals>.signature_wrapper at 0x7fc8b0b65bf8> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: Bad argument number for Name: 3, expecting 4
WARNING:tensorflow:Entity <function Function._initialize_uninitialized_variables.<locals>.initialize_variables at 0x7fc8144619d8> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: module 'gast' has no attribute 'Num'
WARNING:tensorflow:From /home/test/dev/tensorflow/tf2/lib/python3.6/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1784: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.

Apparently I need a newer tensorflow version, as in gist of colab with tf_nightly-2.2.0.dev20200121, most of the warnings do not occur. I would love to install a current snapshot, but whatever I tried has failed so far:

  1. Installing tf-nightly with pip results in installing tf-nightly-1.15.0.dev20190730, which is not as desired.
  2. Installing a wheel package with pip fails with error tf_nightly-2.2.0.dev20200121-cp36-cp36m-manylinux2010_x86_64.whl is not a supported wheel on this platform..
  3. Source build fails eventually with error Server terminated abruptly (error code: 14, error message: 'Socket closed' (see tensorflow/models#3647 (comment)).

Is there any way to install e.g. a tf_nightly-2.2.0.dev20200121 (as seen on the gist of colab) on an Ubuntu 18.04, ideally without building from source?

@padoremu ,

Hello you can try installing nightly version with !pip install tf-nightly , it should work fine!

padoremu

comment created time in 2 months

issue commenttensorflow/tensorflow

ValueError: Tried to convert 'y' to a tensor and failed. Error: None values not supported.

@Chosen-ones , Can you refer solutions in the links and let us know if it helped link1 and link2. Thanks!

Chosen-ones

comment created time in 2 months

issue commenttensorflow/tensorflow

ERROR: intel-tensorflow has an invalid wheel

@djstrong , Can you please check @mihaimaruseac update on this and redirect to Intel?thanks!

djstrong

comment created time in 2 months

issue commenttensorflow/tensorflow

load_weights does not work when weights are saved in h5 format

@bj1123 , I just modified few lines of code and I am able to load the model weights successfully,kindly refer the gist of colab. Please refer these links of github and stackoverflow for more information.

bj1123

comment created time in 2 months

issue commenttensorflow/tensorflow

Saving tf.keras.Sequential model fails with RNN containing more than one GRUCell

@padoremu, Can you try saving the model in tf format? using model.save('rnn.tf',save_format='tf'). It worked fine for me without any issue's. Kindly find the gist of colab for your reference.Thanks!

padoremu

comment created time in 2 months

issue commenttensorflow/tensorflow

OSError: SavedModel file does not exist at: main.h5/{saved_model.pbtxt|saved_model.pb}

@niccle27 , From the error log i can see that saved_model-face_recognition_model.h5does not exist, make sure you import the file to the right path and then try loading the model using load_model. You can provide us the code being used so that i can help you out with the resolving the issue.Thanks!

niccle27

comment created time in 2 months

issue commenttensorflow/tensorflow

ImportError: DLL load failed, module not found

@laue1234 , Please feel free to close the issue if it is resolved.Thanks!

laue1234

comment created time in 2 months

issue commenttensorflow/tensorflow

Unable to run train.py / model_main.py

Hello @oanush , Could you please help me with the issue in my train.py model ? I have tried a hell lot of stuffs and still blooming around for a solution. Please help me if you can. I'll be obliged. (AttributeError: module 'tensorflow' has no attribute 'contrib'). Here is my code: train.zip

@tanmay1994 , From the error log I see that you are using code which is 1.x compatible and not 2.x. You must be using 2.x tensorflow version to run the code, contrib is depreciated in tf-2.x version. Please refer this add-on link and modify the code for 2.x.

RockOrSomething

comment created time in 2 months

issue commenttensorflow/tensorflow

Tensorflow import issue

@arnabnag2000 , Can you check the issue and let us know if its helped? Thanks!

arnabnag2000

comment created time in 2 months

issue commenttensorflow/tensorflow

Dataset padded_batch does not work as documented

Issue replicating,thanks!

dhpollack

comment created time in 2 months

issue commenttensorflow/tensorflow

More information

@brightest-dazes , Any update on the issue ?Thanks!

brightest-dazes

comment created time in 2 months

issue commenttensorflow/tensorflow

How to add a new op to a pb model

@stoneyang , Any update on the issue ?Thanks!

stoneyang

comment created time in 2 months

issue commenttensorflow/tensorflow

OOM error when running ops on large tensors in TF2.0

@evancasey , Any update on the issue?Thanks!

evancasey

comment created time in 2 months

issue commenttensorflow/tensorflow

adamax on tf.keras gpu 1.14.0 frequently crashes with this error

@oxqfsyef , Any update on the issue?Thanks!

oxqfsyef

comment created time in 2 months

issue commenttensorflow/tensorflow

ERROR: Could not find a version that satisfies the requirement tensorflow

@MarkJThomas , Any update on the issue ?Thanks!

MarkJThomas

comment created time in 2 months

issue closedtensorflow/tensorflow

pip installation .whl for aarch64?

Is there a release version for aarch64? It seems there are only version of x86_64, raspberry pi(armv7), etc. ?

closed time in 2 months

jiapei100

issue commenttensorflow/tensorflow

pip installation .whl for aarch64?

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

jiapei100

comment created time in 2 months

issue commenttensorflow/tensorflow

ResNet model in keras and tf.keras give different output for the same image

@NagabhushanSN95 , You can refer this SO link for the solution. Please feel free to close the issue if its resolved.Thanks!

NagabhushanSN95

comment created time in 2 months

issue commenttensorflow/tensorflow

Text Classification RNN tutorial doesn't run under TF2.1

@hohl , You can try using train_dataset = train_dataset.padded_batch(BATCH_SIZE, tf.compat.v1.data.get_output_shapes(train_dataset)) in place of train_dataset = train_dataset.padded_batch(BATCH_SIZE, train_dataset.output_shapes) test_dataset = test_dataset.padded_batch(BATCH_SIZE, tf.compat.v1.data.get_output_shapes(test_dataset)) and in place of test_dataset = test_dataset.padded_batch(BATCH_SIZE, test_dataset.output_shapes) With above changes tutorials should work fine. For more info you can refer this SO link.Thanks!

hohl

comment created time in 2 months

issue commenttensorflow/tensorflow

Keras Hub Layer Does Not Work with Functional API. Throws Exception.

@nectario , As per the description, issue belongs to TF-hub. Can you raise issue in that repo?Thanks!

nectario

comment created time in 2 months

issue commenttensorflow/tensorflow

Loading a tf.Module with tf.saved_model.load missing attributes

Issue replicating for TF-2.1 and tf-nightly .Thank you

hartikainen

comment created time in 2 months

issue closedtensorflow/tensorflow

Consuming sets of files :There are many datasets distributed as a set of files, where each file is an example.

I test and run code from: https://www.tensorflow.org/guide/data#applying_arbitrary_python_logic_with_tfpy_func import pickle as pi import os import cv2 import numpy as np import tensorflow as tf import pathlib flowers_root = tf.keras.utils.get_file( 'flower_photos', 'https://storage.googleapis.com/download.tensorflow.org/example_images/flower_photos.tgz', untar=True) flowers_root = pathlib.Path(flowers_root) for item in flowers_root.glob(""): print(item.name) #dir_training_data = '/laptrinh python/ket_qua' #flowers_root = pathlib.Path('/laptrinh python/test_file_anh/training') list_ds = tf.data.Dataset.list_files(str(flowers_root/'/*'))

for f in list_ds.take(5): print(f.numpy())

def process_path(file_path): label = tf.strings.split(file_path, '/')[-2] return tf.io.read_file(file_path), label

labeled_ds = list_ds.map(process_path)
for image_raw, label_text in labeled_ds.take(1): print(repr(image_raw.numpy()[:100])) print() print(label_text.numpy())

And happen the error as following:

Traceback (most recent call last):

File "F:\laptrinh python\laptrinh_python_chinh_thuc\model_training.py", line 33, in <module> for image_raw, label_text in labeled_ds.take(1):

File "C:\Users\Xuan Hau.conda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\data\ops\iterator_ops.py", line 622, in next return self.next()

File "C:\Users\Xuan Hau.conda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\data\ops\iterator_ops.py", line 666, in next return self._next_internal()

File "C:\Users\Xuan Hau.conda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\data\ops\iterator_ops.py", line 651, in _next_internal output_shapes=self._flat_output_shapes)

File "C:\Users\Xuan Hau.conda\envs\tf-gpu\lib\site-packages\tensorflow_core\python\ops\gen_dataset_ops.py", line 2673, in iterator_get_next_sync _six.raise_from(_core._status_to_exception(e.code, message), None)

File "<string>", line 3, in raise_from

InvalidArgumentError: {{function_node __inference_Dataset_map_process_path_106}} slice index -1 of dimension 0 out of bounds. [[{{node strided_slice}}]] [Op:IteratorGetNextSync]

closed time in 2 months

nguyenxuanhau

issue commenttensorflow/tensorflow

Consuming sets of files :There are many datasets distributed as a set of files, where each file is an example.

Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

nguyenxuanhau

comment created time in 2 months

issue commenttensorflow/tensorflow

Error in cuda_dnn.cc(1921) with cudnnRNNBackwardData. Failed to call ThenRNNBackward

@Kal213 , I was able to run the code in tf-nightly successfully, please find gist for your reference.Thanks!

Kal213

comment created time in 3 months

issue commenttensorflow/tensorflow

AttributeError: 'Tensor' object has no attribute '_datatype_enum'

Issue replicating for 2.0 and tf-nightly.Thanks!

nbro

comment created time in 3 months

issue commenttensorflow/tensorflow

tf.data.Dataset.from_generator converts input argument types implicitly instead of just forwarding

Issue replicating for given code in 2.0 and tf-nightly.TThanks!

mxmlnkn

comment created time in 3 months

issue commenttensorflow/tensorflow

ImportError: cannot import name '_tf_stack' from 'tensorflow_core.python'

@SaranyaPandiaraj , When tried running the same code in both Jupyter notebook and Colab, was able to run successfully.Kindly find the screenshot for reference. 35969 Can you try again and let us know?Thanks!

SaranyaPandiaraj

comment created time in 3 months

issue commenttensorflow/tensorflow

load_weights does not work when weights are saved in h5 format

@bj1123 , When tried running the given code in both 2.1 and tf-nightly, I didn't face any error.Thanks!

bj1123

comment created time in 3 months

issue commenttensorflow/tensorflow

Could not find matching function to call loaded from the SavedModel

@mrinalsardar , Can you please provide the code used by you to replicate the above reported error?Thanks!

mrinalsardar

comment created time in 3 months

issue commenttensorflow/tensorflow

'AttentionWrapper' object has no attribute 'zero_state'

@oanush I am using tensorflow 2.0 and os ubuntu 16.04

@Neel125 , Please provide complete information like what exactly the issue is,code used before facing error log, stack trace of error. Thanks!

Neel125

comment created time in 3 months

issue commenttensorflow/tensorflow

tf.Variable.assign fails silently

Issue replicating for tf-nightly , Thanks!

bersbersbers

comment created time in 3 months

issue commenttensorflow/tensorflow

global numbering scheme of tf.keras.layers.BatchNormalization layers seems like a wrong strategy

@rcr1994 , Can you please provide the complete code to replicate the issue ?Thanks!

rcr1994

comment created time in 3 months

issue commenttensorflow/tensorflow

ImportError: DLL load failed, module not found

@laue1234 , Also make sure to see the hardware requirement from these links linux and windows.Let us know if it helped.Thanks!

laue1234

comment created time in 3 months

issue commenttensorflow/tensorflow

Dataset padded_batch does not work as documented

@dhpollack , Can you please provide complete code? When tried executing given code I got error log NameError: name 'output_shapes_train' is not defined,find gist of colab for reference.Thanks!

dhpollack

comment created time in 3 months

issue commenttensorflow/tensorflow

OSError: SavedModel file does not exist at: main.h5/{saved_model.pbtxt|saved_model.pb}

@niccle27 , Can you please provide complete code to reproduce ?Thanks!

niccle27

comment created time in 3 months

issue commenttensorflow/tensorflow

Conv2DTranspose shape gets None when exporting SavedModel

Issue replicating for TF 2.1 and tf-nightly.Thanks!

houtoms

comment created time in 3 months

issue commenttensorflow/tensorflow

TensorBoard callback without profile_batch setting cause Errors: CUPTI_ERROR_INSUFFICIENT_PRIVILEGES and CUPTI_ERROR_INVALID_PARAMETER

@gawain-git-code , I tried running the code in colab and I was able to run it successfully. please find the gist for reference.Thanks!

gawain-git-code

comment created time in 3 months

issue commenttensorflow/tensorflow

Validation and Evaluation Metric Issues in TensorFlow when Transfer Learning

@Jon573 , Looks like the given code is incomplete,can you please share complete code?Thanks!

Jon573

comment created time in 3 months

more