Comments (10)
yesππ" import keras " best solution!!β€β€
from srgan-tensorflow.
You need to add "import keras" in lib/ops.py
from srgan-tensorflow.
@nickhdfan, did you managed to solve this? I'm having the same problem. Supposably only tensorflow was needed.
from srgan-tensorflow.
Add the following to ops.py
import keras
apparently keras is actually a dependency for vgg54 training. If you are planning on training vgg54, you will also have to make the change to the following lines of model.py starting at around line 335. change them to look like this:
if type == 'VGG54':
target_layer = 'vgg_19/conv5/conv5_4'
elif type == 'VGG22':
target_layer = 'vgg_19/conv2/conv2_2'
from srgan-tensorflow.
Hi, I have the same error, and the proposed solution didn't work for me, instead I get this new error:
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'dicriminator_train/discriminator/discriminator_unit/dense_layer_2/dense/bias/Adam_1': Operation was explicitly assigned to /device:GPU:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.
[[Node: dicriminator_train/discriminator/discriminator_unit/dense_layer_2/dense/bias/Adam_1 = VariableV2[_class=["loc:@discriminator/discriminator_unit/dense_layer_2/dense/bias"], container="", dtype=DT_FLOAT, shape=[1], shared_name="", _device="/device:GPU:0"]()]]
Someone knows why this happens and how to solve it?
from srgan-tensorflow.
i meet the same question, pip install keras, but doesn't work.
AttributeError: 'module' object has no attribute 'leaky_relu'
from srgan-tensorflow.
@adeoy I believe that you have either installed regular tensorflow (not tensorflow-gpu) or you set CUDA_VISIBLE_DEVICES incorrectly when running the training script.
Note: pip install tensorflow-gpu is a different from pip install tensorflow
@lxk1990727 Sounds like you need to update your tensorflow.
from srgan-tensorflow.
@ryancom16 In fact I installed regular Tensorflow because I dont a GPU on my PC, but my processors are powerful enough to make this tasks. So, I cant do the next training without a GPU? Or how can I solve this problem?
from srgan-tensorflow.
Still have the same issue, anyone found a solution?
from srgan-tensorflow.
I had the same issue during the second step training (SRGAN with MSE loss) and it was solved by adding "import keras" in lib/ops.py
from srgan-tensorflow.
Related Issues (20)
- Issue with perceptual loss HOT 1
- Successfully ran test mode in MacOS, where to put Instructions? HOT 2
- License HOT 1
- Max input resolution? HOT 2
- can't find varibles in checkpoint
- 2x resolution instead of 4x HOT 1
- ParametricRelU after pixelshuffler HOT 2
- The graph couldn't be sorted in topological order
- i had some headache,for help -_- HOT 3
- Did you use the pretrained VGG model in getting percetual loss?
- Training
- VGG input
- When I want to input by using GRAY SCALE data...
- Black images HOT 3
- Keep getting a tensorflow.python.framework.errors_impl.InvalidArgumentError
- scale generator network output to [-1, 1] HOT 1
- Missing requirements HOT 1
- Set the upscaling factor
- why the content_loss and adversarial_loss keep increasing with the training? HOT 2
- run error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srgan-tensorflow.