takotab / fastseq Goto Github PK
View Code? Open in Web Editor NEWA way to use N-Beats in fastai for sequence data
Home Page: https://takotab.github.io/fastseq/
License: Apache License 2.0
A way to use N-Beats in fastai for sequence data
Home Page: https://takotab.github.io/fastseq/
License: Apache License 2.0
Fastai v2 migrated to fastai repo. Maybe its because of that.
from fastseq.all import *
from fastseq.nbeats.model import *
from fastseq.nbeats.learner import *
from fastseq.nbeats.callbacks import *
AttributeError Traceback (most recent call last)
<ipython-input-7-0cd5cb15e59d> in <module>
----> 1 from fastseq.all import *
2 from fastseq.nbeats.model import *
3 from fastseq.nbeats.learner import *
4 from fastseq.nbeats.callbacks import *
~/Desktop/Badreturn Forecast/fastseq/fastseq/all.py in <module>
----> 1 from .data.all import *
2 from .metrics import *
3 from .core import *
~/Desktop/Badreturn Forecast/fastseq/fastseq/data/all.py in <module>
----> 1 from .external import *
2 from .core import *
3 from .load import *
~/Desktop/Badreturn Forecast/fastseq/fastseq/data/external.py in <module>
4
5 # Cell
----> 6 from ..core import *
7 from fastcore.utils import *
8 from fastcore.imports import *
~/Desktop/Badreturn Forecast/fastseq/fastseq/core.py in <module>
6 # Cell
7 from fastcore.all import *
----> 8 from fastai2.basics import *
9 import pandas as pd
10 import numpy as np
~/.virtualenvs/ML/lib/python3.6/site-packages/fastai2/basics.py in <module>
----> 1 from .data.all import *
2 from .optimizer import *
3 from .callback.core import *
4 from .learner import *
5 from .metrics import *
~/.virtualenvs/ML/lib/python3.6/site-packages/fastai2/data/all.py in <module>
3 from .load import *
4 from .external import *
----> 5 from .transforms import *
6 from .block import *
~/.virtualenvs/ML/lib/python3.6/site-packages/fastai2/data/transforms.py in <module>
228
229 # Cell
--> 230 class Categorize(DisplayedTransform):
231 "Reversible transform of category string to `vocab` id"
232 loss_func,order,store_attrs=CrossEntropyLossFlat(),1,'vocab,add_na'
~/.virtualenvs/ML/lib/python3.6/site-packages/fastai2/data/transforms.py in Categorize()
230 class Categorize(DisplayedTransform):
231 "Reversible transform of category string to `vocab` id"
--> 232 loss_func,order,store_attrs=CrossEntropyLossFlat(),1,'vocab,add_na'
233 def __init__(self, vocab=None, sort=True, add_na=False):
234 store_attr(self, self.store_attrs+',sort')
~/.virtualenvs/ML/lib/python3.6/site-packages/fastcore/logargs.py in _f(*args, **kwargs)
~/.virtualenvs/ML/lib/python3.6/site-packages/fastai2/layers.py in __init__(self, axis, *args, **kwargs)
304 y_int = True
305 @use_kwargs_dict(keep=True, weight=None, ignore_index=-100, reduction='mean')
--> 306 def __init__(self, *args, axis=-1, **kwargs): super().__init__(nn.CrossEntropyLoss, *args, axis=axis, **kwargs)
307 def decodes(self, x): return x.argmax(dim=self.axis)
308 def activation(self, x): return F.softmax(x, dim=self.axis)
~/.virtualenvs/ML/lib/python3.6/site-packages/fastcore/logargs.py in _f(*args, **kwargs)
~/.virtualenvs/ML/lib/python3.6/site-packages/fastai2/layers.py in __init__(self, loss_cls, axis, flatten, floatify, is_2d, *args, **kwargs)
279 activation=decodes=noops
280 def __init__(self, loss_cls, *args, axis=-1, flatten=True, floatify=False, is_2d=True, **kwargs):
--> 281 store_attr(self, "axis,flatten,floatify,is_2d")
282 self.func = loss_cls(*args,**kwargs)
283 functools.update_wrapper(self, self.func)
~/.virtualenvs/ML/lib/python3.6/site-packages/fastcore/utils.py in store_attr(names, self, but, **attrs)
100 return {k:getattr(o,k) for k in ks}
101
--> 102 # Cell
103 def properties(cls, *ps):
104 "Change attrs in `cls` with names in `ps` to properties"
AttributeError: 'str' object has no attribute '__stored_args__'
When executing NBeatsInterpretation.from_learner(learn)
the code throws an index error
IndexError: index 1188 is out of bounds for dimension 0 with size 1188
.
Is this argument doing anything? I cannot find its usage in the code.
Best!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.