Issue with running TF 2.1.0 with `validation_data` tuple present
See original GitHub issue- Weights and Biases version: wandb, version 0.8.28
- Python version: Python 3.7.2
- Operating System: Darwin
Description
I am not able to train TF models when passing validation_data
on TF 2.1.0.
What I Did
import tensorflow_core as tf
from wandb.keras import WandbCallback
import wandb
wandb.init(
project="test",
)
model = tf.keras.models.Sequential()
...
model.fit(
x=train_features,
y=train_values,
validation_data=(test_features, test_values),
epochs=5,
callbacks=[WandbCallback()],
verbose=2
)
Results in:
File "[redacted project file]", line 57, in run_training
self.sequential = self._train_network(train_features, test_features, train_values, test_values)
File "[redacted project file]", line 128, in _train_network
verbose=2
File "[redacted project loc]/venv/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 819, in fit
use_multiprocessing=use_multiprocessing)
File "[redacted project loc]/venv/lib/python3.7/site-packages/wandb/keras/__init__.py", line 111, in new_v2
set_wandb_attrs(cbk, val_data)
File "[redacted project loc]/venv/lib/python3.7/site-packages/wandb/keras/__init__.py", line 79, in set_wandb_attrs
elif isinstance(val_data, tuple) and isinstance(val_data[0], tf.Tensor):
AttributeError: module 'tensorflow' has no attribute 'Tensor'
Note 1: I am using tensorflow==2.1.0
.
Note 2: The issue does not occur if I remove validation_data
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Issue with running TF 2.1.0 with `validation_data` tuple present
I am not able to train TF models when passing validation_data on TF 2.1.0. What I Did. import tensorflow_core as tf from wandb.keras...
Read more >TensorFlow 2 Tutorial: Get Started in Deep Learning with tf.keras
Using tf.keras allows you to design, fit, evaluate, and use deep ... Your goal is to run through the tutorial end-to-end and get...
Read more >Part 1: Exploring Tensorflow 2 - Keras API - Dev State
Passing this argument—a tuple of inputs and labels—allows the model to display the loss and metrics in inference mode for the passed data,...
Read more >How do I write the result of tf.Data.dataset.take() using ...
The problem I'm getting is that what I assumed would be a Dataset object is a TakeDataset object. I'm on Ubuntu 16.04 and...
Read more >Python | Check if element is present in tuple of tuples
Method #1: Using any() any function is used to perform this task. It just tests one by one if the element is present...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for reporting this! @raubitsj could you please take a look.
Closing this as @vanpelt has already mentioned a workaround for the ticket.