AI-RESEARCHER-2024 commited on
Commit
e9976a8
·
verified ·
1 Parent(s): 4a824b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -9,9 +9,12 @@ import pennylane as qml
9
  cnn_model = tf.keras.models.load_model('noq_c_model.h5')
10
  qcnn_model = tf.keras.models.load_model('q_model.h5')
11
 
12
- # Define the quanvolutional layer as per CNN_QCNN.ipynb
13
  n_layers = 3 # Number of quantum layers
14
  dev = qml.device("default.qubit", wires=2)
 
 
 
15
  rand_params = np.random.uniform(high=2 * np.pi, size=(n_layers, 2, 2))
16
 
17
  @qml.qnode(dev)
 
9
  cnn_model = tf.keras.models.load_model('noq_c_model.h5')
10
  qcnn_model = tf.keras.models.load_model('q_model.h5')
11
 
12
+ # Define the quanvolutional layer
13
  n_layers = 3 # Number of quantum layers
14
  dev = qml.device("default.qubit", wires=2)
15
+
16
+ # Set random number seed
17
+ np.random.seed(0)
18
  rand_params = np.random.uniform(high=2 * np.pi, size=(n_layers, 2, 2))
19
 
20
  @qml.qnode(dev)