zoukankan      html  css  js  c++  java
  • Tensorflow 2.0之TF-slim

    TensorFlow-Slim image classification model library

    TF-slim is a new lightweight high-level API of TensorFlow (tensorflow.contrib.slim) for defining, training and evaluating complex models. This directory contains code for training and evaluating several widely used Convolutional Neural Network (CNN) image classification models using TF-slim. It contains scripts that will allow you to train models from scratch or fine-tune them from pre-trained network weights. It also contains code for downloading standard image datasets, converting them to TensorFlow's native TFRecord format and reading them in using TF-Slim's data reading and queueing utilities. You can easily train any model on any of these datasets, as we demonstrate below. We've also included a jupyter notebook, which provides working examples of how to use TF-Slim for image classification. For developing or modifying your own models, see also the main TF-Slim page.

    Tensorflow2.0变动之一就是弃用了tf.contrib。。

    但是有时候需要在tensorflow2.0里使用slim。

    那么这个问题该如何解决?

    https://github.com/tensorflow/models/issues/8020

     在tensorflow2.0中没有slim有什么替代方案吗?

     要在TF2中以兼容的模式使用,你需要把它当作一个包来安装。

    安装方式:

    1. Download Zip。然后,python setup.py install

    使用方法:

    跟原来有一点不同

    #import tensorflow as tf
    import tensorflow.compat.v1 as tf
    #from tensorflow.contrib.slim.nets import vgg
    import tf_slim as slim

  • 相关阅读:
    html5 canvas 像素随机百分之十显示
    html5 canvas防微博旋转
    html5 canvas 旋转扩大
    html5 canvas 钟表
    html5 canvas 移动小方块
    html5 canvas 鼠标绘制
    html5 拖放到购物车
    html5 拖拽
    js_sl 无缝切换
    HDU 2048 神、上帝以及老天爷( 错排 )
  • 原文地址:https://www.cnblogs.com/2008nmj/p/12960710.html
Copyright © 2011-2022 走看看