Comments (5)
It should be written as "keep_dims=True"
from capsnet-tensorflow.
I have met the same question.
from capsnet-tensorflow.
I find you can fix the capsLayer.py. In 129, you delete the "keepdims=True".
Then it works.
from capsnet-tensorflow.
ok
from capsnet-tensorflow.
I'm getting the same error when following this github code
https://github.com/akosiorek/akosiorek.github.io/blob/master/notebooks/attention_glimpse.ipynb How can I fix this? I'm stuck
Jupyter notebook:
Gaussian Attention
gaussian_att_params = tf.concat([tu, ts, td, tu, ts, td], -1)
gaussian_glimpse_expr = gaussian_glimpse(tx, gaussian_att_params, glimpse_size)
Upon running error:
TypeError Traceback (most recent call last)
in
1 # Gaussian Attention
2 gaussian_att_params = tf.concat([tu, ts, td, tu, ts, td], -1)
----> 3 gaussian_glimpse_expr = gaussian_glimpse(tx, gaussian_att_params, glimpse_size)
in gaussian_glimpse(img_tensor, transform_params, crop_size)
29 uy, sy, dy, ux, sx, dx = tf.split(transform_params, 6, split_ax)
30 # create Gaussian masks, one for each axis
---> 31 Ay = gaussian_mask(uy, sy, dy, h, H)
32 Ax = gaussian_mask(ux, sx, dx, w, W)
33 # extract glimpse
in gaussian_mask(u, s, d, R, C)
14 mask = tf.exp(-.5 * tf.square(column_centres / s))
15 # we add eps for numerical stability
---> 16 normalised_mask = mask / (tf.reduce_sum(mask, 1, keep_dims=True) + 1e-8)
17 return normalised_mask
18
~\Anaconda2\envs\PythonCPU\lib\site-packages\tensorflow_core\python\util\dispatch.py in wrapper(*args, **kwargs)
178 """Call target, and fall back on dispatchers if there is a TypeError."""
179 try:
--> 180 return target(*args, **kwargs)
181 except (TypeError, ValueError):
182 # Note: convert_to_eager_tensor currently raises a ValueError, not a
TypeError: reduce_sum() got an unexpected keyword argument 'keep_dims'
from capsnet-tensorflow.
Related Issues (20)
- Only 10% accuracy for scaled images!!!!! HOT 3
- reshape question
- a question HOT 1
- Question about num_outputs
- Train on different dataset HOT 7
- Using Caps-Net to Handle High-dimensional and Small-sample Problems HOT 1
- I have question about loss function. something wrong, i think....? HOT 3
- Baidu Link Not Working Correctly: Mirror?
- Cannot handle rotation ??? HOT 1
- English Version of Blog HOT 1
- Medical Imaging HOT 7
- Vector Length HOT 3
- About the routing biases HOT 2
- TypeError: 'numpy.ndarray' object is not callable!
- a quesion HOT 1
- about tensorflow c++
- about
- about a problem in gpu_version
- How to save model in SavedModel or frozen_graph format?
- Cap
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 capsnet-tensorflow.