Giter Club home page Giter Club logo

shufflenet-gluon's Introduction

ShuffleNet

shufflenet implement by mxnet gluon. By Marks.

File Structures

  • model.py: Define the model, which consists of features and output.
  • utils:
    • dataAugmentation.py: Image augmentation operaters.
    • dataLoder.py: Data iter, which for classify, segmentation, detection, etl.

shufflenet-gluon's People

Contributors

gs-ren avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

kwpgithub

shufflenet-gluon's Issues

channel_shuffle problem

定义:def channel_shuffle(data, groups):
data = mx.sym.reshape(data, shape=(0, -4, groups, -1, -2))
data = mx.sym.swapaxes(data, 1, 2)
data = mx.sym.reshape(data, shape=(0, -3, -2))
return data
测试数据:blk = Shufflenetv2(3)
blk.initialize()
x = nd.random.uniform(shape=(4, 3, 6, 6))
blk(x).shape
问题:AssertionError Traceback (most recent call last)
in ()
2 blk.initialize()
3 x = nd.random.uniform(shape=(4, 3, 6, 6))
----> 4 blk(x).shape

D:\anaconda\envs\gluon\lib\site-packages\mxnet\gluon\block.py in call(self, *args)
411 def call(self, *args):
412 """Calls forward. Only accepts positional arguments."""
--> 413 return self.forward(*args)
414
415 def forward(self, *args):

in forward(self, x)
48
49 x = nd.concat(x_left,x_right, dim=1)
---> 50 x = channel_shuffle(x,2)
51 return x

in channel_shuffle(data, groups)
1 def channel_shuffle(data, groups):
----> 2 data = mx.sym.reshape(data, shape=(0, -4, groups, -1, -2))
3 data = mx.sym.swapaxes(data, 1, 2)
4 data = mx.sym.reshape(data, shape=(0, -3, -2))
5 return data

D:\anaconda\envs\gluon\lib\site-packages\mxnet\symbol\register.py in reshape(data, shape, reverse, target_shape, keep_highest, name, attr, out, **kwargs)

AssertionError: Argument data must be Symbol instances, but got
[[[[ 6.13965929e-01 6.79090619e-01 5.35632789e-01 8.64281416e-01
5.89909971e-01 7.50844240e-01]
提问:请问这是因为我的测试数据是随机生成的自然数的原因吗?您有遇到过相关问题吗?谢谢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.