zoukankan      html  css  js  c++  java
  • 学习曲线可视化

    一、ubuntu中数据训练

    1、数据下载

    ./data/cifar10/get_cifar10.sh

    2、格式转换

    ./examples/cifar10/create_cifar10.sh

    3、cifar10_quick_solver.prototxt修改为cpu模式,cifar10_quick_solver_lr1.prototxt改为cpu模式

    4、运行

    ./examples/cifar10/train_quick.sh >& cifar10.log &

    5、将train及test的loss保存

    cat cifar10.log | grep "Train net output" | awk '{print $11}' >& cifar10_train.log
    cat cifar10.log | grep "Test net output #1" | awk '{print $11}' >& cifar10_test.log

    二、windows下可视化

    6、将cifar10_train.log、cifar10_test.log拷贝到caffe/matlab目录下,

    7、cifar10_show_loss_curve.m

    clear;
    clc;
    close all;
    train_interval = 100;
    test_interval = 500;
     
    train_loss = textread('cifar10_train.log', '%f');
    n = 1:length(train_loss);
    idx_train = (n-1)*train_interval;
    test_loss = textread('cifar10_test.log', '%f');
    m = 1:length(test_loss);
    idx_test = (m-1)*test_interval;
    figure; plot(idx_train, train_loss);
    hold on;
    plot(idx_test, test_loss);
     
    grid on;
    legend('Train Loss', 'Test Loss');
    xlabel('iterations');
    ylabel('loss');
    title('Train & Test Loss Curve');

    Image

    三、用处

    83432880188DE9D1B91957C4A68DAB32

  • 相关阅读:
    常用jquery
    常用记录
    mysql proxy 读写分离
    Linux 学习笔记
    php 1116
    php 1115
    php 1110
    php 1109
    php 1108
    php 1105
  • 原文地址:https://www.cnblogs.com/smbx-ztbz/p/9357455.html
Copyright © 2011-2022 走看看