简体   繁体   中英

Operations on Specific Columns on a Tensor in TensorFlow

I've started using TensorFlow recently and am confused on how to approach column specific operations. The tensor I am dealing with is shaped [? , 12] and I want to multiply columns: 1 , 4 , 7, and 10 by 200 and for one column I want to round each value in it to nearest integer. I've looked at the docs but have found no concrete way to accomplish this task. Speaking generically how can I execute these operations in TensorFlow? Is there no operator to retrieve specific columns and/or do operations on them?

我相信您正在寻找tf.slice

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM