{"id":50226,"date":"2018-04-27T09:21:43","date_gmt":"2018-04-27T00:21:43","guid":{"rendered":"https:\/\/www.sejuku.net\/blog\/?p=50226"},"modified":"2024-05-06T11:46:50","modified_gmt":"2024-05-06T02:46:50","slug":"%e3%80%90tensorflow%e3%80%91tensorflow%e3%82%92%e3%81%99%e3%82%89%e3%82%8a%e3%81%a8%e4%bd%bf%e3%81%86tf-slim%e3%81%a8%e3%81%af","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/50226","title":{"rendered":"\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f"},"content":{"rendered":"<p><span style=\"color: #339966;\"><strong>TensorFlow<\/strong><\/span>\u306e\u4e2d\u306b\u3001<span style=\"color: #339966;\"><strong>TensorFlow-Slim\uff08tf.contrib.slim\u3002\u4ee5\u964d\u3001TF-Slim\uff09<\/strong><\/span>\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u3054\u5b58\u77e5\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001TF-Slim\u3092\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7591\u554f\u306b\u7b54\u3048\u307e\u3059\u3002<\/p>\n<ul>\n<li><span style=\"color: #ff0000;\"><strong>TensorFlow\u3060\u3051\u3067\u624b\u4e00\u676f\u306a\u306e\u306bTF-Slim\u3082\u52c9\u5f37\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\uff1f<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000;\"><strong>TensorFlow\u3092\u4f7f\u308f\u305a\u306bTF-Slim\u3092\u4f7f\u3046\u3053\u3068\u306b\u306a\u308b\u306e\uff1f<\/strong><\/span><\/li>\n<li><span style=\"color: #ff0000;\"><strong>\u300c<a href=\"https:\/\/github.com\/tensorflow\/tensorflow\/tree\/r1.7\/tensorflow\/contrib\/slim\" target=\"_blank\" rel=\"noopener\">TensorFlow-Slim<\/a>\u300d\u3092\u8aad\u3082\u3046\u3068\u601d\u3063\u305f\u3051\u3069\u9577\u304f\u3066\u632b\u6298\u3057\u305d\u3046\u3002\u3082\u3063\u3068\u7c21\u5358\u306b\u8aac\u660e\u3067\u304d\u306a\u3044\u306e\uff1f<\/strong><\/span><\/li>\n<\/ul>\n<p>\u3067\u306f\u3001\u884c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<h2>TF-Slim\u3068\u306f<\/h2>\n<p><span style=\"color: #339966;\"><strong>TF-Slim<\/strong><\/span>\u306f\u3001<span style=\"color: #339966;\"><strong>TensorFlow<\/strong><\/span>\u306e\u30e9\u30c3\u30d1\u30fc\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/p>\n<p>TF-Slim\u306e\u5927\u304d\u306a\u76ee\u7684\u306f\u3001\u300c<a href=\"https:\/\/github.com\/tensorflow\/tensorflow\/tree\/r1.7\/tensorflow\/contrib\/slim\" target=\"_blank\" rel=\"noopener\">TensorFlow-Slim<\/a>\u300d\u306e\u300cWhy TF-Slim?\u300d\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u3068\u304a\u308a4\u3064\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u8a18\u4e8b\u3067\u306f\u4ee5\u4e0b\u306e\u70b9\u306b\u6ce8\u76ee\u3057\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li><span style=\"color: #0000ff;\"><strong>TensorFlow\u3088\u308a\u3082\u5c11\u306a\u3044\u6587\u5b57\u6570\u3067\u30e2\u30c7\u30eb\u3092\u5b9a\u7fa9\u3059\u308b<\/strong><\/span><\/li>\n<\/ul>\n<p>\u6587\u5b57\u6570\u304c\u5c11\u306a\u3051\u308c\u3070\u3001\u8003\u3048\u308b\u3053\u3068\u3082\u5c11\u306a\u304f\u306a\u308a\u3001\u9593\u9055\u3044\u3082\u5c11\u306a\u304f\u306a\u308b\u3053\u3068\u304c\u671f\u5f85\u3067\u304d\u308b\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u3002<\/p>\n<h3>TF-Slim\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1f<\/h3>\n<p>TF-Slim\u306f\u3001TensorFlow\u3068\u4e00\u7dd2\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>TF-Slim\u3092\u4f7f\u3044\u59cb\u3081\u308b\u3068\u304d\u306b\u3001\u3042\u3089\u305f\u3081\u3066\u4f55\u304b\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001\u30e2\u30c7\u30eb\u3092\u5b9a\u7fa9\u3059\u308b\u3068\u304d\u306e\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u3001\u5909\u6570\u306e\u5b9a\u7fa9\u3001\u30ec\u30a4\u30e4\u30fc\u306e\u5b9a\u7fa9\u3001\u30b9\u30b3\u30fc\u30d7\u306e\u5b9a\u7fa9\u306e3\u3064\u306b\u5206\u3051\u3066\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u5909\u6570\u306e\u5b9a\u7fa9<\/h2>\n<p>TensorFlow\u3067\u306f\u3001<span style=\"color: #339966;\"><strong>tf.Variable()<\/strong><\/span>\u3084<span style=\"color: #339966;\"><strong>tf.get_variable()<\/strong><\/span>\u3092\u4f7f\u3063\u3066\u5909\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e00\u65b9\u3001TF-Slim\u3092\u4f7f\u3046\u3068\u304d\u306f\u3001<span style=\"color: #339966;\"><strong>slim.model_variable()<\/strong><\/span>\u3001\u307e\u305f\u306f<span style=\"color: #339966;\"><strong>slim.variable()<\/strong><\/span>\u3092\u4f7f\u3063\u3066\u5909\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001slim.model_variable()\u306f\u3001\u5b9a\u7fa9\u3057\u305f\u5909\u6570\u3092<span style=\"color: #339966;\"><strong>tf.GraphKeys.MODEL_VARIABLES\u30b3\u30ec\u30af\u30b7\u30e7\u30f3<\/strong><\/span>\u306b\u8ffd\u52a0\u3057\u3066\u304b\u3089\u3001slim.variable()\u3092\u5b9f\u884c\u3059\u308b\u4ed5\u7d44\u307f\u306b\u306a\u3063\u3066\u3044\u308b\u3060\u3051\u3067\u3001\u307b\u304b\u306b\u9055\u3044\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001tf.get_variable()\u3068\u3001slim.model_variable()\u3092\u6bd4\u3079\u306a\u304c\u3089\u3001\u5909\u6570\u306e\u5b9a\u7fa9\u65b9\u6cd5\u306e\u9055\u3044\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>TF-Slim\u3092\u4f7f\u308f\u306a\u3044\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u5909\u6570\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \" >my_variable = tf.get_variable(&quot;my_var_tf&quot;, [10, 10, 3, 3])<\/pre>\n<p>TF-Slim\u3092\u4f7f\u3046\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"decode:true \" >my_variable_slim = slim.model_variable(&quot;my_var_slim&quot;, [10, 10, 3, 3])<\/pre>\n<p>\u6b8b\u5ff5\u306a\u304c\u3089TF-Slim\u306e\u307b\u3046\u304c\u3061\u3087\u3063\u3068\u9577\u304f\u306a\u3063\u3066\u3044\u3066\u3001\u3042\u307e\u308a\u9055\u3044\u304c\u306a\u3044\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u30012\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u5165\u308a\u53e3\u90e8\u5206\u3060\u3051\u3067\u3059\u304c\u3001\u3056\u3063\u304f\u308a\u898b\u6bd4\u3079\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"decode:true \" >def get_variable(name,\r\n                 shape=None,\r\n                 dtype=None,\r\n                 initializer=None,\r\n                 regularizer=None,\r\n                 trainable=True,\r\n                 collections=None,\r\n                 caching_device=None,\r\n                 partitioner=None,\r\n                 validate_shape=True, # \uff083\uff09model_variable()\u3067\u306f\u6307\u5b9a\u3067\u304d\u306a\u3044\r\n                 use_resource=None,\r\n                 custom_getter=None,\r\n                 constraint=None # \uff083\uff09model_variable()\u3067\u306f\u6307\u5b9a\u3067\u304d\u306a\u3044\r\n):<\/pre>\n<pre class=\"decode:true \" >def model_variable(name,\r\n                 shape=None,\r\n                 dtype=dtypes.float32, # \uff081\uff09get_variable()\u3067\u306fNone\r\n                 initializer=None,\r\n                 regularizer=None,\r\n                 trainable=True,\r\n                 collections=None,\r\n                 caching_device=None,\r\n                 device=None, # \uff082\uff09get_variable()\u3067\u306f\u6307\u5b9a\u3067\u304d\u306a\u3044\r\n                 partitioner=None,\r\n                 custom_getter=None,\r\n                 use_resource=None\r\n):<\/pre>\n<p>\u4e0a\u306b\u3082\u66f8\u304d\u307e\u3057\u305f\u304c\u3001\uff081\uff09\uff5e\uff083\uff09\u306e3\u70b9\u304c\u9055\u3046\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\uff081\uff09model_variable()\u306f\u3001<span style=\"color: #339966;\"><strong>dtype<\/strong><\/span>\u306e\u521d\u671f\u5024\u304cdtypes.float32\u306b\u306a\u3063\u3066\u3044\u308b<\/p>\n<p>\u3053\u308c\u306f\u3001dtypes.float32\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u304b\u3089\u3001\u521d\u671f\u5024\u3092None\u2192dtypes.float32\u306b\u5909\u66f4\u3057\u3066\u3001<span style=\"color: #0000ff;\"><strong>1\u6587\u5b57\u3067\u3082\u5c11\u306a\u304f\u3057\u3088\u3046\u3068\u3044\u3046\u72d9\u3044<\/strong><\/span>\u304c\u3042\u308a\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\uff082\uff09model_variable()\u306f\u3001<span style=\"color: #339966;\"><strong>device<\/strong><\/span>\u304c\u6307\u5b9a\u3067\u304d\u308b<\/p>\n<p>device\u306f\u3001\u5909\u6570\u3092\u914d\u7f6e\u3059\u308b\u30c7\u30d0\u30a4\u30b9\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306e\u5f15\u6570\u3067\u3059\u3002<\/p>\n<p>TensorFlow\u3060\u3051\u3067\u3001\u5909\u6570\u3092\u914d\u7f6e\u3059\u308b\u30c7\u30d0\u30a4\u30b9\u3092\u6307\u5b9a\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \" >with tf.device(&quot;\/gpu:1&quot;):\r\n  my_variable_tf_gpu1 = tf.get_variable(&quot;my_var_tf_gpu1&quot;, [10, 10, 3, 3])<\/pre>\n<p>TF-Slim\u3092\u4f7f\u3046\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \" >my_variable_slim_gpu1 = slim.model_variable(&quot;my_var_slim_gpu1&quot;, [10, 10, 3, 3], device=&quot;\/gpu:1&quot;)<\/pre>\n<p>TF-Slim\u306e\u66f8\u304d\u304b\u305f\u306e\u65b9\u304c\u8aad\u307f\u3084\u3059\u3044\u304b\u306a\u3001\u3068\u3044\u3046\u7a0b\u5ea6\u306e\u9055\u3044\u3067\u3059\u304c\u3001<span style=\"color: #0000ff;\"><strong>\u3053\u306e\u3088\u3046\u306a\u4e9b\u7d30\u306a\u9055\u3044\u3082\u5927\u4e8b\u306b\u3057\u3066\u3044\u308b<\/strong><\/span>\u306e\u3067\u3059\u3002<\/p>\n<p>\uff083\uff09model_variable()\u306f\u3001<span style=\"color: #339966;\"><strong>validate_shape<\/strong><\/span>\u3001<span style=\"color: #339966;\"><strong>constraint<\/strong><\/span>\u304c\u6307\u5b9a\u3067\u304d\u306a\u3044<\/p>\n<p>validate_shape\u306f\u3001\u6a19\u6e96\u306fTrue\u306a\u306e\u3067\u3059\u304c\u3001False\u306b\u3059\u308b\u3068shape\u306e\u5927\u304d\u3055\u3092\u30c1\u30a7\u30c3\u30af\u3057\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5f53\u7136\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\u3001<span style=\"color: #0000ff;\"><strong>\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u305b\u3093\u3002<\/strong><\/span><\/p>\n<p>constraint\u306b\u306f\u3001\u5236\u7d04\u95a2\u6570\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002\u5236\u7d04\u95a2\u6570\u306f\u3001TensorFlow\u306e\u5b66\u7fd2\u6642\u306b\u5909\u6570\u306e\u5024\u3092\u66f4\u65b0\u3057\u305f\u5f8c\u306b\u9069\u7528\u3055\u308c\u308b\u95a2\u6570\u3067\u3001\u5909\u6570\u306e\u7bc4\u56f2\u3092\u5236\u9650\u3059\u308b\u3068\u304d\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001asynchronous distributed training\u3092\u884c\u3046\u3068\u304d\u306f\u3001\u5236\u7d04\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u306e\u306f\u554f\u984c\u304c\u3042\u308b\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>TF-Slim\u3067constraint\u3092\u6307\u5b9a\u3067\u304d\u306a\u3044\u306e\u306f\u3001<span style=\"color: #0000ff;\"><strong>\u5236\u7d04\u95a2\u6570\u3092\u4f7f\u308f\u306a\u3044\u3053\u3068\u3092\u6a19\u6e96\u3068\u3059\u308b\u305f\u3081<\/strong><\/span>\u306a\u306e\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u30012\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u306f\u9055\u3044\u304c\u3042\u308b\u3053\u3068\u306f\u308f\u304b\u308a\u307e\u3057\u305f\u306d\u3002<\/p>\n<p>\u901a\u5e38\u4f7f\u7528\u3059\u308b\u7bc4\u56f2\u3067\u306f\u3001\u5c11\u3057\u306e\u9055\u3044\u3067\u3059\u304c\u3001\u305d\u306e<span style=\"color: #0000ff;\"><strong>\u5c11\u3057\u306e\u9055\u3044\u3082\u5927\u4e8b\u306b\u3057\u3088\u3046<\/strong><\/span>\u3068\u3044\u3046\u306e\u304cTF-Slim\u306a\u306e\u3067\u3059\u3002<\/p>\n<h2>\u30ec\u30a4\u30e4\u30fc\u306e\u5b9a\u7fa9<\/h2>\n<p>\u30ec\u30a4\u30e4\u30fc\u306e\u5b9a\u7fa9\u3067\u306f\u3001TF-Slim\u3092\u4f7f\u3046\u3068\u975e\u5e38\u306b\u77ed\u304f\u66f8\u3051\u307e\u3059\u3002<\/p>\n<h3>\u7573\u307f\u8fbc\u307f\u5c64<\/h3>\n<p>\u307e\u305a\u306f\u3001TF-Slim\u3092\u4f7f\u308f\u306a\u3044\u3067<span style=\"color: #339966;\"><strong>\u7573\u307f\u8fbc\u307f\u5c64<\/strong><\/span>\u3092\u5b9a\u7fa9\u3059\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"decode:true \" >W_conv1 = tf.Variable(tf.truncated_normal([5, 5, 1, 32], stddev=0.1))\r\nb_conv1 = tf.Variable(tf.constant(0.1, shape=[32]))\r\nh_conv1 = tf.nn.relu(conv2d(x_image, W_conv1) + b_conv1)<\/pre>\n<p>TF-Slim\u3092\u4f7f\u3046\u3068\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002<\/p>\n<pre class=\"decode:true \" >h_conv1_slim = slim.conv2d(x_image, 32, [5, 5])<\/pre>\n<p>\u91cd\u307f\u3084\u30d0\u30a4\u30a2\u30b9\u306e\u5b9a\u7fa9\u304c<span style=\"color: #0000ff;\"><strong>\u975e\u5e38\u306b\u77ed\u304f\u306a\u3063\u3066\u3044\u307e\u3059<\/strong><\/span>\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001slim.conv2d()\u306e\u6a19\u6e96\u306e\u6d3b\u6027\u5316\u95a2\u6570\u304ctf.nn.relu()\u306b\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001<span style=\"color: #0000ff;\"><strong>\u6d3b\u6027\u5316\u95a2\u6570\u306e\u6307\u5b9a\u3082\u7701\u7565\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/strong><\/span><\/p>\n<h3>\u30d7\u30fc\u30ea\u30f3\u30b0\u5c64<\/h3>\n<p>\u6b21\u306f\u3001TF-Slim\u3092\u4f7f\u308f\u306a\u3044\u3067<span style=\"color: #339966;\"><strong>\u30d7\u30fc\u30ea\u30f3\u30b0\u5c64<\/strong><\/span>\u3092\u5b9a\u7fa9\u3059\u308b\u30b3\u30fc\u30c9\u3002<\/p>\n<pre class=\"decode:true \" >tf.nn.max_pool(h_conv1, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME')<\/pre>\n<p>TF-Slim\u3092\u4f7f\u3046\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \" >h_pool1_slim = slim.max_pool2d(h_conv1_slim, [2, 2])<\/pre>\n<p>ksize\u3084strides\u3067\u6307\u5b9a\u3059\u308b<span style=\"color: #0000ff;\"><strong>[1, 2, 2, 1]\u3092\u3001[2, 2]\u306b\u3067\u304d\u3066\u3044\u307e\u3059\u306d\u3002<\/strong><\/span><\/p>\n<h3>\u5168\u7d50\u5408\u5c64<\/h3>\n<p>\u305d\u3057\u3066\u3001TF-Slim\u3092\u4f7f\u308f\u306a\u3044\u3067<span style=\"color: #339966;\"><strong>\u5168\u7d50\u5408\u5c64<\/strong><\/span>\u3092\u5b9a\u7fa9\u3059\u308b\u30b3\u30fc\u30c9\u3002<\/p>\n<pre class=\"decode:true \" >h_pool2_flat = tf.reshape(h_pool2, [-1, 7*7*64])\r\n\r\nW_fc1 = tf.Variable(tf.truncated_normal([7 * 7 * 64, 1024], stddev=0.1))\r\nb_fc1 = tf.Variable(tf.constant(0.1, shape=[1024]))\r\nh_fc1 = tf.nn.relu(tf.matmul(h_pool2_flat, W_fc1) + b_fc1)<\/pre>\n<p>TF-Slim\u3092\u4f7f\u3046\u3068\u2026<\/p>\n<pre class=\"decode:true \" >h_pool2_flat_slim = slim.flatten(h_pool2_slim)\r\nh_fc1_slim = slim.fully_connected(h_pool2_flat_slim, 1024)<\/pre>\n<p>\u660e\u3089\u304b\u306b\u77ed\u304f\u3001\u8003\u3048\u308b\u3053\u3068\u304c\u6e1b\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u30c9\u30ed\u30c3\u30d7\u30a2\u30a6\u30c8\u5c64<\/h3>\n<p>\u7d9a\u3044\u3066\u3001TF-Slim\u3092\u4f7f\u308f\u306a\u3044\u3067<span style=\"color: #339966;\"><strong>\u30c9\u30ed\u30c3\u30d7\u30a2\u30a6\u30c8\u5c64<\/strong><\/span>\u3092\u5b9a\u7fa9\u3059\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<p>\u3053\u3053\u306f\u307b\u3068\u3093\u3069\u5909\u308f\u308a\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"decode:true \" >keep_prob = tf.placeholder(tf.float32)\r\nh_fc1_drop = tf.nn.dropout(h_fc1_slim, keep_prob)<\/pre>\n<p>TF-Slim\u3092\u4f7f\u3046\u3068\u2026<\/p>\n<pre class=\"decode:true \" >keep_prob = tf.placeholder(tf.float32)\r\nh_fc1_drop_slim = slim.dropout(h_fc1_slim, keep_prob)<\/pre>\n<h3>\u51fa\u529b\u5c64<\/h3>\n<p>\u6700\u5f8c\u306b\u3001<span style=\"color: #339966;\"><strong>\u51fa\u529b\u5c64<\/strong><\/span>\u3092\u5b9a\u7fa9\u3059\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"decode:true \" >W_fc2 = tf.Variable(tf.truncated_normal([1024, 10], stddev=0.1))\r\nb_fc2 = tf.Variable(tf.constant(0.1, shape=[10]))\r\n\r\ny_conv = tf.matmul(h_fc1_drop, W_fc2) + b_fc2<\/pre>\n<p>TF-Slim\u3092\u4f7f\u3046\u3068\u3001\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002<\/p>\n<pre class=\"decode:true \" >y_conv = slim.fully_connected(h_fc1_drop_slim, 10, activation_fn=None)<\/pre>\n<p>\u5168\u7d50\u5408\u5c64\u3068\u540c\u3058\u3088\u3046\u306b\u77ed\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001\u30ec\u30a4\u30e4\u30fc\u306e\u5b9a\u7fa9\u3067\u306f\u3001TF-Slim\u306e\u307b\u3046\u304c\u77ed\u3044\u30b3\u30fc\u30c9\u3067\u5b9a\u7fa9\u3067\u304d\u308b\u306e\u3067\u3059\u3002<\/p>\n<h2>\u65b0\u3057\u3044\u30b9\u30b3\u30fc\u30d7<\/h2>\n<p>TF-Slim\u3067\u306f\u3001<span style=\"color: #339966;\"><strong>arg_scope<\/strong><\/span>\u3068\u3044\u3046\u30b9\u30b3\u30fc\u30d7\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>arg_scope\u306f\u3001\u8907\u6570\u306e\u30ec\u30a4\u30e4\u30fc\u3092\u5b9a\u7fa9\u3059\u308b\u3068\u304d\u306b\u3001\u6307\u5b9a\u3059\u308b\u5f15\u6570\uff08argument\uff09\u304c\u540c\u3058\u3053\u3068\u304c\u591a\u3044\u305f\u3081\u3001<span style=\"color: #0000ff;\"><strong>\u7e70\u308a\u8fd4\u3057\u3066\u8a18\u8f09\u3059\u308b\u624b\u9593\u3092\u7701\u304f<\/strong><\/span>\u305f\u3081\u306b\u3001\u7528\u610f\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u306f\u4f55\u3088\u308a\u3001\u30b3\u30fc\u30c9\u3092\u898b\u305f\u65b9\u304c\u5206\u304b\u308a\u3084\u3059\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3059\u3067\u306b\u3001slim.conv2d()\u3092\u4f7f\u3063\u3066\u30013\u5c64\u306e\u7573\u307f\u8fbc\u307f\u5c64\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<p>3\u5c64\u3068\u3082<span style=\"color: #339966;\"><strong>weights_initializer<\/strong><\/span>\u3084<span style=\"color: #339966;\"><strong>weights_regularizer<\/strong><\/span>\u306b<span style=\"color: #ff0000;\"><strong>\u540c\u3058\u5185\u5bb9\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b<\/strong><\/span>\u3053\u3068\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"decode:true \" >net = slim.conv2d(inputs, 64, [11, 11], 4, padding='SAME',\r\n                  weights_initializer=tf.truncated_normal_initializer(stddev=0.01),\r\n                  weights_regularizer=slim.l2_regularizer(0.0005), scope='conv1')\r\nnet = slim.conv2d(net, 128, [11, 11], padding='VALID',\r\n                  weights_initializer=tf.truncated_normal_initializer(stddev=0.01),\r\n                  weights_regularizer=slim.l2_regularizer(0.0005), scope='conv2')\r\nnet = slim.conv2d(net, 256, [11, 11], padding='SAME',\r\n                  weights_initializer=tf.truncated_normal_initializer(stddev=0.01),\r\n                  weights_regularizer=slim.l2_regularizer(0.0005), scope='conv3')<\/pre>\n<p>TF-Slim\u306earg_scope\u3092\u4f7f\u3046\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"decode:true \" >with slim.arg_scope([slim.conv2d], padding='SAME',\r\n                    weights_initializer=tf.truncated_normal_initializer(stddev=0.01)\r\n                    weights_regularizer=slim.l2_regularizer(0.0005)):\r\n  net = slim.conv2d(inputs, 64, [11, 11], scope='conv1')\r\n  net = slim.conv2d(net, 128, [11, 11], padding='VALID', scope='conv2')\r\n  net = slim.conv2d(net, 256, [11, 11], scope='conv3')<\/pre>\n<p>slim.arg_scope()\u3067\u3001weights_initializer\u3084weights_regularizer\u3092\u6307\u5b9a\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001with slim.arg_scope():\u306e\u4e2d\u3067\u30ec\u30a4\u30e4\u30fc\u3092\u5b9a\u7fa9\u3059\u308b\u3068\u304d\u306b\u3001<span style=\"color: #0000ff;\"><strong>\u6a19\u6e96\u306e\u5f15\u6570\u3092\u4e0a\u66f8\u304d\u3059\u308b\u3088\u3046\u306a\u30a4\u30e1\u30fc\u30b8<\/strong><\/span>\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\u5143\u306e\u30b3\u30fc\u30c9\u3068\u3086\u3063\u304f\u308a\u898b\u6bd4\u3079\u308c\u3070\u3001\u3059\u3093\u306a\u308a\u7406\u89e3\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306f\u3001TF-Slim\u306e\u57fa\u672c\u7684\u306a\u8003\u3048\u65b9\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001<span style=\"color: #0000ff;\"><strong>\u30b3\u30fc\u30c9\u306e\u6587\u5b57\u6570\u304c\u5c11\u306a\u304f\u306a\u308b\u4f8b<\/strong><\/span>\u3068\u3057\u3066\u3001\u5909\u6570\u306e\u5b9a\u7fa9\u65b9\u6cd5\u3068\u30ec\u30a4\u30e4\u30fc\u306e\u5b9a\u7fa9\u65b9\u6cd5\u3001\u305d\u308c\u304b\u3089\u3001\u65b0\u3057\u3044arg_scope\u3068\u3044\u3046\u4ed5\u7d44\u307f\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>TensorFlow\u3068TF-Slim\u306f\u89aa\u548c\u6027\u304c\u975e\u5e38\u306b\u9ad8\u3044\u306e\u3067\u3001\u305f\u3068\u3048\u3070<span style=\"color: #0000ff;\"><strong>\u7573\u307f\u8fbc\u307f\u5c64\u3060\u3051\u3092TF-Slim\u3067\u66f8\u304d\u66ff\u3048\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p>\u5c11\u3057\u305a\u3064\u66f8\u304d\u66ff\u3048\u3066\u307f\u3066\u7406\u89e3\u3092\u6df1\u3081\u3066\u3082\u3044\u3044\u3067\u3059\u3057\u3001\u5168\u90e8\u3092\u66f8\u304d\u66ff\u3048\u308b\u306e\u3082\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u597d\u307f\u306e\u30da\u30fc\u30b9\u3067TF-Slim\u306b\u3082\u6311\u6226\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TensorFlow\u306e\u4e2d\u306b\u3001TensorFlow-Slim\uff08tf.contrib.slim\u3002\u4ee5\u964d\u3001TF-Slim\uff09\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u3054\u5b58\u77e5\u3067\u3057\u3087\u3046\u304b\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001TF-Slim\u3092\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u3001\u4ee5\u4e0b\u306e [&hellip;]<\/p>\n","protected":false},"author":16433,"featured_media":50287,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[1],"tags":[1071],"class_list":["post-50226","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-others","tag-tensorflow"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/50226\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/50226\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-27T00:21:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:46:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/04\/tensor-slim1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226\"},\"author\":{\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\"},\"headline\":\"\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f\",\"datePublished\":\"2018-04-27T00:21:43+00:00\",\"dateModified\":\"2024-05-06T02:46:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226\"},\"wordCount\":144,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/tensor-slim1.jpg\",\"keywords\":[\"tensorflow\"],\"articleSection\":[\"\u305d\u306e\u4ed6\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226\",\"name\":\"\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/tensor-slim1.jpg\",\"datePublished\":\"2018-04-27T00:21:43+00:00\",\"dateModified\":\"2024-05-06T02:46:50+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/tensor-slim1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/tensor-slim1.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/50226#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\",\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\"},\"description\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-tech\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/50226","og_locale":"ja_JP","og_type":"article","og_title":"\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/50226","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_published_time":"2018-04-27T00:21:43+00:00","article_modified_time":"2024-05-06T02:46:50+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/04\/tensor-slim1.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/50226#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/50226"},"author":{"name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095"},"headline":"\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f","datePublished":"2018-04-27T00:21:43+00:00","dateModified":"2024-05-06T02:46:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/50226"},"wordCount":144,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/50226#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/04\/tensor-slim1.jpg","keywords":["tensorflow"],"articleSection":["\u305d\u306e\u4ed6"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/50226","url":"https:\/\/www.sejuku.net\/blog\/50226","name":"\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/50226#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/50226#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/04\/tensor-slim1.jpg","datePublished":"2018-04-27T00:21:43+00:00","dateModified":"2024-05-06T02:46:50+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/50226#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/50226"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/50226#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/04\/tensor-slim1.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2018\/04\/tensor-slim1.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/50226#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010TensorFlow\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u7c21\u6f54\u306b\u66f8\u3051\u308bTF-Slim\u3068\u306f"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095","name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","caption":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8"},"description":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002","url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-tech"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/50226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/16433"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=50226"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/50226\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/50287"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=50226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=50226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=50226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}