- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用具有结构的omniglot数据集
Omniglot
||______
| |
class_0 class_1 ... class_N
| |_______...______________|
| | |
class_0 examples class_1 examples class_n examples
我正在尝试使用 tensorflow 数据集来获取示例对,如果它们来自相同的示例文件夹,则将它们标记为 0;如果它们来自不同的示例文件夹,则将它们标记为 1。
当我执行时'''omni_train = tfds.load(name="omniglot", split=tfds.Split.TRAIN)omni_example,=omni_train.take(1)'''
我得到输出
<TakeDataset shapes: {image: (105, 105, 3), alphabet: (), alphabet_char_id: (), label: ()}, types: {image: tf.uint8, alphabet: tf.int64, alphabet_char_id: tf.int64, label: tf.int64}>
我明白了,但是我可以修改它,以便它生成随机对吗?
它有字母表和alphabet_char_id,这意味着它可能是一个简单的映射,只要字母表和字母表字符id匹配对,那么标签就是0或1,而不是集合中的第n个字符目前是。
我的目标是通过我已经编写的暹罗神经网络传递该对和标签。
最佳答案
我只是将它转储到 numpy 中,然后基于它编写一个生成器,希望这个要点能以某种方式有所帮助。 https://gist.github.com/chychen/c8249b38cce94ae6a641260b81b23f78
关于python - 如何使用 TensorFlow 数据集获取 Omniglot 数据对,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57211963/
我正在尝试在 Omniglot 数据集上做一些实验,我看到 Pytorch 实现了它。我已经运行了命令 from torchvision.datasets import Omniglot 但我不知道如
我正在使用具有结构的omniglot数据集 Omniglot ||______ | | class_0 class_1 ... class_N
我是 PyTorch 和神经网络的真正新手。本周我开始研究这些主题,我的导师给了我一个代码以及一些处理该代码的任务。但他给我的代码不起作用。我一整天都在尝试解决这个问题,但没有结果。因为我不知道 NN
我是一名优秀的程序员,十分优秀!