1. 磐创AI-开放猫官方网站首页
  2. 机器学习
  3. TensorFlow

在 TensorFlow 中使用预训练权重来进行高级网络定义

TensorNets

import tensorflow as tf
import tensornets as nets

inputs = tf.placeholder(tf.float32, [None, 224, 224, 3])
model = nets.ResNet50(inputs)

assert isinstance(model, tf.Tensor)

High level network definitions with pre-trained weights in TensorFlow (tested with >= 1.2.0).

Guiding principles

Applicability. Many people already have their own ML workflows, and want to put a new model on their workflows. TensorNets can be easily plugged together because it is designed as simple functional interfaces without custom classes.
Manageability. Models are written in tf.contrib.layers, which is lightweight like PyTorch and Keras, and allows for ease of accessibility to every weight and end-point. Also, it is easy to deploy and expand a collection of pre-processing and pre-trained weights.
Readability. With recent TensorFlow APIs, more factoring and less indenting can be possible. For example, all the inception variants are implemented as about 500 lines of code in TensorNets while 2000+ lines in official TensorFlow models.

项目地址:https://github.com/taehoonlee/tensornets

原创文章,作者:fendouai,如若转载,请注明出处:https://panchuang.net/2017/11/03/high-level-network-definitions-with-pre-trained-weights-in-tensorflow/

发表评论

登录后才能评论

联系我们

400-800-8888

在线咨询:点击这里给我发消息

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息