conv_utils.py:82: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
return np.copy(kernel[slices])
warning不影响编程~强迫症看着难受,解决方法有两种,一种是忽略,一种是按操作来
第一种:
import warnings
warnings.filterwarnings("ignore")
第二种:警告中硕 use `arr[tuple(seq)]` instead of `arr[seq]`.
故把 return np.copy(kernel[slices])
改为 return np.copy(kernel[tuple(slices)]) 即可
参考:https://blog.youkuaiyun.com/huoyongliang/article/details/83145913
https://blog.youkuaiyun.com/qq_41185868/article/details/88104556