// Convenience wrapper around predict for models with
// single tensor outputs of shape (1, 1, 1),
// typically used for regression or binary classification.
// Returns this one activation value.
float_type predict_single_output(const tensor5s& inputs) const
{
const tensor5s outputs = predict(inputs);
internal::assertion(outputs.size() == 1,
"invalid number of outputs");
const auto output_shape = outputs.front().shape();
internal::assertion(output_shape.volume() == 1,
"invalid output shape");
return outputs.front().get(0, 0, 0, 0, 0);
}

convert tensor5 datatype to std::vector

const std::vector<float> result_vec = *result.front().as_vector();

最新文章

  1. 生成任意长度的随机数 JS
  2. 轻松掌握:JavaScript观察者模式
  3. firefox 插件 URLRedirector 审核通过
  4. JS总结
  5. Html登录表单阻止自动填充
  6. svn没有对号等符号的问题
  7. java中获取文件或文件夹的路径方法
  8. 不支持一个 STA 线程上针对多个句柄的 WaitAll
  9. Java中List、Set和Map的区别--转载
  10. 新花生壳内网版2.3 + Tomcat7 搭建自己的网站(2015.01.21)
  11. 黑色遮罩引导蒙版 CSS实现方式
  12. YYCache 源码分析(一)
  13. ArcGIS多面体(multipatch)解析(一)
  14. Python学习之--socket续集
  15. gdb不知为何显示2次析构
  16. python操作Excel、openpyxl 之图表,折线图、饼图、柱状图等
  17. 定时任务Crontab
  18. 配置zsh
  19. opencv 学习资料
  20. 「WC 2019」数树

热门文章

  1. AMD - Learning JavaScript Design Patterns [Book] - O&#39;Reilly
  2. progress组件(进度条)
  3. 【转】gl_NormalMatrix
  4. ORA-00346,借助_allow_resetlogs_corruption开库
  5. int 和 字节 相互转换
  6. Using Groovy To Import XML Into MongoDB
  7. python写一个查询接口
  8. KETTLE——(一)资源库
  9. Java8的I/O整理
  10. [19/05/06-星期一] JDBC(Java DataBase Connectivity,java数据库连接)_基本知识