Install with minimal dependencies:
pip install pytorchfire
Install with dependencies for examples:
pip install 'pytorchfire[examples]'
pip install pytorchfire
Then,
To perform wildfire prediction:
from pytorchfire import WildfireModel
model = WildfireModel() # Create a model with default parameters and environment data
model = model.cuda() # Move the model to GPU
# model.reset(seed=seed) # Reset the model with a seed
for _ in range(100): # Run the model for 100 steps
model.compute() # Compute the next state
To perform parameter calibration:
import torch
from pytorchfire import WildfireModel, BaseTrainer
model = WildfireModel()
trainer = BaseTrainer(model)
trainer.train()
trainer.evaluate()
See at Our Read the Docs.