tensorflow

TensorFlow model serving on Google AI Platform online prediction too slow with instance batches

∥☆過路亽.° 提交于 2020-12-12 02:52:56
问题 I'm trying to deploy a TensorFlow model to Google AI Platform for Online Prediction. I'm having latency and throughput issues . The model runs on my machine in less than 1 second (with only an Intel Core I7 4790K CPU) for a single image. I deployed it to AI Platform on a machine with 8 cores and an NVIDIA T4 GPU. When running the model on AI Platform on the mentioned configuration, it takes a little less than a second when sending only one image. If I start sending many requests, each with

AttributeError: 'str' object has no attribute 'dim' in pytorch

流过昼夜 提交于 2020-12-12 02:06:59
问题 I got the following error output in the PyTorch when sent model predictions into the model. Does anyone know what's going on? Following are the architecture model that I created, in the error output, it shows the issue exists in the x = self.fc1(cls_hs) line. class BERT_Arch(nn.Module): def __init__(self, bert): super(BERT_Arch, self).__init__() self.bert = bert # dropout layer self.dropout = nn.Dropout(0.1) # relu activation function self.relu = nn.ReLU() # dense layer 1 self.fc1 = nn.Linear

AttributeError: 'str' object has no attribute 'dim' in pytorch

孤街浪徒 提交于 2020-12-12 02:06:16
问题 I got the following error output in the PyTorch when sent model predictions into the model. Does anyone know what's going on? Following are the architecture model that I created, in the error output, it shows the issue exists in the x = self.fc1(cls_hs) line. class BERT_Arch(nn.Module): def __init__(self, bert): super(BERT_Arch, self).__init__() self.bert = bert # dropout layer self.dropout = nn.Dropout(0.1) # relu activation function self.relu = nn.ReLU() # dense layer 1 self.fc1 = nn.Linear

AttributeError: 'str' object has no attribute 'dim' in pytorch

痞子三分冷 提交于 2020-12-12 02:06:03
问题 I got the following error output in the PyTorch when sent model predictions into the model. Does anyone know what's going on? Following are the architecture model that I created, in the error output, it shows the issue exists in the x = self.fc1(cls_hs) line. class BERT_Arch(nn.Module): def __init__(self, bert): super(BERT_Arch, self).__init__() self.bert = bert # dropout layer self.dropout = nn.Dropout(0.1) # relu activation function self.relu = nn.ReLU() # dense layer 1 self.fc1 = nn.Linear

【12月8日更新】如何入门 TensorFlow ? “开发者出道计划”第一期话题精华内容汇总

和自甴很熟 提交于 2020-12-12 01:55:49
大家好! “TensorFlow 开发者出道计划” 第一期正在火热展开中!在11月-1月,出道计划第一期围绕“如何入门 TensorFlow”,社区内上线了超级多的实用技术干货,更重磅邀请来自 CSDN 的百大热门技术博主倾囊分享成长心得。在社区的问答版块,关于 TensorFlow 的讨论也在实时火热进行中! 为了帮助开发者伙伴更方便检索到这些优质内容,小编特地整理了本篇精华帖,为大家收录优质内容的链接直通车,帮助大家一步到位 get 到自己想要看的好内容!本篇精华帖将持续更新,建议你动动手指把它收录到自己的“收藏夹”,随时查阅哦! 特邀 社区作者 分享学习成长心路历程 & 技巧!(持续更新中) 我是管小亮: 《关于 TensorFlow 入坑那些事儿》 文章提要: 新手入门 TensorFlow,如何学习?如何高效、快速地学习?CSDN 百万粉丝博客专家@我是管小亮 畅谈经验和见解,为你打开通向新世界的大门! 希望像上面的作者一样,让您的个人洞见、项目实践被更多社区开发者看到,欢迎 点击这里 了解更多。 在 社区问答版块 也有了不少开发者关心的内容得到了热烈的 回复 ,看看是否也有你所关心的话题: 问题1: 从零接触 TensorFlow,我该选择1.0还是2.0版本? 是不是感受到了这些优质回答确实有帮您解答了在入门 TensorFlow 遇到的一些学习瓶颈或是实操问题

Keras predict gives different error than evaluate, loss different from metrics

こ雲淡風輕ζ 提交于 2020-12-11 15:53:51
问题 I have the following problem: I have an autoencoder in Keras, and train it for a few epochs. The training overview shows a validation MAE of 0.0422 and an MSE of 0.0024. However, if I then call network.predict and manually calculate the validation errors, I get 0.035 and 0.0024. One would assume that my manual calculation of the MAE is simply incorrect, but the weird thing is that if I use an identity model (simply outputs what you input) and use that to evaluate the predicted values, the

Keras predict gives different error than evaluate, loss different from metrics

谁说胖子不能爱 提交于 2020-12-11 15:52:02
问题 I have the following problem: I have an autoencoder in Keras, and train it for a few epochs. The training overview shows a validation MAE of 0.0422 and an MSE of 0.0024. However, if I then call network.predict and manually calculate the validation errors, I get 0.035 and 0.0024. One would assume that my manual calculation of the MAE is simply incorrect, but the weird thing is that if I use an identity model (simply outputs what you input) and use that to evaluate the predicted values, the

ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray). in trying to predict tesla stock

♀尐吖头ヾ 提交于 2020-12-11 08:51:23
问题 In the end you can see that i have tried converting this into a numpy array but I don't understand why tensorflow dosen't support it? I have looked at the other related pages but none seemed to help. Is there some other format i have to do to the data in order to properly fit in model? this is what keras says: x Vector, matrix, or array of training data (or list if the model has multiple inputs). If all inputs in the model are named, you can also pass a list mapping input names to data. x can

ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray). in trying to predict tesla stock

左心房为你撑大大i 提交于 2020-12-11 08:47:04
问题 In the end you can see that i have tried converting this into a numpy array but I don't understand why tensorflow dosen't support it? I have looked at the other related pages but none seemed to help. Is there some other format i have to do to the data in order to properly fit in model? this is what keras says: x Vector, matrix, or array of training data (or list if the model has multiple inputs). If all inputs in the model are named, you can also pass a list mapping input names to data. x can

How to predict new data with a trained neural network (Tensorflow 2.0, regression analysis)?

我的梦境 提交于 2020-12-11 05:17:49
问题 I am new to machine learning and using Tensorflow. I have trained a neural network for regression following the tutorial on the Tensorflow website. I have 3 input columns and 2 output columns which I have marked as "labels". The network seemingly predicts data fine when using testing data, but when I try to predict data outside the testing and training set, by importing a file with 3 input columns only, it gives me an error saying "expected dense_input to have shape (5,) but got array with