Text Classification
Transformers
Safetensors
yield-weather-soil
crop-yield
multi-temporal
regression
yield-estimation
custom_code
Instructions to use ICICLE-AI/yield-estimation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ICICLE-AI/yield-estimation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ICICLE-AI/yield-estimation", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("ICICLE-AI/yield-estimation", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,301 Bytes
fb4abf6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | from transformers import PretrainedConfig
class YieldConfig(PretrainedConfig):
model_type = "yield-weather-soil"
def __init__(
self,
weather_vars=None,
soil_vars=None,
w_mean=None,
w_std=None,
s_mean=None,
s_std=None,
y_mean=None,
y_std=None,
K=None,
W=None,
S=None,
train_cutoffs=None,
eval_cutoffs=None,
d_model=128,
nhead=4,
num_layers=4,
dim_ff=256,
dropout=0.3,
pool="mean",
use_crop=True,
crop_emb_dim=8,
**kwargs,
):
super().__init__(**kwargs)
self.weather_vars = weather_vars
self.soil_vars = soil_vars
self.w_mean = w_mean
self.w_std = w_std
self.s_mean = s_mean
self.s_std = s_std
self.y_mean = y_mean
self.y_std = y_std
self.K = K
self.W = W
self.S = S
self.train_cutoffs = train_cutoffs
self.eval_cutoffs = eval_cutoffs
self.d_model = d_model
self.nhead = nhead
self.num_layers = num_layers
self.dim_ff = dim_ff
self.dropout = dropout
self.pool = pool
self.use_crop = use_crop
self.crop_emb_dim = crop_emb_dim |