Open bhanu-sharma opened 7 years ago
~/Desktop/multi-class-text-classification-cnn/trained_model_1509570669/checkpoints$ ls checkpoint model-1000.meta model-1200.meta model-1400.meta model-600.meta model-800.meta model-1000.data-00000-of-00001 model-1200.data-00000-of-00001 model-1400.data-00000-of-00001 model-600.data-00000-of-00001 model-800.data-00000-of-00001 model-1000.index model-1200.index model-1400.index model-600.index model-800.index ~/Desktop/multi-class-text-classification-cnn/trained_model_1509570669/checkpoints$ ls ../../trained_model_1479757124/
Got a trained_model_1509570669 folder.
~/Desktop/multi-class-text-classification-cnn$ python3 predict.py ./trained_model_1509570669/ ./data/small_samples.json CRITICAL:root:Loaded the trained model: /home/ai-admin/Desktop/multi-class-text-classification-cnn/trained_model_1509570669/checkpoints/model-1400 INFO:root:The number of x_test: 1000 INFO:root:The number of y_test: 1000 2017-11-01 21:30:05.576209: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2017-11-01 21:30:05.576240: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2017-11-01 21:30:05.576247: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-11-01 21:30:05.576258: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017-11-01 21:30:05.576268: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations. NVIDIA: no NVIDIA devices found 2017-11-01 21:30:05.585781: E tensorflow/stream_executor/cuda/cuda_driver.cc:406] failed call to cuInit: CUDA_ERROR_UNKNOWN 2017-11-01 21:30:05.585827: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:145] kernel driver does not appear to be running on this host: /proc/driver/nvidia/version does not exist INFO:tensorflow:Restoring parameters from /home/ai-admin/Desktop/multi-class-text-classification-cnn/trained_model_1509570669/checkpoints/model-1400 INFO:tensorflow:Restoring parameters from /home/ai-admin/Desktop/multi-class-text-classification-cnn/trained_model_1509570669/checkpoints/model-1400 CRITICAL:root:The accuracy is: 0.741
Thank you. Though i saved the model as a ckpt file and to call the model ran these commands
saver = tf.train.import_meta_graph(checkpoint_dir + 'checkpoints/generator.ckpt.meta')
saver.restore(sess, tf.train.latest_checkpoint(checkpoint_dir + 'checkpoints'))
The prediction script worked for me then.
You can now close the issue if you like, it's resolved from my side.
Both the model and the checkpoints exist in the same directory. This is the error i encounter when i try to run the file.