Library Search
结果页02-functional-api-tf-data
在 技术栈 中找到 8 个匹配结果。
技术栈
技术栈
8 个 TensorFlow # TensorFlow Functional API + tf.data Pipeline
## 目标
- 掌握 Functional API(多输入/多输出/共享层)
- 掌握 tf.data 高性能输入管道
- 自定义训练循环(Custom Training Loop)
## 完整代码
### 1. Functional API —— 灵活模型构建
```python
import… 2% Neo4j def create_data(tx):
"""批量创建节点和关系"""
tx.run("""
CREATE (:Person {name: '张三', age: 21, major: '计算机科学'})
CREATE (:Person {name: '李四', age: 22, major: '数学'})
CREATE (:Pers… 2% WPF public class ScoreConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is int score)
return… 2% NestJS async update(id: number, dto: Partial<CreatePostDto>) {
const post = await this.findOne(id);
Object.assign(post, dto);
return this.postsRepo.save(post);
}
async remove(id: number) {… 2% Spring Data JPA return cb.and(predicates.toArray(new Predicate[0]));
};
}
}
```
### 4. 使用示例
```java
package com.example;
import com.example.entity.Product;
import com.example.entity.Product.Status;
imp… 2% Phalcon public function showAction(int $id): Response
{
$product = Product::findFirst($id);
if (!$product) {
return $this->response->setStatusCode(404)->setJsonContent(['error'… 2% Remix if (intent === 'add') {
const name = fd.get('name') as string;
const phone = fd.get('phone') as string;
const email = (fd.get('email') as string) || '';
if (!name || !phone) {
re… 1% Django | 字段 | 用途 |
|------|------|
| `CharField(max_length=n)` | 短文本 |
| `TextField()` | 长文本 |
| `IntegerField()` | 整数 |
| `BooleanField()` | 布尔值 |
| `DateTimeField(auto_now_add=True)` | 创建时间 |
| `DateTimeFi… 1%