在Tensorflow中背靠背粘贴两个灰色图像

时间:2016-09-24 16:39:04

标签: tensorflow deep-learning

我有两个灰色图像,我希望沿着第三维背靠背地粘贴这两个图像并形成 WxHx2 图像。然后标记生成的图像并将其提供给Tensorflow框架以进行训练。我怎么能这样做? 感谢

1 个答案:

答案 0 :(得分:2)

将image1和image2重塑为形状(H,W,1)并执行

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title></title> <script src="lib/ionic/js/ionic.bundle.js"></script> <!-- cordova script (this will be a 404 during development) --> <script src="cordova.js"></script> <script src="lib/ngCordova/dist/ng-cordova.js"></script> <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above <link href="css/ionic.app.css" rel="stylesheet"> --> <link href="lib/ionic/css/ionic.css" rel="stylesheet"> <style type="text/css"> .platform-ios .manual-ios-statusbar-padding{ padding-top:20px; } .manual-remove-top-padding{ padding-top:0px; } .manual-remove-top-padding .scroll{ padding-top:0px !important; } ion-list.manual-list-fullwidth div.list, .list.card.manual-card-fullwidth { margin-left:-10px; margin-right:-10px; } ion-list.manual-list-fullwidth div.list > .item, .list.card.manual-card-fullwidth > .item { border-radius:0px; border-left:0px; border-right: 0px; } </style> <script src="js/app.js"></script> <script src="js/controllers.js"></script> <script src="js/routes.js"></script> <script src="js/directives.js"></script> <script src="js/services.js"></script> <!-- Only required for Tab projects w/ pages in multiple tabs <script src="lib/ionicuirouter/ionicUIRouter.js"></script> --> </head> <body ng-app="app" animation="slide-left-right-ios7"> <div> <div> <ion-nav-bar class="bar-stable"> <ion-nav-back-button></ion-nav-back-button> </ion-nav-bar> <ion-nav-view></ion-nav-view> </div> </div> </body> </html>

使x具有形状(H,W,2),您可以将其作为输入馈入任何张量流。