Coder Social home page Coder Social logo

wmpscc / tensorflowbasedemo Goto Github PK

View Code? Open in Web Editor NEW
40.0 3.0 18.0 102.64 MB

使用Tensorflow训练模型的基本流程

Home Page: http://ishero.net/%E4%BD%BF%E7%94%A8TensorFlow%E8%AE%AD%E7%BB%83%E6%A8%A1%E5%9E%8B%E7%9A%84%E5%9F%BA%E6%9C%AC%E6%B5%81%E7%A8%8B.html

Python 100.00%
tensorflow cnn tfrecord

tensorflowbasedemo's Issues

MakeTFRecord2.py 中label定义语句ubuntu下错误

修正了label定义语句 label = transform_label(totalList[dictlist[i]].split('\')[1].split('-')[0])
在ubuntu下即使修正"\"为"/"仍然报错,split函数操作较为麻烦,所以改为
label = transform_label(total_list[dict_list[i]].split('img')[1].split('-')[0])

相应的:
def transform_label(imgType):
label_dict = {
'img001': 0,
'img002': 1,
'img003': 2,
'img004': 3,
'img005': 4,
'img006': 5,
'img007': 6,
'img008': 7,
'img009': 8,
'img010': 9,
'img011': 10,
}
return label_dict[imgType]

改为:
def transform_label(img_type):
label_dict = {
'001': 0,
'002': 1,
'003': 2,
'004': 3,
'005': 4,
'006': 5,
'007': 6,
'008': 7,
'009': 8,
'010': 9,
}
return label_dict[img_type]

CNN_train.py 中,为什么要有 # 读测试集数据 的内容?Why should I read the test data set?

包括以下内容:
Include the following :

def read_test_data()
x_test, y_test = read_test_data()x_batch_test, y_batch_test = tf.train.shuffle_batch([x_test, y_test], batch_size=batch_size, capacity=200,min_after_dequeue=100, num_threads=3)
images_test, label_test = sess.run([x_batch_test, y_batch_test])
_images_test = np.reshape(images_test, [batch_size, 49152])
accuracy_test = sess.run(getAccuracy, feed_dict={x: _images_test, y: label_test, drop_pro: 1})
print("test accuracy: %g" % accuracy_test)

我认为应该删除这些内容,在训练中为什么要出现测试集内容呢?
I think we should delete this content

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.