Skip to content

c_array_buf(mx_uint, array('I', sdata)), TypeError: array item must be integer #13

@machuck

Description

@machuck
$ python3.6 capsulenet.py --batch_size 90 --devices cpu0,cpu1,cpu2,cpu3,cpu4,cpu5,cpu6,cpu7,cpu8 --num_epoch 100 --lr .001 --num_routing 3 --decay .99 --model_prefix lr_0_0005_decay_0_99
capsulenet.py:108: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
  label = np.fromstring(flbl.read(), dtype=np.int8)
capsulenet.py:111: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
  image = np.fromstring(fimg.read(), dtype=np.uint8).reshape(len(label), rows, cols)
batch_size: 90
decay: 0.99
devices: cpu0,cpu1,cpu2,cpu3,cpu4,cpu5,cpu6,cpu7,cpu8
lr: 0.001
model_prefix: lr_0_0005_decay_0_99
num_epoch: 100
num_routing: 3
recon_loss_weight: 0.392
tblog_dir: tblog
==================== NUMBER OF GPU:  9

Traceback (most recent call last):
  File "capsulenet.py", line 339, 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 "/usr/local/lib/python3.6/site-packages/mxnet-1.0.0-py3.6.egg/mxnet/symbol/symbol.py", line 965, in infer_shape
    res = self._infer_shape_impl(False, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/mxnet-1.0.0-py3.6.egg/mxnet/symbol/symbol.py", line 1085, in _infer_shape_impl
    c_array_buf(mx_uint, array('I', sdata)),
TypeError: array item must be integer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions