mirror of
https://github.com/amazon-science/chronos-forecasting
synced 2026-05-24 10:08:33 +00:00
Update chronos.py - model.device (#11)
*Issue #, if available:* N/A *Description of changes:* Thanks for the very clean impl of the Model, Tokenizer, and Pipeline. I was curios about it and found a minor improvement in the API - what do you think about it? Feel free to close. Change is untested. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This commit is contained in:
parent
7ba945c995
commit
ef786e9864
1 changed files with 4 additions and 1 deletions
|
|
@ -204,7 +204,10 @@ class ChronosModel(nn.Module):
|
|||
super().__init__()
|
||||
self.config = config
|
||||
self.model = model
|
||||
self.device = model.device
|
||||
|
||||
@property
|
||||
def device(self):
|
||||
return self.model.device
|
||||
|
||||
def forward(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Reference in a new issue