
fastai
追梦小狂魔
只要相信自己就没有什么不做不到
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
fastai最好模板
from pathlib import Path from fastai import * from fastai.vision import * import torch import os !pip install efficientnet-pytorch from efficientnet_pytorch import EfficientNet # for dirname, _, filenames in os.walk('/kaggle/input'): # for filename原创 2020-06-24 23:35:52 · 466 阅读 · 0 评论 -
最简单的cloab使用方法
挂载硬盘。两行就够了,没那么多花里胡哨的,第一次会出现个链接,点进去允许之后,会给一堆码,复制到程序空白光标哪里就行了。 from google.colab import drive drive.mount('/content/gdrive') 路径有点不一样,不是当前的路径,读取数据要改一下路径 程序是102fastai.ipynb,数据在同级目录下,但是要读取数据要用绝对路径 ...原创 2020-04-28 15:04:08 · 1696 阅读 · 0 评论 -
fastai的callback
callbacks = [ # callbacks.EarlyStoppingCallback(learn, min_delta=1e-5, patience=5), callbacks.SaveModelCallback(learn) ] learn.callbacks = callbacks 这个是最有用的配合这句 learn.load('bestmodel') 训练结束后...原创 2020-04-27 18:13:40 · 929 阅读 · 0 评论 -
fastai使用efficinentnet
!pip install efficientnet-pytorch from fastai import * from fastai.vision import * from efficientnet_pytorch import EfficientNet path = untar_data(URLs.PETS) path_anno = path/'annotations' path_img ...原创 2020-04-06 07:36:43 · 369 阅读 · 0 评论 -
超算平台使用fastai
对于这类平台环境都是配置好的,只是代码上传然后训练,和kaggle这种不一样,是py的不是ipynb所以代码稍微有点不同 建立一个sh文件 使用fast.vision时候会报错,要加上这句,主要是因为不支持可视化 mkdir -p /root/.config/matplotlib/ \ && echo "backend : Agg" > /root/.confi...原创 2020-04-03 11:10:39 · 445 阅读 · 0 评论 -
fastai使用本地预训练模型
try: os.makedirs('/root/.cache/torch/checkpoints') except: print(111) !cp /kaggle/input/resnet5019c8e357/resnet50-19c8e357.pth /root/.cache/torch/checkpoints/resnet50-19c8e357.pth原创 2020-04-01 20:12:34 · 988 阅读 · 0 评论 -
fastai训练自己的的数据
#%% # This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's ...原创 2020-03-31 17:57:17 · 673 阅读 · 0 评论 -
fastai数据增强
get_transforms( do_flip:bool=True, # 是否进行水平翻转 flip_vert:bool=False, #是否进行垂直翻转 max_rotate:float=10.0, max_zoom:float=1.1, max_lighting:float=0.2, max_warp:float=0.2, p_affine:float...原创 2020-03-29 09:43:15 · 526 阅读 · 0 评论