Title: The method create(float[][][][]) is undefined for the type Tensor (tensorflow-core-api version 0.3) · Issue #258 · tensorflow/java · GitHub
Open Graph Title: The method create(float[][][][]) is undefined for the type Tensor (tensorflow-core-api version 0.3) · Issue #258 · tensorflow/java
X Title: The method create(float[][][][]) is undefined for the type Tensor (tensorflow-core-api version 0.3) · Issue #258 · tensorflow/java
Description: I am trying to convert an image to Tensor. For that first I convert the buffered image to float[][][][] array as below. File inputImage = new File(inputName); BufferedImage bufferedImage = ImageIO.read(inputImage); int imgHeight = buffer...
Open Graph Description: I am trying to convert an image to Tensor. For that first I convert the buffered image to float[][][][] array as below. File inputImage = new File(inputName); BufferedImage bufferedImage = ImageIO....
X Description: I am trying to convert an image to Tensor. For that first I convert the buffered image to float[][][][] array as below. File inputImage = new File(inputName); BufferedImage bufferedImage = ImageIO....
Opengraph URL: https://github.com/tensorflow/java/issues/258
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The method create(float[][][][]) is undefined for the type Tensor (tensorflow-core-api version 0.3)","articleBody":"I am trying to convert an image to Tensor. For that first I convert the buffered image to float[][][][] array as below.\r\n`File inputImage = new File(inputName);\r\n BufferedImage bufferedImage = ImageIO.read(inputImage);\r\n int imgHeight = bufferedImage.getHeight();\r\n int imgWidth = bufferedImage.getWidth();\r\n int numberOfChannels = bufferedImage.getTransparency();\r\n float[][][][] floatImage = new float[1][imgHeight][imgWidth][numberOfChannels];\r\n for(int i = 0; i \u003c imgHeight; i++) {\r\n \tfor(int j = 0; j \u003c imgWidth; j++) {\r\n \t\tfor(int k = 0; k \u003c numberOfChannels; k++) {\r\n \t\t\tfloatImage[0][i][j][k] = (float) (bufferedImage.getData().getSample(i, j, k)/255.0);\r\n \t\t}\r\n \t}\r\n }`\r\nThen, I try to convert the float array to Tensor using `Tensor inputTensor = Tensor.create(floatImage)`.\r\n\r\nIs there a way to convert an buffered image to Tensor? I am using ´tensorflow-core-api´ version ´0.3´.\r\n\r\nNote: Converting the buffered as above takes longer, maybe there is a faster way to do it in Java.","author":{"url":"https://github.com/micosacak","@type":"Person","name":"micosacak"},"datePublished":"2021-03-29T22:49:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/258/java/issues/258"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:606362a4-bb44-93bf-3a7b-49acf8a769fe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AF0E:1254A9:BD695B:105E848:696A884B |
| html-safe-nonce | 1df3e1dd8c8b0e9a722a1c57beb44c0032c016da08120935aa6505957a9dffcf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjBFOjEyNTRBOTpCRDY5NUI6MTA1RTg0ODo2OTZBODg0QiIsInZpc2l0b3JfaWQiOiI2ODQzNTE1NjUzMjk0MDMyOTcxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b4265a5a39827f308955092ae0bb8455974bd82d53ba469cdb79f88874678070 |
| hovercard-subject-tag | issue:843886314 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/tensorflow/java/258/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8a1d6472176e59d1fd91a689966fc84e71b557e4a252a9679cf9baa3f55c2251/tensorflow/java/issues/258 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8a1d6472176e59d1fd91a689966fc84e71b557e4a252a9679cf9baa3f55c2251/tensorflow/java/issues/258 |
| og:image:alt | I am trying to convert an image to Tensor. For that first I convert the buffered image to float[][][][] array as below. File inputImage = new File(inputName); BufferedImage bufferedImage = ImageIO.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | micosacak |
| hostname | github.com |
| expected-hostname | github.com |
| None | d2aa6dedd7d97fa651b17c40401f2605f309df5ca5fb659bf0554cf34f1de825 |
| turbo-cache-control | no-preview |
| go-import | github.com/tensorflow/java git https://github.com/tensorflow/java.git |
| octolytics-dimension-user_id | 15658638 |
| octolytics-dimension-user_login | tensorflow |
| octolytics-dimension-repository_id | 207384523 |
| octolytics-dimension-repository_nwo | tensorflow/java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 207384523 |
| octolytics-dimension-repository_network_root_nwo | tensorflow/java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c1dbca8981c5e3d6a69bce2f1d289e732b86241d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width