我有一个tensorflow .pb文件,我想加载到python DNN,恢复图形并获得预测.我这样做是为了测试创建的.pb文件是否可以使预测类似于普通的Saver.save()模型.
我的基本问题是,当我使用上面提到的.pb文件在Android上制作时,我得到了一个非常不同的预测值
我的.pb文件创建代码:
frozen_graph = tf.graph_util.convert_variables_to_constants(
session,
session.graph_def,
['outputLayer/Softmax']
)
with open('frozen_model.pb', 'wb') as f:
f.write(frozen_graph.SerializeToString())
Run Code Online (Sandbox Code Playgroud)
所以我有两个主要问题:
当我尝试创建主题时会发生这种情况
TypeError: this.auth.getUniverseDomain is not a function
at GrpcClient.createStub (/Users/<...>/node_modules/google-gax/src/grpc.ts:418:48)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Run Code Online (Sandbox Code Playgroud)
示例代码:
pubSubClient = new PubSub({
"projectId": "project_name"
});
initTopic = async () => {
// Creates a new topic if it does not exist
const [topics] = await this.pubSubClient.getTopics()
RootLogger.info("topic names: " + topics.join(","))
const topicExists = topics.some(topic => topic.name.endsWith(this.topicName));
if (topicExists) {
RootLogger.info(`Topic ${this.topicName} already exists.`);
} else {
await this.pubSubClient.createTopic(this.topicName);
RootLogger.info(`Topic ${this.topicName} created.`);
}
}
Run Code Online (Sandbox Code Playgroud) authentication node.js typescript google-cloud-platform google-cloud-pubsub
我正在尝试从 NFT 中找到的令牌 URI 中获取元数据。令牌 URI 如下所示:
https://api.opensea.io/api/v2/metadata/matic/<contract_address>/0x{id}
我尝试使用 tokenId 的十六进制形式,但它只是在 GET 调用时{id}
返回错误。{ success:false }
令牌 ID 为:
25301351943351891415725927464477484049512317528648331027932693704579263506192
对于具有不同令牌 Id 但不同基本 url 的另一个令牌也是如此:
https://api.opensea.io/api/v1/metadata/0x495f947276749Ce646f68AC8c248420045cb7b5e/0x{id}
我观察到工作 URL 的版本位于v1
不同的链上。Opensea 文档似乎没有谈论任何有关v2
.
请帮助我了解如何从上述 URI 中获取元数据。
当我尝试从协程(为此创建了一个新的)块访问数据库时IllegalStateException
,我的android应用正在生产中崩溃,并带有SQLiteDiskIOException
,SQLiteCantOpenDatabaseException
等不同异常。launch
CoroutineScope
ioCoroutineContext + SupervisorJob()
从这样的launch
块进行数据库访问是否健康?除此之外,由于这是对应用程序中数据库的首次访问,因此它将运行数据库迁移(如果有)。