Closed sidsidsidsid closed 4 years ago
Hi @sidsidsidsid, this is the correct place to ask questions regarding the quantum neural network fraud detection code. The code in this repository is used to generate the results shown in our paper "Continuous-variable quantum neural networks".
Ok thanks.
I'm getting an error when running the fraud_detection.py file
**Env****:
**** ERROR*****
Traceback (most recent call last):
File "fraud_detection.py", line 194, in
Hi @sidsidsidsid, you'll have to update to the latest version of Strawberry Fields (0.11). The current state of this repo has recently been updated to be compatible with that version (unfortunately, not backwards-compatible)
Note that you'll have to make sure your environment is also compatible with tensorflow 1.3
The settings changes worked. thanks.
Another issue. Colab times-out before the training is completed. Sometimes it goes beyond 13 hours. So I reduce the below "reps", tb_reps", and savr_reps" variables.
Has anybody ever attempted to run the code on Colab? Is there something I'm doing wrong?
*ENV:*** Colab !pip install strawberryfields==0.11.0 tensorflow==1.3.0 set to GPU
*VARIABLE CHANGED*** reps = 1000 ##############################30000 tb_reps = 10 ######################################100 savr_reps = 100 ##################################1000
****ERROR*** 2019-10-03 17:34:35.174945: 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. 2019-10-03 17:34:35.175022: 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. 2019-10-03 17:34:35.175051: 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. 2019-10-03 17:34:35.175068: 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. 2019-10-03 17:34:35.175078: 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.
@trbromley any advice here?
Hey @sidsidsidsid, it definitely takes a bit of compute power for training - to put into context we trained for a few hours running on 20 cores + 2 GPUs.
You'll probably want at least 10,000+ for the reps
value to get a decent quality of training. The best way to see how training is progressing is to view on TensorBoard.
The tb_reps
and savr_reps
are how often the code outputs to TensorBoard and how often it saves the model. Making these values too small will slow things down because more time will be spent outputting rather than in training.
We've never run the script on Colab, so you'd have to get into contact with them for support. One question, the errors you give - are you sure that they are not just warnings and that the code is still running?
@trbromley those errors are common from that version of TensorFlow. No cause for concern that the model is not training
@sidsidsidsid Those are just warnings as explained in this comment at the official tensorflow repo.
There is a similar codebase located in the below GIT link. People are leaving issues and someone mentioned the code was "leverage/stolen." Is this repo the correct location to ask questions and/or issues for the codebase? Should people move/copy their issues to this location? Any clarification would be appreciated? Thanks.
**similar codebase location: https://github.com/llSourcell/The-Neural-Qubit/issues