H2K804 / CycleGAN-medical-image-segmentation

Implementation of CycleGAN for unsupervised image segmentaion, performed on brain tumor scans
46 stars 13 forks source link

'CycleGan' object has no attribute 'sess' #4

Closed ekuama closed 5 years ago

ekuama commented 5 years ago

I tried running the main file and this is what I get

python main.py --dataset_dir=med_image 2019-09-10 10:58:14.024749: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2019-09-10 10:58:14.285142: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties: name: GeForce RTX 2080 major: 7 minor: 5 memoryClockRate(GHz): 1.845 pciBusID: 0000:01:00.0 totalMemory: 8.00GiB freeMemory: 6.55GiB 2019-09-10 10:58:14.296075: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0 2019-09-10 10:58:14.820728: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] Device interconnect StreamExecutor with strength 1 edge matrix: 2019-09-10 10:58:14.827506: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0 2019-09-10 10:58:14.832097: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1003] 0: N 2019-09-10 10:58:14.837148: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6282 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080, pci bus id: 0000:01:00.0, compute c apability: 7.5) Traceback (most recent call last): File "main.py", line 60, in tf.compat.v1.app.run() File "C:\Users\user\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "main.py", line 54, in main model = CycleGan(sess=sess, args=args) File "C:\Users\user\Google Drive\CycleGAN-medical-image-segmentation-master\model.py", line 15, in init self.writer = tf.compat.v1.summary.FileWriter("./logs", self.sess.graph) AttributeError: 'CycleGan' object has no attribute 'sess'