Comments (7)
Hi @Depanshu-Sani,
dates.json is used in my code to compute the positional encodings based on the observation dates instead of the position in the sequence.
It is accessed in line 70 of dataset.py
and used line 188 of train.py
.
So a quick workaround for you would be to comment l.70-71 of dataset.py
and instead initialise the variable d as an empty dict. You can then pass the --position order
argument to train.py
and this should work. However doing so, the positional encodings will be based on the sequence ordering instead of the observation dates.
You can also have a look at this issue where I point to more recent code that can handle time series with different date sequences.
from pytorch-psetae.
Positional encoding based on the sequence order is exactly what I needed!
Thank you :)
from pytorch-psetae.
I tried modifying the code as you mentioned but it seems that this not working. I commented line 70-73 (Ln 72 & 73 use the dates.json loaded in ln 70-71). I used the following command:
python train.py --dataset_folder ../Dataset/spatio-temporal/L8/SEASON_WISE/ --num_classes 2 --mlp1 [7,32,64] --mlp2 [128,128] --mlp4 [128,64,32,2] --geomfeat 0 --input_dim 7 --res_dir spatio-temporal/L8/SEASON_WISE --position order
Error:
Traceback (most recent call last):
File "train.py", line 309, in <module>
main(config)
File "train.py", line 199, in main
model = PseTae(**model_config)
File "/home/depanshus/pytorch-psetae/models/stclassifier.py", line 26, in __init__
T=T, len_max_seq=len_max_seq, positions=positions)
File "/home/depanshus/pytorch-psetae/models/tae.py", line 47, in __init__
positions = len_max_seq + 1
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
from pytorch-psetae.
Yes I forgot one thing: if you are not going to provide the list of dates, you need to specify the maximum length of sequence in your dataset (this does not have to be exact, an overestimation will do). This is done with the --lms
argument of the train.py
script.
from pytorch-psetae.
It worked! Thanks for the quick response :)
from pytorch-psetae.
@VSainteuf Hi, in this situation (where dates are not equal for the files) how should the normalization be calculated? Because the normalization has txc shape which t is time. I am a little bit confused. I am asking this because my dataset has not have all data for the dates extracted from my data
from pytorch-psetae.
@Depanshu-Sani how did you calculate normalization if you do not have specific list of dates?
from pytorch-psetae.
Related Issues (15)
- Question about THEIA tiles pre-processing HOT 4
- dataset HOT 1
- GeoTiff and GeoJson HOT 2
- How to normalize data if I have dataset not for everyday? HOT 14
- Inference issue HOT 2
- Timestamp HOT 4
- Dataset.py script + geomfeat.json
- Order of channels HOT 6
- Label set in paper HOT 11
- geomfeat in paper HOT 3
- Linear interpolation of cloudy pixels HOT 8
- Question regarding the normalization values HOT 1
- About dataset. HOT 2
- Question HOT 13
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-psetae.