分类 Cocos2dx 下的文章

import tensorflow as tf

# 指定checkpoint文件和meta文件的路径
checkpoint_path = '/Users/mac/Desktop/model/checkpoint-25'
meta_path = '/Users/mac/Desktop/model/checkpoint-25.meta'

# 创建一个新的图
graph = tf.Graph()
with graph.as_default():
    # 使用tf.compat.v1来访问旧的API
    with tf.compat.v1.Session() as sess:
        # 导入meta文件中的图结构
        saver = tf.compat.v1.train.import_meta_graph(meta_path, clear_devices=True)
        
        # 恢复模型的权重
        saver.restore(sess, checkpoint_path)
        
        # 指定输出节点
        output_node_names = 'input,value_targets'  # 你需要指定你的模型的输出节点名称
        
        # 将变量转换为常量,并保存为pb文件
        output_graph_def = tf.compat.v1.graph_util.convert_variables_to_constants(
            sess,
            sess.graph_def,
            output_node_names.split(',')
        )
        
        # 保存为.pb文件
        with tf.io.gfile.GFile('/Users/mac/Desktop/model/frozen_model.pb', 'wb') as f:
            f.write(output_graph_def.SerializeToString())

例如:Y=w11+w22+b


import pandas as pd

data=pd.read_csv('/Users/mac/Desktop/Keras/000.数据+课件+代码【下部分】/小型数据集/Advertising.csv')

data.head()

x=data[data.columns[1:-1]]

x

y=data.iloc[:,-1]

y

import keras

import keras.layers as layers

model=keras.Sequential()

model.add(layers.Dense(1,input_dim=3))

model.summary()

model.compile(optimizer='adam',loss='mse')

model.fit(x,y,epochs=2000)

隐私政策
我们尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确,更有个性化的服务,我们会按照本隐私权政策的规定使用和披露您的个人信息。但我们将以高度的勤勉,审慎义务对待这些信息。除本隐私权政策另有规定外,在未征得您事先许可的情况下,我们不会将这些信息对外披露或向第三方提供.我们会不时更新本隐私权政策。

您在同意我们服务使用协议之时,即视为您已经同意本隐私权政策全部内容。本隐私权政策属于我们服务使用协议不可分割的一部分。

1.适用范围

a)在您注册我们帐号时,您根据我们要求提供的个人注册信息;

b)在您使用我们网络服务,或访问我们平台网页时,我们自动接收并记录您的浏览器和计算机上的信息,包括但不限于您的IP地址,浏览器的类型,使用的语言,访问日期和时间,软硬件特征信息及您需求的网页记录等数据;

c)我们通过合法途径从商业伙伴处取得的用户个人数据。

您了解并同意,以下信息不适用本隐私权政策:

a)您在使用我们平台提供的搜索服务时输入的关键字信息;

b)我们收集到的您在我们发布的有关信息数据,包括但不限于参与活动,成交信息及评价详情;

c)违反法律规定或违反我们规则行为及我们已对您采取的措施。

2.信息使用

a)我们不会向任何无关第三方提供,出售,出租,分享或交易您的个人信息,除非事先得到您的许可,或该第三方和我们(含我们关联公司)单独或共同为您提供服务,且在该服务结束后,其将被禁止访问包括其以前能够访问的所有这些资料。

b)我们亦不允许任何第三方以任何手段收集,编辑,出售或者无偿传播您的个人信息。任何我们平台用户如从事上述活动,壹经发现,我们有权立即终止与该用户的服务协议。

c)为服务用户的目的,我们可能通过使用您的个人信息,向您提供您感兴趣的信息,包括但不限于向您发出产品和服务信息,或者与我们合作伙伴共享信息以便他们向您发送有关其产品和服务的信息(后者需要您的事先同意)。

3.信息披露

在如下情况下,我们将依据您的个人意愿或法律的规定全部或部分的披露您的个人信息:a)经您事先同意,向第三方披露;

b)为提供您所要求的产品和服务,而必须和第三方分享您的个人信息;

c)根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政,司法机构披露;

d)如您出现违反中国有关法律,法规或者我们服务协议或相关规则的情况,需要向第三方披露;

e)如您是适格的知识产权投诉人并已提起投诉,应被投诉人要求,向被投诉人披露,以便双方处理可能的权利纠纷;

f)在我们平台上创建的某壹交易中,如交易任何壹方履行或部分履行交易义务并提出信息披露请求的,我们有权决定向该用户提供其交易对方的联络方式等必要信息,以促成交易的完成或纠纷的解决。

g)其它我们根据法律,法规或者网站政策认为合适的披露。

4.信息存储和交换

我们收集的有关您的信息和资料将保存在我们及(或)其关联公司的服务器上,这些信息和资料可能传送至您所在国家,地区或我们收集信息和资料所在地的境外并在境外被访问,存储和展示。

  1. Cookie的使用

a)在您未拒绝接受cookies的情况下,我们会在您的计算机上设定或取用cookies,以便您能登录或使用依赖于cookies的我们平台服务或功能.我们使用cookies可为您提供更加周到的个性化服务,包括推广服务。

b)您有权选择接受或拒绝接受cookies。您可以通过修改浏览器设置的方式拒绝接受cookies。但如果您选择拒绝接受cookies,则您可能无法登录或使用依赖于cookies的我们网络服务或功能。

c)通过我们所设cookies所得得的有关信息,将适用本政策。

6.信息安全

a)我们帐号均有安全保护功能,请妥善保管您的用户名及密码信息.我们将通过对用户密码进行加密等安全措施确保您的信息不丢失,不被滥用和变造。尽管有前述安全措施,但同时也请您注意在信息网络上不存在“完善的安全措施”。

b)在使用我们网络服务进行网上交易时,您不可避免的要向交易对方或潜在的交易对方披露自己的个人信息,如联络方式或者邮政地址。请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,尤其是我们用户名及密码发生泄露,请您立即联络我们客服,以便我们采取相应措施。

Privacy Policy
App respects and protects the privacy of all users who use the service. In order to provide you with more accurate and personalized services, App will use and disclose your personal information in accordance with this Privacy Policy. However, App will treat this information with a high degree of diligence and prudence. Except as otherwise provided in this Privacy Policy, App will not disclose or provide this information to third parties without your prior permission. App will update this Privacy Policy from time to time.

By agreeing to the App Service Use Agreement, you are deemed to have agreed to the entire content of this Privacy Policy. This Privacy Policy is an integral part of the App Service Use Agreement.

  1. Scope of application

a) Personal registration information provided by App when you register your App account;

b) When you use the App web service or access the App platform web page, App automatically receives and records information on your browser and computer, including but not limited to your IP address, browser type, language used, access Date and time, hardware and software feature information and web page records you need;

c) User personal data obtained by App from a business partner through legal means.

You understand and agree that the following information does not apply to this Privacy Policy:

a) Keyword information that you enter when using the search service provided by the App platform;

b) Information about the information you have collected at App collected by App, including but not limited to participation activities, transaction information and evaluation details;

c) Violation of the law or violation of the App rules and actions taken by App.

  1. Information use

a) App will not provide, sell, rent, share or trade your personal information to any unrelated third party, unless you have your permission in advance, or the third party and App (including App affiliates) provide services to you individually or jointly. And after the service is over, it will be barred from accessing all of the material that it has previously been able to access.

b) App also does not allow any third party to collect, edit, sell or distribute your personal information by any means. Any user of the App platform who engages in the above activities, has found that App has the right to immediately terminate the service agreement with the user.

c) For the purpose of serving the user, App may use the information you use to provide you with information of interest to you, including but not limited to sending you product and service information, or sharing information with App partners so that they can send you Information about its products and services (the latter requires your prior consent).

  1. Information disclosure

In the following circumstances, App will disclose your personal information in whole or in part according to your personal wishes or the law: a) disclose to third parties with your prior consent;

b) in order to provide the products and services you request, you must share your personal information with third parties;

c) disclosed to third parties or administrative or judicial authorities in accordance with the relevant provisions of the law or the requirements of the administrative or judicial authorities;

d) If you are in violation of relevant Chinese laws, regulations or App service agreement or related rules, you need to disclose it to third parties;

e) If you are a qualified IP Complainant and have filed a complaint, it should be disclosed to the Respondent at the request of the Complainant so that both parties can handle possible rights disputes;

f) In a transaction created on the App platform, if any transaction performs or partially fulfills the transaction obligation and requests for information disclosure, App has the right to decide to provide the user with the necessary information such as the contact information of the counterparty. Facilitate the completion of the transaction or the resolution of the dispute.

g) Other disclosures that App considers appropriate in accordance with laws, regulations or website policies.

  1. Information storage and exchange

The information and materials collected by App will be kept on the servers of App and/or its affiliates. The information and materials may be sent to your country, region or App where the information and data are collected and accessed outside the country. , storage and display.

  1. Use of cookies

a) If you do not refuse to accept cookies, App will set or access cookies on your computer so that you can log in or use the App platform services or features that rely on cookies. App uses cookies to provide you with more Thoughtful personalized service, including promotional services.

b) You have the right to choose to accept or decline to accept cookies. You can refuse to accept cookies by modifying your browser settings. However, if you choose to refuse to accept cookies, you may not be able to log in or use the App web service or feature that relies on cookies.

c) This policy will apply to information obtained through the cookies set by App.

  1. Information security

a) App account has security protection function, please keep your username and password information safely. App will ensure that your information is not lost, misused and altered by security measures such as encrypting user passwords. Despite the aforementioned security measures, please also note that there are no “perfect security measures” on the information network.

b) When using the App web service for online transactions, you will inevitably disclose your personal information, such as contact information or postal address, to the counterparty or potential counterparty. Please protect your personal information and provide it to others only when necessary. If you find that your personal information has been compromised, especially if the App username and password are compromised, please contact App customer service immediately so that App can take appropriate measures.