hvlgo commited on
Commit
6176caa
·
verified ·
1 Parent(s): 729e0ea

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -6
README.md CHANGED
@@ -41,14 +41,9 @@ model = AutoModelForCausalLM.from_pretrained('thuml/timer-base-84m', trust_remot
41
  batch_size, lookback_length = 1, 2880
42
  seqs = torch.randn(batch_size, lookback_length)
43
 
44
- # normalize the input to mitigate different scale
45
- mean, std = seqs.mean(dim=-1, keepdim=True), seqs.std(dim=-1, keepdim=True)
46
- normed_seqs = (seqs - mean) / std
47
-
48
  # generate forecast
49
  prediction_length = 96
50
- normed_output = model.generate(normed_seqs, max_new_tokens=prediction_length)
51
- output = std * normed_output + mean # rescale the output to the original scale
52
 
53
  print(output.shape)
54
  ```
 
41
  batch_size, lookback_length = 1, 2880
42
  seqs = torch.randn(batch_size, lookback_length)
43
 
 
 
 
 
44
  # generate forecast
45
  prediction_length = 96
46
+ output = model.generate(seqs, max_new_tokens=prediction_length)
 
47
 
48
  print(output.shape)
49
  ```