【报错及解决】TypeError: ‘numpy.ndarray‘ object is not callable
一、错误代码及解决def _shuffle_data(self):p = np.random.permutation(self._num_examples) #直接调用numoy的混排函数self._data = self._data(p)self._labels = self._labels(p)错误在于用了圆括号,应该改为方括号如下def _shuffle_data(self):p = np.
文章共242字 · 阅读需要大约1分钟
一键AI生成摘要,助你高效阅读
问答
·
一、错误代码及解决
def _shuffle_data(self):
p = np.random.permutation(self._num_examples) #直接调用numoy的混排函数
self._data = self._data(p)
self._labels = self._labels(p)
错误在于用了圆括号,应该改为方括号
如下
def _shuffle_data(self):
p = np.random.permutation(self._num_examples) #直接调用numoy的混排函数
self._data = self._data[p]
self._labels = self._labels[p]
更多推荐
已为社区贡献3条内容
所有评论(0)