我正在尝试使用TensorFlow复制完全卷积网络(FCN)的语义分段结果.
我坚持将训练图像输入到计算图中.完全卷积网络使用VOC PASCAL数据集进行培训.但是,数据集中的训练图像具有不同的大小.
我只想询问他们是否预处理了训练图像,使它们具有相同的大小以及它们如何预处理图像.如果没有,他们只是将不同大小的批量图像送入FCN吗?是否可以将一批中不同尺寸的图像输入TensorFlow中的计算图?是否可以使用队列输入而不是占位符来做到这一点?
machine-learning computer-vision deep-learning caffe tensorflow
我有 Gremlin 和 Amazon Neptune 的后端服务。我想提供一个 GraphQL 端点来在 Neptune 中执行查询。我发现了一个可能有效的旧黑客马拉松项目。但是,我想知道是否有更好的方法来实现它。
这是我的代码,我的unordered_map和map的行为相同,并且执行时间相同.我是否遗漏了有关这些数据结构的内容?
更新:我已根据以下答案和评论更改了我的代码.我删除了字符串操作以减少分析中的影响.现在我只测量find(),它占用了我代码中近40%的CPU.该配置文件显示unordered_map快3倍,但有没有其他方法可以使这段代码更快?
#include <map>
#include <unordered_map>
#include <stdio.h>
struct Property {
int a;
};
int main() {
printf("Performance Summery:\n");
static const unsigned long num_iter = 999999;
std::unordered_map<int, Property > myumap;
for (int i = 0; i < 10000; i++) {
int ind = rand() % 1000;
Property p;
p.a = i;
myumap.insert(std::pair<int, Property> (ind, p));
}
clock_t tStart = clock();
for (int i = 0; i < num_iter; i++) {
int ind = rand() % 1000;
std::unordered_map<int, Property >::iterator itr …Run Code Online (Sandbox Code Playgroud) browser ×1
c++ ×1
caffe ×1
graphql ×1
gremlin ×1
heap-memory ×1
performance ×1
tensorflow ×1
tinkerpop3 ×1
unity-webgl ×1