Is the GPS Your Frenemy?

作者分享了与新购GPS的亲密关系,探讨了人类为何喜欢将科技产品拟人化,以及与GPS互动时的趣事。文章还鼓励读者分享自己的GPS命名故事。
我交了个新朋友,为此兴奋不已。他答应陪我到处逛,分享餐馆和购物经验,在我开车的时候陪我说话,还总是帮我保持方向感。它就是我的新GPS,我还没打开包装,就已经憧憬着与它一起度过的欢乐时光了。这些可爱的小电子设备有一些特质,令我们总想将它们拟人化,把它们当朋友。我们给它们取名字,学会欣赏它们最好的特色,当我们觉得它们错了时还会跟它们争论。我有个朋友酷爱激怒她的GPS,她给它取名“蒂娜”(Tina)。她总是故意开错方向,好听到“蒂娜”气急败坏地说:“重新计算……重新计算……”她确信她察觉“蒂娜”让她改正路线找个安全的地方掉头时声音里有一丝恼火。她想像“蒂娜”冷笑着说:“不是这边,是另一边的左边。”“蒂娜”甚至还有工间休息──当GPS发布指路信息出现延迟的时候。其他一些朋友得到了痛苦的教训:你可能会对这个新的与卫星连接的伙伴信任过了头。初涉爱河之时,他们将小心谨慎抛到九霄云外,把实体地图也扔在了车库里。他们自以为有了这个百事通,高高兴兴地跟着GPS的指引走。直到他们拐错了一个至关重要的弯,而且是在漆黑的深夜里,在离家很远的陌生城市。不管这个百事通提供什么信息都没有用。当他们在凌晨1点终于回到家里,他们简直要跟GPS一刀两断,看看已成旧爱的地图还会不会接受回心转意的自己。读者们,如果你有GPS,你对它是爱还是恨?它们有没有帮上你的忙,还是像个没用的令人分心的东西?你给这个小东西取了什么名字?欢迎大家为我提供命名建议。Stefanie Ilgenfritz(“工作•家” 讲述人们忙碌于工作和家庭之间时,做出的选择和折衷。)


I'm all excited about making a new friend, who promises to go with me everywhere, share restaurant and shopping tips, talk to me while I drive, and generally help me keep my bearings. It's my new GPS, and before it was even out of the box, I was imagining all the fun we would have.There's something about those cute little gadgets that makes us want to anthropomorphize them and develop a relationship. We give them names, learn to appreciate their best features, and argue with them when we think they're wrong.I have a friend who delights in irking her GPS, which she has named 'Tina.' She's been known to purposely drive in the wrong direction just to hear Tina sputter: 'Recalculating …recalculating ….' She's sure she detects an edge in Tina's voice when the device instructs her to get it right, and find a safe place to turn around. 'No, your other left,' she imagines Tina sneering.Tina even takes coffee breaks─when the GPS is delayed in delivering directions.Other friends learned the hard way that you can be too trusting of your new satellite-linked companion. In the first blush of new love, they threw caution to the wind and their printed maps in the garbage. They had what they thought was 'God in a Box,' blithely following their GPS wherever it led them. Until they took a fatal wrong turn. Late on a dark night. In a strange city, far from home. Whatever guidance God in a Box was giving them, it wasn't working. When they finally got home around 1 am, they were ready to break up with their GPS and see if their old maps would take them back.Readers, if you have a GPS, do you have more of a love or a hate relationship with it? Do they help your juggle, or do they seem like an unnecessary distraction? And what are some of the names you've given your little front-seat driver? I welcome any suggestions for naming mine.Stefanie Ilgenfritz
尽管存在保密协议使得某些实际项目的代码无法公开[^1],仍可以基于通用框架提供一个模拟联邦学习应用于工业数据场景下的示例。下面将以TensorFlow Federated (TFF)为基础构建一个简单的例子来展示如何利用联邦学习处理来自不同客户端的数据。 ### 使用TensorFlow Federated进行简单工业数据分析 为了更好地理解联邦学习的工作流程,在这里创建了一个简化版的手写数字识别案例,这并非直接来自于任何特定的工业应用场景,而是用于说明目的: ```python import tensorflow as tf import tensorflow_federated as tff # 准备MNIST数据集作为模拟工业传感器读数或其他形式的时间序列数据 mnist_train, mnist_test = tf.keras.datasets.mnist.load_data() def preprocess(dataset): def batch_format_fn(element): """Flatten a batch `element` and return the features and labels.""" return (tf.reshape(element['x'], [-1, 784]), element['y']) return dataset.batch(20).map(batch_format_fn) emnist_train = preprocess(mnist_train) emnist_test = preprocess(mnist_test) # 定义模型结构 def create_keras_model(): return tf.keras.models.Sequential([ tf.keras.layers.InputLayer(input_shape=(784,)), tf.keras.layers.Dense(10, kernel_initializer='zeros'), tf.keras.layers.Softmax(), ]) def model_fn(): keras_model = create_keras_model() return tff.learning.from_keras_model( keras_model, input_spec=preprocess(emnist_train).element_spec, loss=tf.keras.losses.SparseCategoricalCrossentropy(), metrics=[tf.keras.metrics.SparseCategoricalAccuracy()]) # 构建迭代过程 iterative_process = tff.learning.build_federated_averaging_process(model_fn) state = iterative_process.initialize() for _ in range(1, 11): state, metrics = iterative_process.next(state, [emnist_train]) print('round {:2d}, metrics={}'.format(_, metrics)) evaluation = tff.learning.build_federated_evaluation(model_fn) train_metrics = evaluation(state.model, [emnist_train]) print(str(train_metrics)) test_metrics = evaluation(state.model, [emnist_test]) print(str(test_metrics)) ``` 此段代码展示了如何设置并运行一次基本的联邦平均算法实验。请注意,上述代码中的数据预处理部分假设输入的是类似于图像这样的二维数组;对于真实的工业环境来说,则可能需要针对具体的应用调整这部分逻辑以适应不同类型的数据源,比如时间序列、事件日志等。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值