Comments (4)
Could you explain further? Where are you using a random tensor? It could be your data is too difficult for the network, so it just gives the average value every time in order to minimize loss as much as it can.
from pytorch-transfomer.
Thanks for your reply! The examples you gave is to learn a sigmoid function. The input is [batch, 6, 1] and the output is [batch, 1]. I used my dataset, the input size is like [batch, 12, 10] and the target tensor size is [batch, 1, 10]. I have changed the parameters and train a model.
But when I test it, I found for all the different input, I got the similar output, even the input is a tensor with all the data is 1. So I tried small epochs to test. Then I found after the second epoch, the model I trained start output the similar result, as the picture shows(the target output(test dataset) is different). I have tried to fix it for more than 20days >_<.
So, I have changed the in and out tensor size. In addition to hyperparameters, where else should I adjust to make the model work?
Thank you!
from pytorch-transfomer.
It sounds like either the problem is too difficult for the network, or there is no correlation between inputs and outputs. Either one would cause the network to produce the average output (expected value) in an attempt to minimize loss, and ignore the inputs.
Adding more layers or widening layers may help. Also try training for more time, at least 100 epochs.
Could also be an error in the code somewhere, maybe the inputs got disconnected from the outputs somehow.
from pytorch-transfomer.
Thanks a lot. I have tried the official implementation by Pytorch, the problem is still remains. And the larger the epochs, the more likely it is to do so. I'll double check the code to see if there's a problem with it. My task is a multi-dim time series predict, maybe it could not be solved by Transformer fundamentally. Thank you again.
from pytorch-transfomer.
Related Issues (14)
- look ahead masking HOT 3
- It's seem not implement part of the test
- Decoder takes same inputs as Encoder
- damaged .ipynb file?
- multiple input output
- Where's the part about the mask
- Question regarding architecture
- something wrong about the prediction HOT 1
- Multi dimensional input HOT 1
- I should using GPU, bur ERROR HOT 1
- The code did not use dropout? HOT 1
- model.eval() does not reach internal layers
- Training on GPU HOT 1
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 pytorch-transfomer.