Giter Club home page Giter Club logo

cropformer's Introduction

Cropformer

Cropformer is a genomic selection method based on the architecture of Convolutional Neural Networks (CNNs) combined with a multi-head self-attention mechanism, which is used for crop phenotype prediction.

You can also install the dependent packages by the following commands:

pip install python==3.8
pip install numpy
pip install scipy
pip install scikit-learn
pip install pillow
pip install h5py 
pip3 install torch torchvision torchaudio
pip install pandas
pip install requests

Quick Start

Run

python main.py

Output

  • model.pth

Useful options

  • DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
  • print(f'Device used: {DEVICE}')
  • is_scaler = False
  • batch_size = 128 # The number of training examples utilized in one iteration.
  • hidden_dim = 128 # The dimensionality of the hidden layer in a neural network.
  • num_attention_heads = 8 # The number of attention heads in a multi-head attention mechanism.
  • kernel_size = 3 # The size of the convolutional kernel or filter used in a convolutional neural network (CNN).
  • best_acc = 0
  • LR = 0.001 # Learning rate
  • epochs = 300
  • hidden_dropout_prob=0.3 # The number of times the learning algorithm will work through the entire training dataset.
  • attention_probs_dropout_prob = 0.3 # The probability of dropout in the hidden layers.

Jupyter

A quick implementation Jupyter script, see cropformer.ipynb

Tips

Any general-purpose computer that supports PyTorch can install this software, including systems such as Windows 10+, Linux, and macOS. On a Linux computer with 32GB of memory and a 16-core processor, the installation time for this software is less than 10 minutes. The running time is closely related to the dataset; generally, on computers with GPU support, training can be completed within 1 hour using datasets of a not too large scale.

cropformer's People

Contributors

jiekesen avatar

Watchers

 avatar

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.