Comments (6)
Same experience, the model training stops because of the EarlyStopping callback.
Setting callbacks = None results in 150 EPOCHS of zero progress in accuracy.
Also reproducible in Colab
from keras-io.
I think I might have found the solution. The GlobalAveragePooling1D just before the dense layer returns the wrong shape.
It returns (None, 1) with input (None, 500, 1), but the result in the example page is (None, 500)
Changing the parameter data_format into channels_first like below fixes that:
x = layers.GlobalAveragePooling1D(data_format="channels_first", name="TooSmallOutput")(x)
With that change, the model does converge.
DISCLAIMER: I am new to transformers, only played with LSTM's so far.
From the tensorflow spec:
"channels_last" corresponds to inputs with shape (batch, steps, features) while "channels_first" corresponds to inputs with shape (batch, features, steps)
If 500 is the number of steps ( the sequence length?) and there is only one feature in the dataset, channels_last makes sense, so I don't understand why channel_first works and channel_last does not.
from keras-io.
Without " name="TooSmallOutput" it is also working.
Regarding TNN, I am also new to the machine learning and am currently trying some examples.
from keras-io.
Ah I forgot to remove that.
I added the "name="TooSmallOutput" to debug it.
It just prints out the name in the model summary.
from keras-io.
Thanks for the reply
from keras-io.
For multiclass classification using time series data, the accuracy comes nearly 0.009. What are the factors that can improve accuracy?
from keras-io.
Related Issues (20)
- Improve documentation on Yolov8 Detector HOT 1
- Keras_NLP Getting Started Tutorial: Mixed Precision Error; AttributeError: 'LossScaleOptimizerV3' HOT 6
- Performance degraded after using the mixup HOT 5
- In keras-io/guides/keras_nlp /transformer_pretraining.py there is an documentation bug HOT 1
- Add example Zero-shot Image Classification with SigLIP / CLIP from scratch using KerasCV and KerasNLP HOT 4
- Add Token Classification / Named Entity Recongnition (NER) Example with KerasNLP HOT 2
- kerascv layers demonstration HOT 3
- Could not find TensorRT HOT 3
- Error occurred in the Named Entity Recognition using Transformers example HOT 6
- Support Distributed Training for Fine-tuning Stable Diffusion Example HOT 5
- kagglecatsanddogs_5340.zip not available to downoad - image_classification_from_scratch.py HOT 2
- Problem with training yolov8 on TPU
- batch out of range & loss value becomes 'nan' when running monocular depth estimation HOT 6
- How to make individual predictions using the FNet example? HOT 4
- Multi-GPU distributed training with PyTorch
- [Movielens Example] Impossibile to save model: Cannot serialize object Ellipsis HOT 2
- TypeError: Sampler.__call__() got an unexpected keyword argument 'end_token_id' HOT 2
- ValueError: The filepath provided must end in `.keras` (Keras model format). Received: filepath=Model_ckpt.h5 HOT 7
- Hardware requirement for examples/rl/deep_q_network_breakout.py? HOT 5
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-io.