shuokay / mxnet-ir Goto Github PK
View Code? Open in Web Editor NEWImage Retrieval Experiment Using Triplet Loss
Image Retrieval Experiment Using Triplet Loss
the code as follows:
"from symbol_resnet import resnet"
but where is the symbol_resnet
I read the definition of class Auc(), but i do not understand why it can evaluate the model.
程序在运行时报了这个错误:
/Users/nali/PycharmProjects/mxnet-ir/test.py:96: DeprecationWarning: mxnet.model.FeedForward has been deprecated. Please use mxnet.mod.Module instead.
optimizer=optimizer)
/Library/Python/2.7/site-packages/mxnet/initializer.py:267: DeprecationWarning: Calling initializer with init(str, NDArray) has been deprecated.please use init(mx.init.InitDesc(...), NDArray) instead.
self.default_init(name, arr)
Traceback (most recent call last):
File "/Users/nali/PycharmProjects/mxnet-ir/test.py", line 105, in
test_train()
File "/Users/nali/PycharmProjects/mxnet-ir/test.py", line 101, in test_train
epoch_end_callback=mx.callback.do_checkpoint("models/ir-blur"))
File "/Library/Python/2.7/site-packages/mxnet/model.py", line 782, in fit
self._init_params(data.provide_data+data.provide_label)
File "/Library/Python/2.7/site-packages/mxnet/model.py", line 526, in _init_params
self.initializer(k, v)
File "/Library/Python/2.7/site-packages/mxnet/initializer.py", line 267, in call
self.default_init(name, arr)
File "/Library/Python/2.7/site-packages/mxnet/initializer.py", line 72, in call
self._legacy_init(desc, arr)
File "/Library/Python/2.7/site-packages/mxnet/initializer.py", line 138, in _legacy_init
self._init_default(name, arr)
File "/Library/Python/2.7/site-packages/mxnet/initializer.py", line 180, in _init_default
'Please use mx.sym.Variable(init=mx.init.) to set initialization pattern' % name)
ValueError: Unknown initialization pattern for softmax_label. Default initialization is now limited to "weight", "bias", "gamma" (1.0), and "beta" (0.0).Please use mx.sym.Variable(init=mx.init.) to set initialization pattern
train_resnet.py:238: DeprecationWarning: mxnet.model.FeedForward has been deprecated. Please use mxnet.mod.Module instead.
optimizer=optimizer,
2017-10-31 13:42:05,376 Start training with [gpu(0), gpu(1), gpu(2), gpu(3)]
[13:42:05] /media/zhaijunzhi/mxnet/dmlc-core/include/dmlc/logging.h:308: [13:42:05] src/operator/tensor/./matrix_op-inl.h:867: Check failed: (*end <= axis_size) && (*end >= 0) Invalid begin, end, get begin=0, end=64
Stack trace returned 10 entries:
[bt] (0) /usr/local/lib/python2.7/dist-packages/mxnet-0.11.1-py2.7.egg/mxnet/libmxnet.so(_ZN4dmlc15LogMessageFatalD1Ev+0x3c) [0x7fea14bf39ac]
[bt] (1) /usr/local/lib/python2.7/dist-packages/mxnet-0.11.1-py2.7.egg/mxnet/libmxnet.so(ZN5mxnet2op18GetSliceAxisParamsERKNS0_14SliceAxisParamERKN4nnvm6TShapeEPiS8_S8+0x2f1) [0x7fea15d71591]
[bt] (2) /usr/local/lib/python2.7/dist-packages/mxnet-0.11.1-py2.7.egg/mxnet/libmxnet.so(ZN5mxnet2op14SliceAxisShapeERKN4nnvm9NodeAttrsEPSt6vectorINS1_6TShapeESaIS6_EES9+0x1ad) [0x7fea15d7b70d]
[bt] (3) /usr/local/lib/python2.7/dist-packages/mxnet-0.11.1-py2.7.egg/mxnet/libmxnet.so(+0x1b7911e) [0x7fea15f7911e]
[bt] (4) /usr/local/lib/python2.7/dist-packages/mxnet-0.11.1-py2.7.egg/mxnet/libmxnet.so(_ZN5mxnet4exec10InferShapeEON4nnvm5GraphEOSt6vectorINS1_6TShapeESaIS5_EERKSs+0x1670) [0x7fea15f7bc50]
[bt] (5) /usr/local/lib/python2.7/dist-packages/mxnet-0.11.1-py2.7.egg/mxnet/libmxnet.so(MXSymbolInferShape+0x1539) [0x7fea15f07b79]
[bt] (6) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fea30a2fadc]
[bt] (7) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x1fc) [0x7fea30a2f40c]
[bt] (8) /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(_ctypes_callproc+0x48e) [0x7fea30c465fe]
[bt] (9) /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(+0x15f9e) [0x7fea30c47f9e]
I get an infer_shape error, and I am new to the use of triplet loss an I would like to know if I need to separate my images into differents folder depending on their batch and label?
How do I specify which image is same of different for each anchor
(which are also images and could also be same of different later on)
我在运行时,发现ir-resnet.py中get_network函数调用了resnet函数。
我在网上找到了这个版本:https://github.com/tornadomeet/ResNet/blob/master/symbol_resnet.py
但是这里的resnet参数跟你的调用不符。你的调用中多了data参数
请问这个resnet的代码哪里可以找到?
非常感谢你的博客与源码,受益颇多,谢谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.