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

hi,I have something wrong to run your code ,let me show the details. #11

Open
xiexuliunian opened this issue Dec 3, 2017 · 0 comments

Comments

@xiexuliunian
Copy link

my env is python3 with mxnet 0.12.1

Traceback (most recent call last):
  File "capsulenet.py", line 303, in <module>
    path + 'train-labels-idx1-ubyte.gz', path + 'train-images-idx3-ubyte.gz')
  File "capsulenet.py", line 106, in read_data
    with gzip.open(download_data(label_url)) as flbl:
  File "capsulenet.py", line 101, in download_data
    urllib.urlretrieve(url, fname)
AttributeError: module 'urllib' has no attribute 'urlretrieve'

I know that it is a little problem ,so I change urllib.urlretrieve with urllib.request.urlretrieve,then I have another problem

(mxnet) x@x:~/me/capsule/capsnet.mxnet$ python capsulenet.py --devices gpu0
batch_size: 100
decay: 0.9
devices: gpu0
lr: 0.001
model_prefix: capsnet
num_epoch: 100
num_routing: 3
recon_loss_weight: 0.392
tblog_dir: tblog
Traceback (most recent call last):
  File "capsulenet.py", line 338, in <module>
    final_net = capsnet(batch_size=args.batch_size/num_gpu, n_class=10, num_routing=args.num_routing, recon_loss_weight=args.recon_loss_weight)
  File "capsulenet.py", line 56, in capsnet
    primarycaps.infer_shape(data=(batch_size, 1, 28, 28))
  File "/home/x/.local/virtualenvs/mxnet/lib/python3.5/site-packages/mxnet/symbol/symbol.py", line 965, in infer_shape
    res = self._infer_shape_impl(False, *args, **kwargs)
  File "/home/x/.local/virtualenvs/mxnet/lib/python3.5/site-packages/mxnet/symbol/symbol.py", line 1085, in _infer_shape_impl
    c_array_buf(mx_uint, array('I', sdata)),
TypeError: integer argument expected, got float

could you have time to help me understand why it happes?

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

1 participant