我有多个这样的张量:
[value]
[value]
...
[value] (batch_size=n, shape=(None))
和多个张量:
[value, value]
[value, value]
...
[value, value] (batch_size=n, shape=(None, None))
如何将它们连接成这样?
[value, value, ..., value]
[value, value, ..., value]
...
[value, value, ..., value] (batch_size=n)
答案 0 :(得分:0)
我用排名第一的Sub CreateSheetsFromAList()
Dim MyCell As Range, MyRange As Range
Set MyRange = Sheets(4).Range("C6")
Set MyRange = Range(MyRange, MyRange.End(xlDown))
Application.ScreenUpdating = False
For Each MyCell In MyRange
If MyCell.Value = "" Then 'Check for null/empty value cell.
GoTo NextOne: 'Go to next MyCell
Else
Sheets(5).Copy After:=Sheets(Sheets.count) 'creates a new worksheet
Sheets(Sheets.count).Name = MyCell.Value ' renames the new worksheet
End If NextOne:
Next MyCell
Application.ScreenUpdating = True
MsgBox "Macro is done" 'Insert your own message between the quotations.
End Sub
张量解决了这个问题,因为tf.expand_dims
要求张量的等级必须相同。