1. 程式人生 > >RAM程式碼檢視

RAM程式碼檢視

batch_size 設定成16都不行,設定成12,通關, 

Loading data info ...
There are 5198 words in the dataset, the max length of sentence is 79, and the max length of aspect is 23
Loading training data and testing data ...
Read 3602 sentences from data/restaurant/train.xml
Read 1120 sentences from data/restaurant/test.xml
Loading pre-trained word vectors ...
There are 4773 words in vocabulary and 425 words out of vocabulary
2018-11-18 15:29:12.889238: 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.
2018-11-18 15:29:12.889261: 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.
2018-11-18 15:29:12.889269: 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.
2018-11-18 15:29:12.889275: 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.
2018-11-18 15:29:12.889280: 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.
2018-11-18 15:29:13.048014: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 0 with properties: 
name: GeForce GTX 1080 Ti
major: 6 minor: 1 memoryClockRate (GHz) 1.683
pciBusID 0000:05:00.0
Total memory: 10.91GiB
Free memory: 10.34GiB
2018-11-18 15:29:13.185196: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0x560b0fba6950 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2018-11-18 15:29:13.186023: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 1 with properties: 
name: GeForce GTX 1080 Ti
major: 6 minor: 1 memoryClockRate (GHz) 1.683
pciBusID 0000:06:00.0
Total memory: 10.92GiB
Free memory: 10.76GiB
2018-11-18 15:29:13.333307: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0x560b119529b0 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2018-11-18 15:29:13.334034: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 2 with properties: 
name: GeForce GTX 1080 Ti
major: 6 minor: 1 memoryClockRate (GHz) 1.683
pciBusID 0000:09:00.0
Total memory: 10.92GiB
Free memory: 10.76GiB
2018-11-18 15:29:13.464372: W tensorflow/stream_executor/cuda/cuda_driver.cc:523] A non-primary context 0x560b139d4740 exists before initializing the StreamExecutor. We haven't verified StreamExecutor works with that.
2018-11-18 15:29:13.469591: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 3 with properties: 
name: GeForce GTX 1080 Ti
major: 6 minor: 1 memoryClockRate (GHz) 1.683
pciBusID 0000:0a:00.0
Total memory: 10.92GiB
Free memory: 230.44MiB
2018-11-18 15:29:13.473336: I tensorflow/core/common_runtime/gpu/gpu_device.cc:976] DMA: 0 1 2 3 
2018-11-18 15:29:13.473348: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 0:   Y Y Y Y 
2018-11-18 15:29:13.473354: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 1:   Y Y Y Y 
2018-11-18 15:29:13.473360: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 2:   Y Y Y Y 
2018-11-18 15:29:13.473364: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 3:   Y Y Y Y 
2018-11-18 15:29:13.473377: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:05:00.0)
2018-11-18 15:29:13.473385: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GeForce GTX 1080 Ti, pci bus id: 0000:06:00.0)
2018-11-18 15:29:13.473390: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:2) -> (device: 2, name: GeForce GTX 1080 Ti, pci bus id: 0000:09:00.0)
2018-11-18 15:29:13.473395: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:3) -> (device: 3, name: GeForce GTX 1080 Ti, pci bus id: 0000:0a:00.0)
Training ...
epoch 0: train-loss=0.796382; train-acc=0.749306; test-loss=0.602343; test-acc=0.756250;
epoch 1: train-loss=0.643785; train-acc=0.771238; test-loss=0.643374; test-acc=0.764286;
epoch 2: train-loss=0.583054; train-acc=0.837868; test-loss=0.541152; test-acc=0.770536;
epoch 3: train-loss=0.518181; train-acc=0.832315; test-loss=0.567063; test-acc=0.769643;
epoch 4: train-loss=0.473143; train-acc=0.882288; test-loss=0.578648; test-acc=0.794643;
epoch 5: train-loss=0.407287; train-acc=0.903665; test-loss=0.716639; test-acc=0.775000;
epoch 6: train-loss=0.377654; train-acc=0.914492; test-loss=0.585076; test-acc=0.783929;
epoch 7: train-loss=0.354912; train-acc=0.931149; test-loss=0.707790; test-acc=0.778571;
epoch 8: train-loss=0.336231; train-acc=0.943920; test-loss=0.622447; test-acc=0.801786;
epoch 9: train-loss=0.313766; train-acc=0.934758; test-loss=0.691464; test-acc=0.791071;
epoch 10: train-loss=0.296201; train-acc=0.946974; test-loss=0.719078; test-acc=0.784821;
epoch 11: train-loss=0.281839; train-acc=0.948640; test-loss=0.690462; test-acc=0.800893;
epoch 12: train-loss=0.273839; train-acc=0.948640; test-loss=0.735819; test-acc=0.787500;
epoch 13: train-loss=0.271513; train-acc=0.953082; test-loss=0.652578; test-acc=0.784821;
epoch 14: train-loss=0.255246; train-acc=0.956135; test-loss=0.812470; test-acc=0.769643;
The max accuracy of testing results is 0.8017857142857143 of step 8
Analyzing ...
Traceback (most recent call last):
  File "main.py", line 45, in <module>
    tf.app.run()
  File "/home/qtt/anaconda2/envs/my_tensorflow/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "main.py", line 41, in main
    model.run(train_data, test_data)
  File "/home/qtt/ft/RAM-master/model.py", line 269, in run
    self.analysis(train_data, 'train')
  File "/home/qtt/ft/RAM-master/model.py", line 241, in analysis
    with open('analysis/' + tag + '_' + str(self.timestamp) + '.txt', 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'analysis/train_1542526153.txt'