Comments (1)
I have nothing to provide you but solidarity. I am running into this same problem with a TFRecords data pipeline:
def _parse_function(example_proto):
feature_description = {
'ny' : tf.io.FixedLenFeature([], tf.int64, default_value = 0),
'nx' : tf.io.FixedLenFeature([], tf.int64, default_value = 0),
'ntp' : tf.io.FixedLenFeature([], tf.int64, default_value = 0),
'ntf' : tf.io.FixedLenFeature([], tf.int64, default_value = 0),
'ncp' : tf.io.FixedLenFeature([], tf.int64, default_value = 0),
'ncf' : tf.io.FixedLenFeature([], tf.int64, default_value = 0),
'priors' : tf.io.FixedLenFeature([], tf.string, default_value = ''),
'forecasts' : tf.io.FixedLenFeature([], tf.string, default_value = ''),
}
features = tf.io.parse_example(example_proto, feature_description)
priors = tf.io.parse_tensor(features['priors'], tf.float32)
forecasts = tf.io.parse_tensor(features['forecasts'], tf.float32)
ny = features['ny']
nx = features['nx']
ntp = features['ntp']
ntf = features['ntf']
ncp = features['ncp']
ncf = features['ncf']
priors = tf.reshape(priors, shape = [ntp, ny, nx, ncp])
forecasts = tf.reshape(forecasts, shape = [ntf, ny, nx, ncf])
return priors, forecasts
...
def create_dataset_onr_tfrecords(path,
glob,
batch_size = 32,
compression = 'GZIP',
shuffle = True,
deterministic = False):
return tf.data.Dataset.list_files(str(path / glob), shuffle = shuffle).interleave(
lambda x: tf.data.TFRecordDataset(x, compression_type = compression),
cycle_length = tf.data.AUTOTUNE,
num_parallel_calls = tf.data.AUTOTUNE,
deterministic = deterministic
).map(
_parse_function,
num_parallel_calls = tf.data.AUTOTUNE
).batch(
batch_size, drop_remainder = True
).prefetch(tf.data.AUTOTUNE)
I'll spare you the plot, but I am having the same issue with a vanilla TF dataset. I've tried removing interleave, removing GZIP compression, calling TFRecordDataset directly, removed batching, removed prefetching... nothing.
I believe this is a Tensorflow problem and (in particular) a TF Dataset problem: tensorflow/tensorflow#65675
This TF 2.16 + K3 era has been a disaster. Not the Keras part -- just some growing pains. But TF, man...
from keras.
Related Issues (20)
- The saved keras model cannot be loaded. HOT 6
- Conv1D on custom shaped data HOT 1
- Adding `ops.associative_scan`? HOT 2
- Cant predict after training on TPU. HOT 2
- No file or directory found at spiral_keras_model.h5 HOT 1
- output_padding argument in Conv1DTranspose
- Unable to export reloaded model HOT 1
- [feature request] Add KAN models HOT 1
- Sequentials `_maybe_rebuild` does not make sense
- Ops inconsistency with tensorflow for tril and triu HOT 1
- Bug in Keras 3.4.0: Loading model error 'No such file or directory: 'model.weights.h5' HOT 7
- Irregular Tensors as output from Generator class with batch size = 1
- keras tensorflow tf.keras.layers.Lambda issue returns AttributeError: Exception encountered when calling Lambda.call(). 'TrackedList' object has no attribute 'items' HOT 1
- Keras fails to train on custom generator (Torch backend) HOT 1
- Upsampling2d Skips one sample at index 8388608 (2^23) HOT 2
- `unhashable type: 'DTypePolicy'` may leads problems in keras 3.4.1 HOT 4
- Keras Image data loader returns tf.Data object on JAX backend HOT 2
- Values in `.evaluate()`'s progress bar do not match final output HOT 4
- [Question]: Could we merge `keras.random` and `keras.ops`?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras.