【Bug解决】VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences
用Meta-Dataset做训练,由于数据采样方式的问题导致numpyarray的维度不一致,但不影响训练。
·
问题描述
VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences
(which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated.
If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
episode_classes_rel = self._rng.choice(self.span_leaves_rel)
用 Meta-Dataset 做训练,由于数据采样方式的问题导致 numpy array 的维度不一致,但不影响训练。
解决方法
在程序开头加上这句话,关掉 warning 即可:
np.warnings.filterwarnings('ignore', category=np.VisibleDeprecationWarning)
更多推荐
所有评论(0)