GithubHelp home page GithubHelp logo

hansbambel / multidim_conv Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 6.0 145.59 MB

PyTorch code for the Paper "Wind speed prediction using multidimensional convolutional neuralnetworks"

Python 100.00%

multidim_conv's Introduction

Code for the Paper "Wind speed prediction using multidimensional convolutional neuralnetworks" arXiv-Link

Multidimensional Convolution

Usage

  1. Install the necessary packages from the requirements.txt.
  2. Specify the training parameters in train.py.
  3. Execute train.py.

Training parameters

It is possible to train multiple models after each other by adding them to the list of models_to_test in the train_wind and train_wind_nl functions.

Proposed model

Our proposed model can be found in wind_models.py under the name MultidimConvNetwork. The Multidimensional Convolution Layer can be found in the same file under MultidimConv.

Citation

@inproceedings{trebing2020wind,
  title={Wind speed prediction using multidimensional convolutional neural networks},
  author={Trebing, Kevin and Mehrkanoon, Siamak},
  booktitle={IEEE symposium series on computational intelligence (IEEE-SSCI)},
  pages={713--720},
  year={2020},
  organization={IEEE}
}

multidim_conv's People

Contributors

hansbambel avatar smehrkanoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

multidim_conv's Issues

about fig7

Thank you for your open code. Here is a question. I don't know how to plotted the wind speed prediction for the cities of Eindhoven and Maastricht at each time step, like Figure 7 in your article. If you can take the time to answer it, thank you very much.

Such functions do not allow the output views to be modified inplace

  File "D:\python_project\multidim_conv-master\multidim_conv-master\train.py", line 404, in <module>
    train_wind_nl(folder+data, epochs=150, input_timesteps=6, prediction_timestep=t, dev=dev, earlystopping=20)
  File "D:\python_project\multidim_conv-master\multidim_conv-master\train.py", line 307, in train_wind_nl
    summary(model, (7, input_timesteps, 6), device="cpu")
  File "C:\Users\xinyi\.conda\envs\pytorch\lib\site-packages\torchsummary\torchsummary.py", line 72, in summary
    model(*x)
  File "C:\Users\xinyi\.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "C:\Users\xinyi\.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
  File "D:\python_project\multidim_conv-master\multidim_conv-master\models\wind_models.py", line 93, in forward
    x = F.relu(self.conv1(x))
  File "C:\Users\xinyi\.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "C:\Users\xinyi\.conda\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1568, in _call_impl
    result = forward_call(*args, **kwargs)
  File "D:\python_project\multidim_conv-master\multidim_conv-master\models\attention_augmented_conv.py", line 52, in forward
    flat_q, flat_k, flat_v, q, k, v = self.compute_flat_qkv(x, self.dk, self.dv, self.Nh)
  File "D:\python_project\multidim_conv-master\multidim_conv-master\models\attention_augmented_conv.py", line 79, in compute_flat_qkv
    q *= dkh ** -0.5
RuntimeError: Output 0 of ReshapeAliasBackward0 is a view and is being modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one. 

Hello author, I created a new virtual environment in Anaconda and installed the latest version of PyTorch. However, when running the code, it stops and throws an error around 30%. The error code is shown above. I searched on Google and made some improvements to the line of code q *= dkh ** -0.5. Now it doesn't stop at 30% anymore, but it starts from 0 again. I spent a long time trying to figure it out but couldn't. I hope to get your answer on what I should do to run your code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.