1、tensorflow中padding = ‘same’ :核移动时 ,same就是填充0到成为满足整除的列数/行数,而valid则是丢弃直到满足整除
【注】只有当stride 为1时,padding = ‘same’才会保证图片输出大小和输入大小相同
TensorFlow中CNN的两种padding方式“SAME”和“VALID”
【TensorFlow】一文弄懂CNN中的padding参数
2、pytorch:报 “'tuple' object is not callable” 的错误------元组间没有打逗号
3、import skimage.transform as tf: skimage即是Scikit-Image
Py之skimage:Python库之skimage的简介、安装、使用方法之详细攻略
4、plt.imshow()不显示图像的问题:在后面加 plt.show()
plt.imshow()函数负责对图像进行处理,并显示其格式,而plt.show()则是将plt.imshow()处理后的函数显示出来。
5、占位符%d、%i 的区别:在python中没区别,是完全引用的c的用法,在c中,作为输出(printf)也无区别,但作为输入(scanf),%d接收有符号十进制数,%i默认十进制,也允许接收8进制和16进制
What is the difference between %i and %d in Python? [duplicate]
6、keras自动生成网络结构的图片
from keras.utils import plot_model
# from keras.utils.vis_utils import plot_model
from keras.utils.vis_utils import model_to_dot
from IPython.display import SVG, Image
# %matplotlib inline
## pip install GraphViz
# 方法1
plot_model(model, to_file='model.png', show_shapes=True, show_layer_names=True, rankdir='LB')
Image('model.png')
出错:Python决策树可视化:GraphViz's executables not found的解决方法
【】按上法可解决,但值得注意的是,按上操作后,重启电脑后解决的
可能还会出现的问题:Failed to import pydot. You must install pydot
7、python中,用format进行格式对齐,中文 会出现一些问题,可能中文字体不是等宽字体的缘故,\t 可以解决问题
print("{:>6} done".format(instruction))
print("{:>6}\tdone".format(instruction))
右对齐,由于是中文,还是有些问题:
8、jupyter notebook 无法运行 多进程 的程序(以下方法未实验,mark)
Jupyter notebook never finishes processing using multiprocessing (Python 3)
Python Jupyter notebook 运行 multiprocessing 跑不了的问题
https://blog.youkuaiyun.com/e274794140/article/details/87286190
9、记录conda,虚拟环境的一些问题