Ich wollte Tensorflow model von DCGAN (eine Art künstliches neuronales Netzwerk) testen.Berechtigung verweigert beim Versuch, eine Datei mit Python zu öffnen
Zuerst habe ich das mnist
-Dataset heruntergeladen und alle extrahiert, und ich legte die extrahierten Dateien in den Ordner data
. So das Datenverzeichnis ist wie folgt:
{data}->{mnist}->{t10k-images-idx3-ubyte(folder), t10k-labels-idx1-ubyte(folder), train-images-idx3-ubyte(folder), train-labels-idx1-ubyte(folder)}
und in diesen Ordnern gibt es die zugehörige mnist
Binärdatei.
So danach wollte ich mit dem Befehl das Modell testen:
python main.py --dataset mnist --input_height=28 --output_height=28
Allerdings habe ich diesen Fehler erhalte:
{'batch_size':
64, 'beta1': 0.5, 'checkpoint_dir': 'checkpoint', 'crop': False, 'dataset': 'mnist', 'epoch': 25, 'input_fname_pattern': '*.jpg', 'input_height': 28, 'input_width': None, 'learning_rate': 0.0002, 'output_height': 28, 'output_width': None, 'sample_dir': 'samples', 'train': False, 'train_size': inf, 'visualize': False} 2017-05-19 06:39:26.142508: W c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow li brary wasn't compiled to use SSE instructions, but these are available on your m achine and could speed up CPU computations. 2017-05-19 06:39:26.142773: W c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow li brary wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-19 06:39:26.142990: W c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow li brary wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-19 06:39:26.143212: W c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow li brary wasn't compiled to use SSE4.1 instructions, but these are available on you r machine and could speed up CPU computations. 2017-05-19 06:39:26.143558: W c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow li brary wasn't compiled to use SSE4.2 instructions, but these are available on you r machine and could speed up CPU computations. 2017-05-19 06:39:26.143833: W c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow li brary wasn't compiled to use AVX instructions, but these are available on your m achine and could speed up CPU computations. 2017-05-19 06:39:26.144102: W c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow li brary wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-19 06:39:26.144438: W c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow li brary wasn't compiled to use FMA instructions, but these are available on your m achine and could speed up CPU computations. 2017-05-19 06:39:26.219026: I c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:887] Found device 0 with properties: name: GeForce 820M major: 2 minor: 1 memoryClockRate (GHz) 1.25 pciBusID 0000:03:00.0 Total memory: 2.00GiB Free memory: 1.94GiB 2017-05-19 06:39:26.219532: I c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:908] DMA: 0 2017-05-19 06:39:26.219721: I c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:918] 0: Y 2017-05-19 06:39:26.219874: I c:\tf_jenkins\home\workspace\release-win\device\gp u\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:950] Ignoring visi ble gpu device (device: 0, name: GeForce 820M, pci bus id: 0000:03:00.0) with Cu da compute capability 2.1. The minimum required Cuda capability is 3.0. Traceback (most recent call last): File "main.py", line 97, in tf.app.run() File "C:\Users\vafaee\Miniconda2\envs\tensorflow35\lib\site-packages\tensorflo w\python\platform\app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 61, in main sample_dir=FLAGS.sample_dir) File "C:\Users\vafaee\Documents\DCGAN-tensorflow-master\DCGAN-tensorflow-maste r\model.py", line 74, in init self.data_X, self.data_y = self.load_mnist() File "C:\Users\vafaee\Documents\DCGAN-tensorflow-master\DCGAN-tensorflow-maste r\model.py", line 467, in load_mnist fd = open(os.path.join(data_dir,'train-images-idx3-ubyte')) PermissionError: [Errno 13] Permission denied: './data\mnist\train-images-idx3 -ubyte'
ich die Eingabeaufforderung als Administrator leite aber es didn arbeite nicht.
Ich habe auch die Erlaubnis mit einem Rechtsklick auf den Ordner/Datei überprüft und auf die Registerkarte "Sicherheit" gehen und die Berechtigung prüfen. Alles schien in Ordnung zu sein.
Bis jetzt war ich nicht in der Lage, es zu lösen, indem ich nach vorherigen Fragen suchte.
Ich benutze Windows 8 und ich führe den Code über eine Coda-Umgebung.
Ich freue mich über jede Hilfe in Bezug auf dieses Problem.
Ich würde sagen, dass Sie ein Backinglash-Problem haben:' ./data\mnist\train-images-idx3 -ubyte' zumindest für die Tabellierung char. –
sotrrry Ich habe es nicht verstanden. Kannst du bitte mehr erklären? @jea – Kadaj13
Entschuldigung, ich habe nicht sehr gut verstanden. Können Sie bitte mehr erklären? @ Jean-FrancoisFabre – Kadaj13