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

  • 相关阅读:
    【转】wpa_supplicant与wpa_cli之间通信过程
    CSS Hack
    HTML5测试(二)
    HTML5测试(一)
    百分号编码(URL编码)
    DOM事件处理函数
    JS数组
    JS中for循环嵌套
    Codecombat 游戏攻略(计算机科学三)2
    Codecombat 游戏攻略(计算机科学三)
  • 原文地址:https://www.cnblogs.com/2008nmj/p/12960710.html
Copyright © 2011-2022 走看看