Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix]: Fix bug for input v3 #442

Merged
merged 8 commits into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/component/backbone.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 为何需要组件化

## 1. 灵活搭建模型,多思即所得
## 1. 灵活搭建模型,所思即所得

依靠动态可插拔的公共组件,以“搭积木”的方式快速构建想要的模型结构。框架提供了"胶水"语法,实现组件间的无缝衔接。

1 change: 1 addition & 0 deletions docs/source/train.md
Original file line number Diff line number Diff line change
@@ -267,6 +267,7 @@ EasyRec支持两种损失函数配置方式:1)使用单个损失函数;2
- 表示损失函数的权重设定为归一化的随机数

参考论文:

- 《 Multi-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics 》
-[Reasonable Effectiveness of Random Weighting: A Litmus Test for Multi-Task Learning](https://arxiv.org/abs/2111.10603)

2 changes: 1 addition & 1 deletion easy_rec/python/compat/early_stopping.py
Original file line number Diff line number Diff line change
@@ -21,9 +21,9 @@
import os
import threading
import time
from distutils.version import LooseVersion

import tensorflow as tf
from distutils.version import LooseVersion
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.ops import init_ops
3 changes: 1 addition & 2 deletions easy_rec/python/input/odps_input_v3.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
import logging
import sys

import numpy as np
import tensorflow as tf

from easy_rec.python.input.input import Input
@@ -72,7 +71,7 @@ def _odps_read(self):
batch_num = int(total_records_num / self._data_config.batch_size)
res_num = total_records_num - batch_num * self._data_config.batch_size
batch_defaults = [
np.array([x] * self._data_config.batch_size) for x in record_defaults
[x] * self._data_config.batch_size for x in record_defaults
]
for batch_id in range(batch_num):
batch_data_np = [x.copy() for x in batch_defaults]
2 changes: 1 addition & 1 deletion easy_rec/python/model/multi_task_model.py
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@
from easy_rec.python.layers.dnn import DNN
from easy_rec.python.model.rank_model import RankModel
from easy_rec.python.protos import tower_pb2
from easy_rec.python.protos.loss_pb2 import LossType
from easy_rec.python.protos.easy_rec_model_pb2 import EasyRecModel
from easy_rec.python.protos.loss_pb2 import LossType

if tf.__version__ >= '2.0':
tf = tf.compat.v1
2 changes: 1 addition & 1 deletion easy_rec/python/test/train_eval_test.py
Original file line number Diff line number Diff line change
@@ -7,11 +7,11 @@
import threading
import time
import unittest
from distutils.version import LooseVersion

import numpy as np
import six
import tensorflow as tf
from distutils.version import LooseVersion
from tensorflow.python.platform import gfile

from easy_rec.python.main import predict