@halirutan i got the style transfer stuff running last night, albeit poorly. here's the performance on the msi gs63vr (16gb/6gb gtx 1060) if you are curious. couldnt get it to peg to processor so maybe more room for speed. wolframcloud.com/objects/…
@J.M. Could you help to remove that Duplicated mark?That is not a duplicated question exactly.
I hope to call api,but I found I cannot call it,so I find a new method here.The new post is about how to use HTTPRequest to replace that java code actually.
BTW, I have a function that takes a matrix as an argument. Usually this works, but this one seems to run the function for every single item in the matrix, instead of once for the entire matrix. Any idea how to fix it?
Here is my code:
ClearAll[XYZtoOCIO]
(* Assumes data is fed in as {{Xr,Yr,Zr},{Xg,Yg,Zg},{Xb,Yb,Zb}}. If not, transpose*)
XYZtoOCIO[matrix_] := (" - !<MatrixTransform> {matrix: [" Riffle[Flatten[matrix], 0, 4] ", 0, 0, 0, 0, 1]}")
@GiantCowFilms Luckily for us, StringRiffle does the conversion from number to string by itself. So what you probably want is commas between your entries.
@halirutan Hm, it doesn't seem to like StringRiffle's output.
StringJoin::string: String expected at position 2 in - !<MatrixTransform>{matrix:[<>StringRiffle[{0.782501,0.147614,0.034668,0,0.246704,1.05734,-0.304047,0,0.013916,-0.405457,1.21603},,]<>,0,0,0,0,1]}. >>
@Edmund something more general is needed, e.g. association contains keys a,b,c,d,e and you have mapping rules for a,c,e, like {"a" -> f, "c" -> g, "e" -> h}, though this specification form is not a must.
I have implemented the underlying kernel functionality that is needed to make this possible. However it is not yet implemented on the Dataset side. I don't think this will happen in the immediate future owing to other priorities.
Here is a stop-gap that implements a simple version of mutable upd...
@halirutan Regarding the DateValue[{2017,1,1},"Week"] issue, it turns out that is by design. According to ISO that day was part of the 52nd week of 2016. I told them I was concerned about how many detours it took me to find the proper way to chart average weekly values. I suggested maybe a more prominent example in the DateObject docs.