Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Tensorflow and import #43

Open
Raahul153712 opened this issue Aug 5, 2022 · 1 comment
Open

Issue with Tensorflow and import #43

Raahul153712 opened this issue Aug 5, 2022 · 1 comment

Comments

@Raahul153712
Copy link

So, I decided to use Google Colab for my interface of choice for my project. I have opted to upgrade to Colab Pro to see if it will benefit me. I am runing this whole network on the GPU.

My error is the KeyError shown at the very end of this message. I have put the contents of the EEGmodels.py file in the code block right before my imports block. And my imports block contains the following code. Sometimes I have an AttributeError, but once I pip install deepexplain it turns into a KeyError.

import numpy as np
import mne
import mneflow
import tensorflow as tf
# Disable eager execution
tf.compat.v1.disable_eager_execution()
from tensorflow.keras.models import Model
from tensorflow.keras import backend as K
from tensorflow.keras import utils as np_utils
from tensorflow.keras.callbacks import ModelCheckpoint
from tensorflow.python.keras import backend as K
import sklearn
import pandas as pd
import os
import pyriemann
import matplotlib
from deepexplain.tensorflow import DeepExplain
from google.colab import drive

# Make numpy values easier to read.
np.set_printoptions(precision=3, suppress=True)
from tensorflow.keras import layers

Every time I exit out of the notebook and I start it back up again I have to reinstall some of the packages that were not natively installed in google Collab (this includes mne, mneflow, pyriemann, and deepexplain). So, I re-installed “ deepexplain” out of habit via GitHub. At first it was giving me a “KeyError” and (when I search for the error) I was told upgrade TensorFlow.

I’ve upgraded TensorFlow and restarted my runtime. I’m running on the GPU with the standard ram option.

This is the error:
image

@okbalefthanded
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants