Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'floatTensor' object has no attribute 'sum' #139

Open
handyzeng opened this issue Mar 25, 2021 · 2 comments
Open

AttributeError: 'floatTensor' object has no attribute 'sum' #139

handyzeng opened this issue Mar 25, 2021 · 2 comments

Comments

@handyzeng
Copy link


AttributeError Traceback (most recent call last)
in
1 knn = iris_knn()
----> 2 knn.fit()
3 knn.announce()

in fit(self, k)
22 for i in range(len(self.features)):
23 feature = dc.array(self.features[i])
---> 24 opinion_difference = dc.sqrt(dc.power(dc.sub(feature, self.query),2)).sum()
25 survey.append([opinion_difference, self.labels[i]])
26

/usr/local/lib/python3.6/dist-packages/deepC/dnnc.py in (self, name)
20866 for _s in [floatplaceHolder]:
20867 swig_getmethods.update(getattr(_s, 'swig_getmethods', {}))

20868 getattr = lambda self, name: _swig_getattr(self, floatTensor, name)
20869
20870 def init(self, *args):

/usr/local/lib/python3.6/dist-packages/deepC/dnnc.py in _swig_getattr(self, class_type, name)
78 if method:
79 return method(self)
---> 80 raise AttributeError("'%s' object has no attribute '%s'" % (class_type.name, name))
81
82

AttributeError: 'floatTensor' object has no attribute 'sum'

@github-actions
Copy link

Thank you so much for filing the issue. We will look at it and take appropriate action as soon as possible.' first issue

@srohit0
Copy link
Member

srohit0 commented Mar 27, 2021

Hi @handyzeng , can you please attach entire script to reproduce the issue, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants