tensorflow / swift

Swift for TensorFlow
https://tensorflow.org/swift
Apache License 2.0
6.12k stars 608 forks source link

No such module 'FoundationNetworking' #486

Closed Zandew closed 4 years ago

Zandew commented 4 years ago

I've tried both releases 0.9.0 and 0.10.0 on Xcode macOS command line tool using both build systems. I always get error No such module 'FoundationNetworking'

8bitmp3 commented 4 years ago

Hey @Zandew! Do import TensorFlow and basic tensor operations work using the CL tool in your environment? If you can provide more context that'd be awesome. I assume you're running import FoundationNetworking or something. Thanks

kongzii commented 4 years ago

I think FoundationNetworking is available only on Linux and you should use Foundation on macOS. You can use

#if canImport(FoundationNetworking)
    import FoundationNetworking
#endif

if you need support of both platforms.

Zandew commented 4 years ago

I'm following https://www.tensorflow.org/swift/tutorials/model_training_walkthrough this tutorial and with further observation, it looks like I can still do it without that import (?)