是否有类似的东西os.path.dirname(path),但在pathlib?
对我来说,caffe的主要优点之一是可以在自由分布的预训练模型上进行转移学习.
有没有地方可以从张量流格式的论文/竞赛中获得训练有素的模型?
如果没有,是否有可能将现有的caffe(或任何其他)模型转换为张量流模型?
machine-learning neural-network conv-neural-network tensorflow
我正在调整cifar10卷积示例到我的问题.我想将设计中的数据输入从一个文件一次一个地读取到一个设计,该设计在一个已经在内存中的图像集上运行.原始inputs()函数如下所示:
read_input = cifar10_input.read_cifar10(filename_queue)
reshaped_image = tf.cast(read_input.uint8image, tf.float32)
# Crop the central [height, width] of the image.
resized_image = tf.image.resize_image_with_crop_or_pad(reshaped_image,
width, height)
Run Code Online (Sandbox Code Playgroud)
在原始版本中,read_input是包含一个图像的张量.
我将所有图像保存在RAM中,所以不使用filename_queue,我有一个巨大的images_tensor = tf.constant(images),在哪里images_tensor.shape(东西,32,32,3).
我的问题非常基本:将一些函数(tf.image.resize_image_with_crop_or_pad在我的情况下)应用于所有元素的最佳方法是 images_tensor什么?
迭代在张量流中是有问题的,具有有限的切片(TensorFlow - 类似于numpy的张量索引).有没有一个解决方案只使用一个命令实现这一目标?