neuleaf / mobilenetv2 Goto Github PK
View Code? Open in Web Editor NEWA Tensorflow implementation of MobileNet V2
A Tensorflow implementation of MobileNet V2
thanks for u excellent work?
(python35) hyuan@Host49:~/model/MobileNetV2$ python train_mobilenetv2.py --epoch 1 --dataset_dir ./dataset_tools/tfrecords --n_class 8 --batch_size 4 --num_samples 20
Traceback (most recent call last):
File "train_mobilenetv2.py", line 3, in
from config import *
File "/home/nishome/hyuan/model/MobileNetV2/config.py", line 34, in
args = parser.parse_args()
File "/home/nishome/hyuan/anaconda3/envs/python35/lib/python3.5/argparse.py", line 1729, in parse_args
self.error(msg % ' '.join(argv))
File "/home/nishome/hyuan/anaconda3/envs/python35/lib/python3.5/argparse.py", line 2383, in error
self.print_usage(_sys.stderr)
File "/home/nishome/hyuan/anaconda3/envs/python35/lib/python3.5/argparse.py", line 2353, in print_usage
self._print_message(self.format_usage(), file)
File "/home/nishome/hyuan/anaconda3/envs/python35/lib/python3.5/argparse.py", line 2319, in format_usage
return formatter.format_help()
File "/home/nishome/hyuan/anaconda3/envs/python35/lib/python3.5/argparse.py", line 278, in format_help
help = self._root_section.format_help()
File "/home/nishome/hyuan/anaconda3/envs/python35/lib/python3.5/argparse.py", line 208, in format_help
func(*args)
File "/home/nishome/hyuan/anaconda3/envs/python35/lib/python3.5/argparse.py", line 316, in _format_usage
action_usage = format(optionals + positionals, groups)
File "/home/nishome/hyuan/anaconda3/envs/python35/lib/python3.5/argparse.py", line 387, in _format_actions_usage
start = actions.index(group._group_actions[0])
IndexError: list index out of range
Did anyone meet this problem?
Traceback (most recent call last):
File "convert2tf.py", line 66, in
tf.app.run()
File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "convert2tf.py", line 59, in main
example=convert2example(FLAGS.img_dir, line)
File "convert2tf.py", line 38, in convert2example
'image/encoded': bytes_feature(image_data),
NameError: name 'bytes_feature' is not defined
感谢分享,应该是tensorflow版本的问题,请问作者使用的是tensorflow的哪个版本?
in this github, we can not get main.py
shall we use the main function in train_mobilenetv2.py to train?
你好,训练cifar-10,loss一直不下降,是我的学习率设置有问题吗,我学习率设置了0.001
Do you have the Detection code?
@neuleaf 我用您的代码,用猫狗数据做二分类,测试的准确率一直在0.5抖动,感觉训练了3万次都没什么变化啊,请问您可能是什么原因?
neuleaf,你好。
感谢你的开源贡献。
有一处疑问
mobilenet_v2.py 19行
net = res_block(net, exp, 64, 1, is_train, name='res5_1'),这里1 应该是 2 吧?
24行
net = res_block(net, exp, 96, 2, is_train, name='res6_1') # size/16 这里的2应该是1 吧?
感谢答复!
哪怕我用训练集中的图像测试,也同样都被分为第一类。
真是神奇………
你好,我用--checkpoint_dir 加载官方的mobilenet_v2_1.4_224模型会出错,你这边有预训练好的模型吗?
我看你的根目录下的ops.py文件里的res_block模块里面没有加残差啊,在论文里面是加了残差的,我用你这个正向传播,一个正向传播是0.25s,感觉好慢啊。
START TRAINING...
Traceback (most recent call last):
File "train_mobilenetv2.py", line 124, in
main()
File "train_mobilenetv2.py", line 102, in main
lr, = sess.run([lr,train_op], feed_dict=feed_dict)
File "C:\Users\dellc4130\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 889, in run
run_metadata_ptr)
File "C:\Users\dellc4130\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1070, in _run
raise TypeError('The value of a feed cannot be a tf.Tensor object. '
TypeError: The value of a feed cannot be a tf.Tensor object. Acceptable feed values include Python scalars, strings, lists, numpy ndarrays, or TensorHandles.
训练的过程中出现这个错误,您之前有遇到过么?
你好, 你在imagenet 上训练过吗, 准确度怎么样啊?
Traceback (most recent call last):
File "E:/自己的项目/MobileNetV2/train_mobilenetv2.py", line 118, in
main()
File "E:/自己的项目/MobileNetV2/train_mobilenetv2.py", line 37, in main
img_batch, label_batch = get_batch(filename_queue, args.batch_size)
File "E:\自己的项目\MobileNetV2\utils.py", line 89, in get_batch
input_queue = tf.train.slice_input_producer([image, label], shuffle=False)
File "D:\python3\lib\site-packages\tensorflow\python\training\input.py", line 340, in slice_input_producer
output = [array_ops.gather(t, index) for t in tensor_list]
File "D:\python3\lib\site-packages\tensorflow\python\training\input.py", line 340, in
output = [array_ops.gather(t, index) for t in tensor_list]
File "D:\python3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 2585, in gather
params, indices, validate_indices=validate_indices, name=name)
File "D:\python3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 2334, in gather
validate_indices=validate_indices, name=name)
File "D:\python3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "D:\python3\lib\site-packages\tensorflow\python\framework\ops.py", line 3162, in create_op
compute_device=compute_device)
File "D:\python3\lib\site-packages\tensorflow\python\framework\ops.py", line 3208, in _create_op_helper
set_shapes_for_outputs(op)
File "D:\python3\lib\site-packages\tensorflow\python\framework\ops.py", line 2427, in set_shapes_for_outputs
return _set_shapes_for_outputs(op)
File "D:\python3\lib\site-packages\tensorflow\python\framework\ops.py", line 2400, in _set_shapes_for_outputs
shapes = shape_func(op)
File "D:\python3\lib\site-packages\tensorflow\python\framework\ops.py", line 2330, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "D:\python3\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 627, in call_cpp_shape_fn
require_shape_fn)
File "D:\python3\lib\site-packages\tensorflow\python\framework\common_shapes.py", line 691, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Shape must be at least rank 1 but is rank 0 for 'input_producer_1/Gather_1' (op: 'Gather') with input shapes: [], [].
the path is correct,but i still can't read the data,wait for your reply,thank you1
Hi , thanks for sharing . Is it ssd lite code ? When I view sdd.py , i realize you used " separable_conv "
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.