tensorflowjs

tfjs-node-gpu not using GPU

泪湿孤枕 提交于 2021-01-29 05:15:04
问题 I am trying to use run ML code on GPU developed using the node package tfjs-node-gpu . When I try doing so the program is running but I am unable to see any process being added to the GPU. I suspect that my program is not using GPU for this reason. I have just installed the package and used in the code referring it. Is this the right way do I need to do anything more to make my TF node.js code run on GPU. I am seeing tthe below error before my code starts executing And the below is the GPU

tfjs-node-gpu not using GPU

假如想象 提交于 2021-01-29 05:10:30
问题 I am trying to use run ML code on GPU developed using the node package tfjs-node-gpu . When I try doing so the program is running but I am unable to see any process being added to the GPU. I suspect that my program is not using GPU for this reason. I have just installed the package and used in the code referring it. Is this the right way do I need to do anything more to make my TF node.js code run on GPU. I am seeing tthe below error before my code starts executing And the below is the GPU

Keras model doest not provide same results after converting into tensorflow-js model

霸气de小男生 提交于 2020-06-16 04:47:10
问题 Keras model performs as expected in python but after converting the model the results are different on the same data. I tried updating the keras and tensorflow-js version but still the same issue. Python code for testing: import keras import cv2 model = keras.models.load_model("keras_model.h5") img = cv2.imread("test_image.jpg") def preprocessing_img(img): img = cv2.resize(img, (50,50)) x = np.array(img) image = np.expand_dims(x, axis=0) return image/255 prediction_array= model.predict

Tensorflow vs Tensorflow JS different results for floating point arithmetic computations

若如初见. 提交于 2020-02-25 02:02:10
问题 I have converted a Tensorflow model to Tensorflow JS and tried using in the browser. There are some preprocessing steps which are to be executed on the inout before feeding it to the model for inference. I have implemented these steps same as the Tensorflow. The problem is the inference results are not same on TF JS in comparison with Tensorflow. So I have started debugging the code and found that the results from the floating point arithmetic operations in the preprocessing on TF JS are

Converting Python Keras NLP Model to Tensorflowjs

房东的猫 提交于 2019-12-24 19:19:50
问题 I'm trying to learn more about Tensorflowjs, but sadly I'm stuck getting my Keras NLP Model converted to Tensorflowjs. This is what I'm trying to convert: from keras.models import load_model from keras.preprocessing.sequence import pad_sequences import pickle list_classes = ["toxic", "severe_toxic", "obscene", "threat", "insult", "identity_hate"] model = load_model('Keras_Model/m.hdf5') with open('Keras_Model/tokenizer.pkl', 'rb') as handler: tokenizer = pickle.load(handler) list_sentences