
Keras
xyhhhhhhhha
码农
展开
-
Keras显存不足报错
今天运行了一个从GitHub上面下载的代码,奈何自己的渣渣电脑显存不够大,然后就报错了 Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info. 然后感觉到是自己笔记本显存不够的问题,于是将fit函数中的batch_size调小即可 ...原创 2021-01-07 15:37:17 · 851 阅读 · 0 评论 -
keras关于model的小总结
进来看了看keras, 比tf友好的多啊,总结下: Keras有两种类型的模型,顺序模型(Sequential)和泛型模型(Model) 首先比较简单的顺序型 Sequential模型接口 代码示例 model = Sequential() model.add(Dense(32, input_shape=(500,))) model.add(Dense(10, activation='softmax')) model.compile(optimizer='rmsprop', loss='cate转载 2021-01-06 21:43:43 · 1040 阅读 · 0 评论