Skip to content

Commit

Permalink
fix dtype type error (#3289)
Browse files Browse the repository at this point in the history
Former-commit-id: 2e33369
  • Loading branch information
ouyangyu authored Jul 25, 2020
1 parent 93f8e2a commit b93f0d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def dynamic_binary_concat(
getattr(op_conf.dynamic_binary_concat_conf, "in").extend(in_lbns)
# op_conf.dynamic_binary_concat_conf.in[:] = in_lbns
op_conf.dynamic_binary_concat_conf.out = "out"
op_conf.dynamic_binary_concat_conf.out_data_type = source_blob.dtype
op_conf.dynamic_binary_concat_conf.out_data_type = (
source_blob.dtype.oneflow_proto_dtype
)
op_conf.dynamic_binary_concat_conf.out_shape.dim.extend(list(source_blob.shape))
if source_blob.batch_axis is not None:
op_conf.dynamic_binary_concat_conf.out_batch_axis.value = source_blob.batch_axis
Expand Down
2 changes: 1 addition & 1 deletion oneflow/python/ops/nn_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def sigmoid_cross_entropy_with_logits(
op_conf.sigmoid_cross_entropy_conf.prediction = logits.unique_name
op_conf.sigmoid_cross_entropy_conf.label = labels.unique_name
op_conf.sigmoid_cross_entropy_conf.loss = "loss"
op_conf.sigmoid_cross_entropy_conf.label_type = labels.dtype
op_conf.sigmoid_cross_entropy_conf.label_type = labels.dtype.oneflow_proto_dtype
interpret_util.Forward(op_conf)
lbi = logical_blob_id_util.LogicalBlobId()
lbi.op_name = op_conf.name
Expand Down

0 comments on commit b93f0d7

Please sign in to comment.