Hey everyone,
I was hoping if I could have some help on that, I am currently following this tutorial: fastai - Image sequences.
And I am having two problems, earlier (I didn’t change any code) there weren’t any issue except when I got training the model I got an accuracy that hovered at 14% interestingly enough, it seemed pretty random as well. Like it would randomly jump between some value at 14, 2x and 3x but always the same values. So I started writing this to ask questions about that.
But now, after resetting the google colab notebook the instantiation of SimpleModel is simply failing, this is the error I get:
AttributeError Traceback (most recent call last)
<ipython-input-67-6a33c7af38d8> in <cell line: 1>()
----> 1 model = SimpleModel().cuda()
2 frames
/usr/local/lib/python3.10/dist-packages/fastcore/meta.py in __call__(cls, *args, **kwargs)
38 if type(res)==cls:
39 if hasattr(res,'__pre_init__'): res.__pre_init__(*args,**kwargs)
---> 40 res.__init__(*args,**kwargs)
41 if hasattr(res,'__post_init__'): res.__post_init__(*args,**kwargs)
42 return res
<ipython-input-65-c2ca9f5b5a37> in __init__(self, arch, n_out)
1 class SimpleModel(Module):
2 def __init__(self, arch= resnet34(), n_out=4):
----> 3 self.encoder = TimeDistributed(create_body(728, pretrained=True))
4 self.head = TimeDistributed(create_head(1024, n_out))
5
/usr/local/lib/python3.10/dist-packages/fastai/vision/learner.py in create_body(model, n_in, pretrained, cut)
81 _update_first_layer(model, n_in, pretrained)
82 if cut is None:
---> 83 ll = list(enumerate(model.children()))
84 cut = next(i for i,o in reversed(ll) if has_pool_type(o))
85 return cut_model(model, cut)
AttributeError: 'int' object has no attribute 'children'
I have a dataset with sequences of length 400 which while quite bigger than the tutorials one isn’t something that sounds impossible.
Any help would be hugely appreciated, for now I think there’s likely something wrong (or rather the way I am transforming the signals into images) but yeah. Thank you for reading this.