How to iterate over this? #1278
AntonLobach
started this conversation in
General
Replies: 2 comments
-
|
Hi @AntonLobach, The following worked for me out of the box. Also note that f-strings can be translated directly in Basilisp with the (doseq [[X y] train-dataloader]
(println #f "Shape of X [N, C, H, W]: {(.-shape X)}")
(println #f "Shape of Y: {(.-shape y)} {(.-dtype y)}"))
;; Shape of X [N, C, H, W]: #py (64 1 28 28)
;; Shape of Y: #py (64) torch.int64
;; ... |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi @ikappaki, Thanks again for your help, it works! I also found that beside my incorrect code, there was also an issue with the numpy version, but I didn't see the full error in Emacs and only spotted it when using the bare bones repl in the terminal. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to translate this Python code, but bot sure how to iterate over test_dataloader:
My attempts:
Beta Was this translation helpful? Give feedback.
All reactions